summaryrefslogtreecommitdiffstats
path: root/debian/opensync
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-09-11 14:38:47 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-09-11 14:38:47 +0900
commit884c8093d63402a1ad0b502244b791e3c6782be3 (patch)
treea600d4ab0d431a2bdfe4c15b70df43c14fbd8dd0 /debian/opensync
parent14e1aa2006796f147f3f4811fb908a6b01e79253 (diff)
downloadextra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.tar.gz
extra-dependencies-884c8093d63402a1ad0b502244b791e3c6782be3.zip
Added debian extra dependency packages.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/opensync')
-rw-r--r--debian/opensync/opensync-0.22/AUTHORS2
-rw-r--r--debian/opensync/opensync-0.22/COPYING510
-rw-r--r--debian/opensync/opensync-0.22/ChangeLog0
-rw-r--r--debian/opensync/opensync-0.22/Doxyfile.in1154
-rw-r--r--debian/opensync/opensync-0.22/INSTALL229
-rw-r--r--debian/opensync/opensync-0.22/Makefile.am32
-rw-r--r--debian/opensync/opensync-0.22/Makefile.in740
-rw-r--r--debian/opensync/opensync-0.22/NEWS1
-rw-r--r--debian/opensync/opensync-0.22/README46
-rw-r--r--debian/opensync/opensync-0.22/TODO14
-rw-r--r--debian/opensync/opensync-0.22/acinclude.m41199
-rw-r--r--debian/opensync/opensync-0.22/aclocal.m47413
-rwxr-xr-xdebian/opensync/opensync-0.22/config.guess1500
-rw-r--r--debian/opensync/opensync-0.22/config.h.in76
-rwxr-xr-xdebian/opensync/opensync-0.22/config.sub1616
-rwxr-xr-xdebian/opensync/opensync-0.22/configure23862
-rw-r--r--debian/opensync/opensync-0.22/configure.in228
-rw-r--r--debian/opensync/opensync-0.22/debian/README.Debian9
-rw-r--r--debian/opensync/opensync-0.22/debian/changelog165
-rw-r--r--debian/opensync/opensync-0.22/debian/compat1
-rw-r--r--debian/opensync/opensync-0.22/debian/control54
-rw-r--r--debian/opensync/opensync-0.22/debian/copyright33
-rw-r--r--debian/opensync/opensync-0.22/debian/libopensync0-dev.install16
-rw-r--r--debian/opensync/opensync-0.22/debian/libopensync0.docs2
-rw-r--r--debian/opensync/opensync-0.22/debian/libopensync0.install5
-rw-r--r--debian/opensync/opensync-0.22/debian/opensyncutils.install5
-rw-r--r--debian/opensync/opensync-0.22/debian/patches/000-debian.diff10206
-rw-r--r--debian/opensync/opensync-0.22/debian/patches/001-fix-crappy-test-swig-version.diff40
-rw-r--r--debian/opensync/opensync-0.22/debian/patches/002-remove-unused-variables.diff34
-rw-r--r--debian/opensync/opensync-0.22/debian/patches/003-not-take-deprecated-as-error.diff222
-rw-r--r--debian/opensync/opensync-0.22/debian/patches/series4
-rw-r--r--debian/opensync/opensync-0.22/debian/pycompat1
-rw-r--r--debian/opensync/opensync-0.22/debian/python-opensync.install1
-rw-r--r--debian/opensync/opensync-0.22/debian/pyversions1
-rwxr-xr-xdebian/opensync/opensync-0.22/debian/rules163
-rw-r--r--debian/opensync/opensync-0.22/debian/source/format1
-rw-r--r--debian/opensync/opensync-0.22/debian/source/options3
-rwxr-xr-xdebian/opensync/opensync-0.22/depcomp530
-rwxr-xr-xdebian/opensync/opensync-0.22/formats/Makefile.am38
-rw-r--r--debian/opensync/opensync-0.22/formats/Makefile.in697
-rw-r--r--debian/opensync/opensync-0.22/formats/contact.c102
-rw-r--r--debian/opensync/opensync-0.22/formats/data.c77
-rw-r--r--debian/opensync/opensync-0.22/formats/event.c86
-rw-r--r--debian/opensync/opensync-0.22/formats/file.c303
-rw-r--r--debian/opensync/opensync-0.22/formats/file.h43
-rw-r--r--debian/opensync/opensync-0.22/formats/note.c41
-rw-r--r--debian/opensync/opensync-0.22/formats/todo.c76
-rwxr-xr-xdebian/opensync/opensync-0.22/formats/vformats-xml/Makefile.am50
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/Makefile.in637
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/opensync-xml-contact.h91
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.c472
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.h30
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/vformat.c2005
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/vformat.h155
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-evolution.c522
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-kde.c505
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.c406
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.h29
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.c2547
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.h16
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.c1405
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.h11
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.c672
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.h11
-rw-r--r--debian/opensync/opensync-0.22/formats/vformats-xml/xmldoc.c76
-rwxr-xr-xdebian/opensync/opensync-0.22/install-sh323
-rw-r--r--debian/opensync/opensync-0.22/ltmain.sh6871
-rwxr-xr-xdebian/opensync/opensync-0.22/misc/buildtest.sh75
-rw-r--r--debian/opensync/opensync-0.22/misc/doxygen.css302
-rwxr-xr-xdebian/opensync/opensync-0.22/missing360
-rw-r--r--debian/opensync/opensync-0.22/opensync-1.0-uninstalled.pc.in15
-rw-r--r--debian/opensync/opensync-0.22/opensync-1.0.pc.in15
-rwxr-xr-xdebian/opensync/opensync-0.22/opensync/Makefile.am81
-rw-r--r--debian/opensync/opensync-0.22/opensync/Makefile.in629
-rwxr-xr-xdebian/opensync/opensync-0.22/opensync/opensync.h85
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_anchor.c105
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_anchor.h28
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_change.c617
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_change.h41
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_change_internals.h61
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_changecmds.c603
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_changecmds.h24
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_context.c144
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_context.h11
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_context_internals.h13
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_convert.c896
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_convert.h57
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_convreg.c263
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_convreg.h21
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_db.c706
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_db_bdb.h16
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_db_internals.h38
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_debug.c261
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_debug.h26
-rwxr-xr-xdebian/opensync/opensync-0.22/opensync/opensync_env.c952
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_env.h31
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_env_internals.h26
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_error.c261
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_error.h33
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_error_internals.h11
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_filter.c328
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_filter.h29
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_filter_internals.h34
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_format_internals.h175
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_group.c1035
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_group.h50
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_group_internals.h22
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_hashtable.c380
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_hashtable.h15
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_hashtable_internals.h12
-rwxr-xr-xdebian/opensync/opensync-0.22/opensync/opensync_internals.h58
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_member.c1636
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_member.h78
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_member_internals.h57
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_message.c253
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_message_internals.h116
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_plugin.c608
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_plugin.h141
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_plugin_internals.h21
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_queue.c914
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_queue_internals.h93
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_serializer.c253
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_serializer.h48
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_support.h18
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_time.c1092
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_time.h45
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_time_internals.h17
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_user.c99
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_user_internals.h23
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_xml.c222
-rw-r--r--debian/opensync/opensync-0.22/opensync/opensync_xml.h60
-rw-r--r--debian/opensync/opensync-0.22/osengine-1.0-uninstalled.pc.in9
-rw-r--r--debian/opensync/opensync-0.22/osengine-1.0.pc.in11
-rwxr-xr-xdebian/opensync/opensync-0.22/osengine/Makefile.am47
-rw-r--r--debian/opensync/opensync-0.22/osengine/Makefile.in577
-rw-r--r--debian/opensync/opensync-0.22/osengine/engine.h31
-rw-r--r--debian/opensync/opensync-0.22/osengine/engine_internals.h24
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_client.c891
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_client_internals.h45
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_debug.c138
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_debug.h10
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_debug_internals.h6
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_deciders.c248
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_deciders_internals.h5
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_engine.c1233
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_engine.h26
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_engine_internals.h80
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_flags.c221
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_flags_internals.h53
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_mapcmds.c616
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_mapcmds_internals.h14
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_mapping.c637
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_mapping.h12
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_mapping_internals.h87
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_status.c110
-rw-r--r--debian/opensync/opensync-0.22/osengine/osengine_status.h134
-rw-r--r--debian/opensync/opensync-0.22/osplugin/Makefile.am18
-rw-r--r--debian/opensync/opensync-0.22/osplugin/Makefile.in511
-rw-r--r--debian/opensync/opensync-0.22/osplugin/osplugin.c604
-rwxr-xr-xdebian/opensync/opensync-0.22/py-compile146
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/Makefile.am111
-rw-r--r--debian/opensync/opensync-0.22/tests/Makefile.in862
-rw-r--r--debian/opensync/opensync-0.22/tests/check_codes.c1143
-rw-r--r--debian/opensync/opensync-0.22/tests/check_conv.c1024
-rw-r--r--debian/opensync/opensync-0.22/tests/check_env.c219
-rw-r--r--debian/opensync/opensync-0.22/tests/check_error.c201
-rw-r--r--debian/opensync/opensync-0.22/tests/check_filter.c343
-rw-r--r--debian/opensync/opensync-0.22/tests/check_group.c62
-rw-r--r--debian/opensync/opensync-0.22/tests/check_ipc.c2093
-rw-r--r--debian/opensync/opensync-0.22/tests/check_lock.c275
-rw-r--r--debian/opensync/opensync-0.22/tests/check_member.c42
-rw-r--r--debian/opensync/opensync-0.22/tests/check_multisync.c1829
-rw-r--r--debian/opensync/opensync-0.22/tests/check_plugins.c80
-rw-r--r--debian/opensync/opensync-0.22/tests/check_sync.c685
-rw-r--r--debian/opensync/opensync-0.22/tests/check_user.c48
-rw-r--r--debian/opensync/opensync-0.22/tests/check_vcal.c479
-rw-r--r--debian/opensync/opensync-0.22/tests/check_vcard.c456
-rw-r--r--debian/opensync/opensync-0.22/tests/check_vnote.c284
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.dbbin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf1
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.dbbin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf1
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.dbbin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.dbbin0 -> 2048 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file1
-rw-r--r--debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file21
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2bin0 -> 2048 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf11
-rw-r--r--debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3bin0 -> 1024 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2bin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdatabin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdatabin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdatabin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1bin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2bin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3bin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4bin0 -> 1024 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5bin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupebin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_databin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupebin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdatabin0 -> 3072 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1bin0 -> 1024 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2bin0 -> 2048 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf1
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf2
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf2
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1bin0 -> 512 bytes
-rwxr-xr-xdebian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdatabin0 -> 3072 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdatabin0 -> 512 bytes
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf22
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf20
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf22
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf25
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf23
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf21
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf47
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf47
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf53
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf59
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf26
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf54
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf9
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf7
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf12
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf78
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf114
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf113
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf78
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf77
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf75
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf77
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf79
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf77
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf78
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf76
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf3
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/crash.ics27
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf43
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf64
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf37
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf16
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf23
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf48
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf55
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf41
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf38
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf39
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf38
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf38
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf44
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs19
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics20
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt5
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt10
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt8
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf51
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf22
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf23
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf21
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf42
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf59
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf20
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf16
-rw-r--r--debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs21
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am22
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in554
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c137
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c559
-rw-r--r--debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h18
-rw-r--r--debian/opensync/opensync-0.22/tests/support.c529
-rw-r--r--debian/opensync/opensync-0.22/tests/support.h78
-rwxr-xr-xdebian/opensync/opensync-0.22/tools/Makefile.am34
-rw-r--r--debian/opensync/opensync-0.22/tools/Makefile.in556
-rw-r--r--debian/opensync/opensync-0.22/tools/osyncbinary.c147
-rw-r--r--debian/opensync/opensync-0.22/tools/osyncdump.c241
-rw-r--r--debian/opensync/opensync-0.22/tools/osyncplugin.c576
-rw-r--r--debian/opensync/opensync-0.22/tools/osyncstress.c451
-rw-r--r--debian/opensync/opensync-0.22/tools/osynctest.c576
-rw-r--r--debian/opensync/opensync-0.22/wrapper/Makefile.am26
-rw-r--r--debian/opensync/opensync-0.22/wrapper/Makefile.in554
-rw-r--r--debian/opensync/opensync-0.22/wrapper/opensync.i393
-rw-r--r--debian/opensync/opensync_0.22.orig.tar.xzbin0 -> 396936 bytes
490 files changed, 108524 insertions, 0 deletions
diff --git a/debian/opensync/opensync-0.22/AUTHORS b/debian/opensync/opensync-0.22/AUTHORS
new file mode 100644
index 00000000..3ed82c27
--- /dev/null
+++ b/debian/opensync/opensync-0.22/AUTHORS
@@ -0,0 +1,2 @@
+Armin Bauer
+armin.bauer@desscon.com \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/COPYING b/debian/opensync/opensync-0.22/COPYING
new file mode 100644
index 00000000..b124cf58
--- /dev/null
+++ b/debian/opensync/opensync-0.22/COPYING
@@ -0,0 +1,510 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 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 Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ 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 Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+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 and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+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 other code 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.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ 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, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser 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 combine 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) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) 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.
+
+ d) 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.
+
+ e) 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 materials to be 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 with
+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 Lesser 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 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 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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!
+
+
diff --git a/debian/opensync/opensync-0.22/ChangeLog b/debian/opensync/opensync-0.22/ChangeLog
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/ChangeLog
diff --git a/debian/opensync/opensync-0.22/Doxyfile.in b/debian/opensync/opensync-0.22/Doxyfile.in
new file mode 100644
index 00000000..c39cd224
--- /dev/null
+++ b/debian/opensync/opensync-0.22/Doxyfile.in
@@ -0,0 +1,1154 @@
+# Doxyfile 1.3.8
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = OpenSync
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = @VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of source
+# files, where putting all generated files in the same directory would otherwise
+# cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST = YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = opensync osengine
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS = *.c and *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET = misc/doxygen.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off. Note that this
+# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
+# recommended to install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes that
+# lay further from the root node will be omitted. Note that setting this option to
+# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that a graph may be further truncated if the graph's image dimensions are
+# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
+# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
+
diff --git a/debian/opensync/opensync-0.22/INSTALL b/debian/opensync/opensync-0.22/INSTALL
new file mode 100644
index 00000000..54caf7c1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/INSTALL
@@ -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.
+
diff --git a/debian/opensync/opensync-0.22/Makefile.am b/debian/opensync/opensync-0.22/Makefile.am
new file mode 100644
index 00000000..196953d3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/Makefile.am
@@ -0,0 +1,32 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = opensync osengine formats tests tools wrapper osplugin
+
+if BUILD_ENGINE
+OSENGINE_PC = osengine-1.0.pc
+endif
+
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = opensync-1.0.pc $(OSENGINE_PC)
+
+DISTCLEANFILES = \
+ opensync-1.0.pc \
+ opensync-1.0-uninstalled.pc \
+ osengine-1.0.pc \
+ osengine-1.0-uninstalled.pc \
+ py-compile
+
+EXTRA_DIST = \
+ opensync-1.0.pc.in \
+ osengine-1.0.pc.in \
+ misc/buildtest.sh \
+ misc/doxygen.css
+
+dist-hook:
+ find $(distdir) -name .svn -print0 | xargs -0 rm -rf
+ find $(distdir) -name autom4te.cache -print0 | xargs -0 rm -rf
+ find $(distdir) -name .libs -print0 | xargs -0 rm -rf
+ find $(distdir) -name .deps -print0 | xargs -0 rm -rf
+ find $(distdir) -name *.la -print0 | xargs -0 rm -rf
+ find $(distdir) -name *.lo -print0 | xargs -0 rm -rf
+ find $(distdir) -name Makefile -print0 | xargs -0 rm -rf
diff --git a/debian/opensync/opensync-0.22/Makefile.in b/debian/opensync/opensync-0.22/Makefile.in
new file mode 100644
index 00000000..7e7d56ae
--- /dev/null
+++ b/debian/opensync/opensync-0.22/Makefile.in
@@ -0,0 +1,740 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Doxyfile.in \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/config.h.in $(srcdir)/opensync-1.0-uninstalled.pc.in \
+ $(srcdir)/opensync-1.0.pc.in \
+ $(srcdir)/osengine-1.0-uninstalled.pc.in \
+ $(srcdir)/osengine-1.0.pc.in $(top_srcdir)/configure AUTHORS \
+ COPYING ChangeLog INSTALL NEWS TODO config.guess config.sub \
+ depcomp install-sh ltmain.sh missing py-compile
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = opensync-1.0.pc opensync-1.0-uninstalled.pc \
+ osengine-1.0.pc osengine-1.0-uninstalled.pc Doxyfile
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+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)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = opensync osengine formats tests tools wrapper osplugin
+@BUILD_ENGINE_TRUE@OSENGINE_PC = osengine-1.0.pc
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = opensync-1.0.pc $(OSENGINE_PC)
+DISTCLEANFILES = \
+ opensync-1.0.pc \
+ opensync-1.0-uninstalled.pc \
+ osengine-1.0.pc \
+ osengine-1.0-uninstalled.pc \
+ py-compile
+
+EXTRA_DIST = \
+ opensync-1.0.pc.in \
+ osengine-1.0.pc.in \
+ misc/buildtest.sh \
+ misc/doxygen.css
+
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.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: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) 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: $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+opensync-1.0.pc: $(top_builddir)/config.status $(srcdir)/opensync-1.0.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+opensync-1.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/opensync-1.0-uninstalled.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+osengine-1.0.pc: $(top_builddir)/config.status $(srcdir)/osengine-1.0.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+osengine-1.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/osengine-1.0-uninstalled.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+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"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @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; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$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; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ 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; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ $(mkdir_p) $(distdir)/. $(distdir)/misc
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ 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.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 '1{h;s/./=/g;p;x;}' -e '$${p;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-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+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-info-am uninstall-pkgconfigDATA
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-libtool clean-recursive \
+ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+ dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-recursive distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-pkgconfigDATA install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am \
+ uninstall-pkgconfigDATA
+
+
+dist-hook:
+ find $(distdir) -name .svn -print0 | xargs -0 rm -rf
+ find $(distdir) -name autom4te.cache -print0 | xargs -0 rm -rf
+ find $(distdir) -name .libs -print0 | xargs -0 rm -rf
+ find $(distdir) -name .deps -print0 | xargs -0 rm -rf
+ find $(distdir) -name *.la -print0 | xargs -0 rm -rf
+ find $(distdir) -name *.lo -print0 | xargs -0 rm -rf
+ find $(distdir) -name Makefile -print0 | xargs -0 rm -rf
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/NEWS b/debian/opensync/opensync-0.22/NEWS
new file mode 100644
index 00000000..5d9ab38c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/NEWS
@@ -0,0 +1 @@
+No news is good news
diff --git a/debian/opensync/opensync-0.22/README b/debian/opensync/opensync-0.22/README
new file mode 100644
index 00000000..b4b63d3d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/README
@@ -0,0 +1,46 @@
+Hi everyone!
+
+Here is what you have to do (atm) to test 0.90:
+
+./configure
+notice that dbus-dev is missing
+install dbus-dev
+make
+
+At the moment 0.90 requires some hand tweaking to start
+mainly since the install routines are not finished.
+
+start multisyncd from src:
+cd src
+./multisyncd
+
+multisyncd knows the following command line switches atm:
+
+--config /path/to/config (self explanatory)
+--plugin plugin_name (explained below)
+some more you dont need to know atm and might disappaer
+
+so... to start the multisyncd in server mode do the following
+( in the src directory )
+./multisyncd --config ../data/config/multisyncd.conf
+
+If it doesnt start do: export MSYNC_DEBUG=1 to see the debugging
+messages
+
+to start a plugin (this is for example how plugins that always listen
+in the background for a palm for example are started) do:
+./multisyncd --config ../data/config/multisyncd.conf --plugin libpalm_sync
+the plugin_name has to be either
+- a name of a library where the path is in the ldconfig without a ending (.so)
+- a name of a lib with a ending
+- the complete path
+
+to start the cli go to interfaces/cli
+do: export PYTHONPATH=../../python/.libs
+and do ./test.py for a shell script
+and ./command.py for a interactive curses based version
+in the curses version press c to get it to read the
+syncgroups and syncmembers installed on the server
+(in the data/datadir directory if you used the above config)
+
+I have a .cdtproject and a .project file for the fans of eclipse ready to use :) \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/TODO b/debian/opensync/opensync-0.22/TODO
new file mode 100644
index 00000000..96326df6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/TODO
@@ -0,0 +1,14 @@
+- conversion path: convert data only when needed
+- conversion path: return formatsink to be used
+- findpath: use distance queue
+ - cross-objtype?
+ - losses
+ - distance
+- hooks
+ - after_new_change
+ - before_commit
+ - hook plugins
+ - hook plg config
+ - others?
+- Make an autoconf macro: AC_OSYNC_PLUGIN
+- `grep FIXME -r .`
diff --git a/debian/opensync/opensync-0.22/acinclude.m4 b/debian/opensync/opensync-0.22/acinclude.m4
new file mode 100644
index 00000000..2bf99510
--- /dev/null
+++ b/debian/opensync/opensync-0.22/acinclude.m4
@@ -0,0 +1,1199 @@
+dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
+dnl
+
+AC_DEFUN([AM_PATH_CHECK],
+[
+ AC_ARG_WITH([check],
+ [ --with-check=PATH prefix where check is installed [default=auto]])
+
+ min_check_version=ifelse([$1], ,0.8.2,$1)
+
+ AC_MSG_CHECKING(for check - version >= $min_check_version)
+
+ if test x$with_check = xno; then
+ AC_MSG_RESULT(disabled)
+ ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
+ else
+ if test "x$with_check" != x; then
+ CHECK_CFLAGS="-I$with_check/include"
+ CHECK_LIBS="-L$with_check/lib -lcheck"
+ else
+ CHECK_CFLAGS=""
+ CHECK_LIBS="-lcheck"
+ fi
+
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+
+ CFLAGS="$CFLAGS $CHECK_CFLAGS"
+ LIBS="$CHECK_LIBS $LIBS"
+
+ rm -f conf.check-test
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <check.h>
+
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+
+int main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.check-test");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = strdup("$min_check_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_check_version");
+ return 1;
+ }
+
+ if ((CHECK_MAJOR_VERSION != check_major_version) ||
+ (CHECK_MINOR_VERSION != check_minor_version) ||
+ (CHECK_MICRO_VERSION != check_micro_version))
+ {
+ printf("\n*** The check header file (version %d.%d.%d) does not match\n",
+ CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
+ printf("*** the check library (version %d.%d.%d).\n",
+ check_major_version, check_minor_version, check_micro_version);
+ return 1;
+ }
+
+ if ((check_major_version > major) ||
+ ((check_major_version == major) && (check_minor_version > minor)) ||
+ ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of check (%d.%d.%d) was found.\n",
+ check_major_version, check_minor_version, check_micro_version);
+ printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the check library and header\n");
+ printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
+ printf("*** to specify the prefix where the correct version was installed.\n");
+ }
+
+ return 1;
+}
+],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+
+ if test "x$no_check" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test -f conf.check-test ; then
+ :
+ else
+ echo "*** Could not run check test program, checking why..."
+ CFLAGS="$CFLAGS $CHECK_CFLAGS"
+ LIBS="$CHECK_LIBS $LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <check.h>
+], , [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding check. You'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for"
+ echo "*** the exact error that occured." ])
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ CHECK_CFLAGS=""
+ CHECK_LIBS=""
+
+ rm -f conf.check-test
+ ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
+ fi
+
+ AC_SUBST(CHECK_CFLAGS)
+ AC_SUBST(CHECK_LIBS)
+
+ rm -f conf.check-test
+
+ fi
+])
+
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_compare_version.html
+dnl
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+ # Used to indicate true or false condition
+ ax_compare_version=false
+
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
+ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+ dnl # then the first line is used to determine if the condition is true.
+ dnl # The sed right after the echo is to remove any indented white space.
+ m4_case(m4_tolower($2),
+ [lt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [gt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [le],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],
+ [ge],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],[
+ dnl Split the operator from the subversion count if present.
+ m4_bmatch(m4_substr($2,2),
+ [0],[
+ # A count of zero means use the length of the shorter version.
+ # Determine the number of characters in A and B.
+ ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
+ ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
+
+ # Set A to no more than B's length and B to no more than A's length.
+ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+ ],
+ [[0-9]+],[
+ # A count greater than zero means use only that many subversions
+ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ ],
+ [.+],[
+ AC_WARNING(
+ [illegal OP numeric parameter: $2])
+ ],[])
+
+ # Pad zeros at end of numbers to make same length.
+ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+ B="$B`echo $A | sed 's/./0/g'`"
+ A="$ax_compare_version_tmp_A"
+
+ # Check for equality or inequality as necessary.
+ m4_case(m4_tolower(m4_substr($2,0,2)),
+ [eq],[
+ test "x$A" = "x$B" && ax_compare_version=true
+ ],
+ [ne],[
+ test "x$A" != "x$B" && ax_compare_version=true
+ ],[
+ AC_WARNING([illegal OP parameter: $2])
+ ])
+ ])
+
+ AS_VAR_POPDEF([A])dnl
+ AS_VAR_POPDEF([B])dnl
+
+ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+ if test "$ax_compare_version" = "true" ; then
+ m4_ifvaln([$4],[$4],[:])dnl
+ m4_ifvaln([$5],[else $5])dnl
+ fi
+]) dnl AX_COMPARE_VERSION
+
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_path_bdb.html
+dnl
+dnl #########################################################################
+AC_DEFUN([AX_PATH_BDB], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_ok=no
+
+ # Add --with-bdb-dir option to configure.
+ AC_ARG_WITH([bdb-dir],
+ [AC_HELP_STRING([--with-bdb-dir=DIR],
+ [Berkeley DB installation directory])])
+
+ # Check if --with-bdb-dir was specified.
+ if test "x$with_bdb_dir" = "x" ; then
+ # No option specified, so just search the system.
+ AX_PATH_BDB_NO_OPTIONS([$1], [HIGHEST], [
+ ax_path_bdb_ok=yes
+ ])
+ else
+ # Set --with-bdb-dir option.
+ ax_path_bdb_INC="$with_bdb_dir/include"
+ ax_path_bdb_LIB="$with_bdb_dir/lib"
+
+ dnl # Save previous environment, and modify with new stuff.
+ ax_path_bdb_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS"
+
+ ax_path_bdb_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS"
+
+ # Check for specific header file db.h
+ AC_MSG_CHECKING([db.h presence in $ax_path_bdb_INC])
+ if test -f "$ax_path_bdb_INC/db.h" ; then
+ AC_MSG_RESULT([yes])
+ # Check for library
+ AX_PATH_BDB_NO_OPTIONS([$1], [ENVONLY], [
+ ax_path_bdb_ok=yes
+ BDB_CPPFLAGS="-I$ax_path_bdb_INC"
+ BDB_LDFLAGS="-L$ax_path_bdb_LIB"
+ ])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_NOTICE([no usable Berkeley DB not found])
+ fi
+
+ dnl # Restore the environment.
+ CPPFLAGS="$ax_path_bdb_save_CPPFLAGS"
+ LDFLAGS="$ax_path_bdb_save_LDFLAGS"
+
+ fi
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_ok" = "yes" ; then
+ m4_ifvaln([$2],[$2],[:])dnl
+ m4_ifvaln([$3],[else $3])dnl
+ fi
+
+]) dnl AX_PATH_BDB
+
+dnl #########################################################################
+dnl Check for berkeley DB of at least MINIMUM-VERSION on system.
+dnl
+dnl The OPTION argument determines how the checks occur, and can be one of:
+dnl
+dnl HIGHEST - Check both the environment and the default installation
+dnl directories for Berkeley DB and choose the version that
+dnl is highest. (default)
+dnl ENVFIRST - Check the environment first, and if no satisfactory
+dnl library is found there check the default installation
+dnl directories for Berkeley DB which is /usr/local/BerkeleyDB*
+dnl ENVONLY - Check the current environment only.
+dnl
+dnl Requires AX_PATH_BDB_PATH_GET_VERSION, AX_PATH_BDB_PATH_FIND_HIGHEST,
+dnl AX_PATH_BDB_ENV_CONFIRM_LIB, AX_PATH_BDB_ENV_GET_VERSION, and
+dnl AX_COMPARE_VERSION macros.
+dnl
+dnl Result: sets ax_path_bdb_no_options_ok to yes or no
+dnl sets BDB_LIBS, BDB_CPPFLAGS, BDB_LDFLAGS, BDB_VERSION
+dnl
+dnl AX_PATH_BDB_NO_OPTIONS([MINIMUM-VERSION], [OPTION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_NO_OPTIONS], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_no_options_ok=no
+
+ # Values to add to environment to use Berkeley DB.
+ BDB_VERSION=''
+ BDB_LIBS=''
+ BDB_CPPFLAGS=''
+ BDB_LDFLAGS=''
+
+ # Check cross compilation here.
+ if test "x$cross_compiling" = "xyes" ; then
+ # If cross compiling, can't use AC_RUN_IFELSE so do these tests.
+ # The AC_PREPROC_IFELSE confirms that db.h is preprocessable,
+ # and extracts the version number from it.
+ AC_MSG_CHECKING([for db.h])
+
+ AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_no_options_HEADER_VERSION])dnl
+ HEADER_VERSION=''
+ AC_PREPROC_IFELSE([
+ AC_LANG_SOURCE([[
+#include <db.h>
+AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
+ ]])
+ ],[
+ # Extract version from preprocessor output.
+ HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \
+ | grep AX_PATH_BDB_STUFF | sed 's/[[^0-9,]]//g;s/,/./g;1q'`
+ ],[])
+
+ if test "x$HEADER_VERSION" = "x" ; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([$HEADER_VERSION])
+
+ # Check that version is high enough.
+ AX_COMPARE_VERSION([$HEADER_VERSION],[ge],[$1],[
+ # get major and minor version numbers
+ AS_VAR_PUSHDEF([MAJ],[ax_path_bdb_no_options_MAJOR])dnl
+ MAJ=`echo $HEADER_VERSION | sed 's,\..*,,'`
+ AS_VAR_PUSHDEF([MIN],[ax_path_bdb_no_options_MINOR])dnl
+ MIN=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
+
+ dnl # Save LIBS.
+ ax_path_bdb_no_options_save_LIBS="$LIBS"
+
+ # Check that we can link with the library.
+ AC_SEARCH_LIBS([db_version],
+ [db db-$MAJ.$MIN db$MAJ.$MIN db$MAJ$MIN db-$MAJ db$MAJ],[
+ # Sucessfully found library.
+ ax_path_bdb_no_options_ok=yes
+ BDB_VERSION=$HEADER_VERSION
+
+ # Extract library from LIBS
+ ax_path_bdb_no_options_LEN=` \
+ echo "x$ax_path_bdb_no_options_save_LIBS" \
+ | awk '{print(length)}'`
+ BDB_LIBS=`echo "x$LIBS " \
+ | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"`
+ ],[])
+
+ dnl # Restore LIBS
+ LIBS="$ax_path_bdb_no_options_save_LIBS"
+
+ AS_VAR_POPDEF([MAJ])dnl
+ AS_VAR_POPDEF([MIN])dnl
+ ])
+ fi
+
+ AS_VAR_POPDEF([HEADER_VERSION])dnl
+ else
+ # Not cross compiling.
+ # Check version of Berkeley DB in the current environment.
+ AX_PATH_BDB_ENV_GET_VERSION([
+ AX_COMPARE_VERSION([$ax_path_bdb_env_get_version_VERSION],[ge],[$1],[
+ # Found acceptable version in current environment.
+ ax_path_bdb_no_options_ok=yes
+ BDB_VERSION="$ax_path_bdb_env_get_version_VERSION"
+ BDB_LIBS="$ax_path_bdb_env_get_version_LIBS"
+ ])
+ ])
+
+ # Determine if we need to search /usr/local/BerkeleyDB*
+ ax_path_bdb_no_options_DONE=no
+ if test "x$2" = "xENVONLY" ; then
+ ax_path_bdb_no_options_DONE=yes
+ elif test "x$2" = "xENVFIRST" ; then
+ ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok
+ fi
+
+ if test "$ax_path_bdb_no_options_DONE" = "no" ; then
+ # Check for highest in /usr/local/BerkeleyDB*
+ AX_PATH_BDB_PATH_FIND_HIGHEST([
+ if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+ # If we already have an acceptable version use this if higher.
+ AX_COMPARE_VERSION(
+ [$ax_path_bdb_path_find_highest_VERSION],[gt],[$BDB_VERSION])
+ else
+ # Since we didn't have an acceptable version check if this one is.
+ AX_COMPARE_VERSION(
+ [$ax_path_bdb_path_find_highest_VERSION],[ge],[$1])
+ fi
+ ])
+
+ dnl # If result from _AX_COMPARE_VERSION is true we want this version.
+ if test "$ax_compare_version" = "true" ; then
+ ax_path_bdb_no_options_ok=yes
+ BDB_LIBS="-ldb"
+ BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include"
+ BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib"
+ BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION"
+ fi
+ fi
+ fi
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+ AC_MSG_NOTICE([using Berkeley DB version $BDB_VERSION])
+ AC_DEFINE([HAVE_DB_H],[1],
+ [Define to 1 if you have the <db.h> header file.])
+ m4_ifvaln([$3],[$3])dnl
+ else
+ AC_MSG_NOTICE([no Berkeley DB version $1 or higher found])
+ m4_ifvaln([$4],[$4])dnl
+ fi
+]) dnl AX_PATH_BDB_NO_OPTIONS
+
+dnl #########################################################################
+dnl Check the default installation directory for Berkeley DB which is
+dnl of the form /usr/local/BerkeleyDB* for the highest version.
+dnl
+dnl Result: sets ax_path_bdb_path_find_highest_ok to yes or no,
+dnl sets ax_path_bdb_path_find_highest_VERSION to version,
+dnl sets ax_path_bdb_path_find_highest_DIR to directory.
+dnl
+dnl AX_PATH_BDB_PATH_FIND_HIGHEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_PATH_FIND_HIGHEST], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_path_find_highest_ok=no
+
+ AS_VAR_PUSHDEF([VERSION],[ax_path_bdb_path_find_highest_VERSION])dnl
+ VERSION=''
+
+ ax_path_bdb_path_find_highest_DIR=''
+
+ # find highest verison in default install directory for Berkeley DB
+ AS_VAR_PUSHDEF([CURDIR],[ax_path_bdb_path_find_highest_CURDIR])dnl
+ AS_VAR_PUSHDEF([CUR_VERSION],[ax_path_bdb_path_get_version_VERSION])dnl
+
+ for CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null`
+ do
+ AX_PATH_BDB_PATH_GET_VERSION([$CURDIR],[
+ AX_COMPARE_VERSION([$CUR_VERSION],[gt],[$VERSION],[
+ ax_path_bdb_path_find_highest_ok=yes
+ ax_path_bdb_path_find_highest_DIR="$CURDIR"
+ VERSION="$CUR_VERSION"
+ ])
+ ])
+ done
+
+ AS_VAR_POPDEF([VERSION])dnl
+ AS_VAR_POPDEF([CUR_VERSION])dnl
+ AS_VAR_POPDEF([CURDIR])dnl
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+
+]) dnl AX_PATH_BDB_PATH_FIND_HIGHEST
+
+dnl #########################################################################
+dnl Checks for Berkeley DB in specified directory's lib and include
+dnl subdirectories.
+dnl
+dnl Result: sets ax_path_bdb_path_get_version_ok to yes or no,
+dnl sets ax_path_bdb_path_get_version_VERSION to version.
+dnl
+dnl AX_PATH_BDB_PATH_GET_VERSION(BDB-DIR, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_PATH_GET_VERSION], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_path_get_version_ok=no
+
+ # Indicate status of checking for Berkeley DB header.
+ AC_MSG_CHECKING([in $1/include for db.h])
+ ax_path_bdb_path_get_version_got_header=no
+ test -f "$1/include/db.h" && ax_path_bdb_path_get_version_got_header=yes
+ AC_MSG_RESULT([$ax_path_bdb_path_get_version_got_header])
+
+ # Indicate status of checking for Berkeley DB library.
+ AC_MSG_CHECKING([in $1/lib for library -ldb])
+
+ ax_path_bdb_path_get_version_VERSION=''
+
+ if test -d "$1/include" && test -d "$1/lib" &&
+ test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then
+ dnl # save and modify environment
+ ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$1/include $CPPFLAGS"
+
+ ax_path_bdb_path_get_version_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldb"
+
+ ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L$1/lib $LDFLAGS"
+
+ # Compile and run a program that compares the version defined in
+ # the header file with a version defined in the library function
+ # db_version.
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ int major,minor,patch;
+ db_version(&major,&minor,&patch);
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+ DB_VERSION_PATCH == patch)
+ return 0;
+ else
+ return 1;
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by adding argument.
+ ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x`
+ ax_path_bdb_path_get_version_ok=yes
+ ],[],[])
+
+ dnl # restore environment
+ CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS"
+ LIBS="$ax_path_bdb_path_get_version_save_LIBS"
+ LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS"
+ fi
+
+ dnl # Finally, execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then
+ AC_MSG_RESULT([$ax_path_bdb_path_get_version_VERSION])
+ m4_ifvaln([$2],[$2])dnl
+ else
+ AC_MSG_RESULT([no])
+ m4_ifvaln([$3],[$3])dnl
+ fi
+]) dnl AX_PATH_BDB_PATH_GET_VERSION
+
+#############################################################################
+dnl Checks if version of library and header match specified version.
+dnl Only meant to be used by AX_PATH_BDB_ENV_GET_VERSION macro.
+dnl
+dnl Requires AX_COMPARE_VERSION macro.
+dnl
+dnl Result: sets ax_path_bdb_env_confirm_lib_ok to yes or no.
+dnl
+dnl AX_PATH_BDB_ENV_CONFIRM_LIB(VERSION, [LIBNAME])
+AC_DEFUN([AX_PATH_BDB_ENV_CONFIRM_LIB], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_env_confirm_lib_ok=no
+
+ dnl # save and modify environment to link with library LIBNAME
+ ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+ LIBS="$LIBS $2"
+
+ # Compile and run a program that compares the version defined in
+ # the header file with a version defined in the library function
+ # db_version.
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ int major,minor,patch;
+ db_version(&major,&minor,&patch);
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+ DB_VERSION_PATCH == patch)
+ return 0;
+ else
+ return 1;
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by giving an argument,
+ # which will tell the program to print the output.
+ ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+ # If the versions all match up, indicate success.
+ AX_COMPARE_VERSION([$ax_path_bdb_env_confirm_lib_VERSION],[eq],[$1],[
+ ax_path_bdb_env_confirm_lib_ok=yes
+ ])
+ ],[],[])
+
+ dnl # restore environment
+ LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+]) dnl AX_PATH_BDB_ENV_CONFIRM_LIB
+
+#############################################################################
+dnl Finds the version and library name for Berkeley DB in the
+dnl current environment. Tries many different names for library.
+dnl
+dnl Requires AX_PATH_BDB_ENV_CONFIRM_LIB macro.
+dnl
+dnl Result: set ax_path_bdb_env_get_version_ok to yes or no,
+dnl set ax_path_bdb_env_get_version_VERSION to the version found,
+dnl and ax_path_bdb_env_get_version_LIBNAME to the library name.
+dnl
+dnl AX_PATH_BDB_ENV_GET_VERSION([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_ENV_GET_VERSION], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_env_get_version_ok=no
+
+ ax_path_bdb_env_get_version_VERSION=''
+ ax_path_bdb_env_get_version_LIBS=''
+
+ AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_env_get_version_HEADER_VERSION])dnl
+ AS_VAR_PUSHDEF([TEST_LIBNAME],[ax_path_bdb_env_get_version_TEST_LIBNAME])dnl
+
+ # Indicate status of checking for Berkeley DB library.
+ AC_MSG_CHECKING([for db.h])
+
+ # Compile and run a program that determines the Berkeley DB version
+ # in the header file db.h.
+ HEADER_VERSION=''
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ return 0;
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by adding an argument.
+ HEADER_VERSION=`./conftest$ac_exeext x`
+ AC_MSG_RESULT([$HEADER_VERSION])
+ ],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no])])
+
+ # Have header version, so try to find corresponding library.
+ # Looks for library names in the order:
+ # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX
+ # and stops when it finds the first one that matches the version
+ # of the header file.
+ if test "x$HEADER_VERSION" != "x" ; then
+ AC_MSG_CHECKING([for library containing Berkeley DB $HEADER_VERSION])
+
+ AS_VAR_PUSHDEF([MAJOR],[ax_path_bdb_env_get_version_MAJOR])dnl
+ AS_VAR_PUSHDEF([MINOR],[ax_path_bdb_env_get_version_MINOR])dnl
+
+ # get major and minor version numbers
+ MAJOR=`echo $HEADER_VERSION | sed 's,\..*,,'`
+ MINOR=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
+
+ # see if it is already specified in LIBS
+ TEST_LIBNAME=''
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db"
+ TEST_LIBNAME='-ldb'
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db-X.Y"
+ TEST_LIBNAME="-ldb-${MAJOR}.$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbX.Y"
+ TEST_LIBNAME="-ldb${MAJOR}.$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbXY"
+ TEST_LIBNAME="-ldb$MAJOR$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db-X"
+ TEST_LIBNAME="-ldb-$MAJOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbX"
+ TEST_LIBNAME="-ldb$MAJOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ dnl # Found a valid library.
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+ if test "x$TEST_LIBNAME" = "x" ; then
+ AC_MSG_RESULT([none required])
+ else
+ AC_MSG_RESULT([$TEST_LIBNAME])
+ fi
+ ax_path_bdb_env_get_version_VERSION="$HEADER_VERSION"
+ ax_path_bdb_env_get_version_LIBS="$TEST_LIBNAME"
+ ax_path_bdb_env_get_version_ok=yes
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ AS_VAR_POPDEF([MAJOR])dnl
+ AS_VAR_POPDEF([MINOR])dnl
+ fi
+
+ AS_VAR_POPDEF([HEADER_VERSION])dnl
+ AS_VAR_POPDEF([TEST_LIBNAME])dnl
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+
+]) dnl BDB_ENV_GET_VERSION
+
+#############################################################################
+
+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 headers required to compile python extensions)
+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"
+])
+
+# Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION])
+
+# 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([_AM_PYTHON_INTERPRETER_LIST],
+ [python python2 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
+
+ m4_if([$1],[],[
+ dnl No version check is needed.
+ # Find any Python interpreter.
+ AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST)
+ 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)])
+ 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 : ; do
+ if test "$am_cv_pathless_PYTHON" = : ; then
+ AC_MSG_ERROR([no suitable Python interpreter found])
+ fi
+ AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+ done])
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+ AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+ ])
+
+ 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(1,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])
+])
+
+# 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])])
+
+# 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); }])
+
+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@web.de>
+dnl @author Alan W. Irwin <irwin@beluga.phys.uvic.ca>
+dnl @author Rafael Laboissiere <rafael@laboissiere.net>
+dnl @author Andrew Collier <abcollier@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'
+ else
+ AC_MSG_NOTICE([SWIG executable is '$SWIG'])
+ SWIG_LIB=`$SWIG -swiglib`
+ AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
+ 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'
+ 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
+])
+
+dnl @synopsis AC_PYTHON_DEVEL
+dnl
+dnl Checks for Python and tries to get the include path to 'Python.h'.
+dnl It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) output variable.
+dnl
+dnl @author Sebastian Huber <sebastian-huber@web.de>, Alan W. Irwin <irwin@beluga.phys.uvic.ca>, Rafael Laboissiere <laboissiere@psy.mpg.de> and Andrew Collier <colliera@nu.ac.za>.
+dnl
+dnl @version $Id: ac_python_devel.m4,v 1.1 2004/12/24 01:03:11 guidod Exp $
+dnl
+AC_DEFUN([AC_PYTHON_DEVEL],[
+ #
+ # should allow for checking of python version here...
+ #
+ AC_REQUIRE([AM_PATH_PYTHON])
+
+ # Check for Python include path
+ AC_MSG_CHECKING([for Python include path])
+ python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+ for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
+ python_path=`find $i -type f -name Python.h -print | sed "1q"`
+ if test -n "$python_path" ; then
+ break
+ fi
+ done
+ python_path=`echo $python_path | sed "s,/Python.h$,,"`
+ AC_MSG_RESULT([$python_path])
+ if test -z "$python_path" ; then
+ AC_MSG_ERROR([cannot find Python include path])
+ fi
+ AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
+
+ # Check for Python library path
+ AC_MSG_CHECKING([for Python library path])
+ python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+ for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
+ python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
+ if test -n "$python_path" ; then
+ break
+ fi
+ done
+ python_path=`echo $python_path | sed "s,/libpython.*$,,"`
+ AC_MSG_RESULT([$python_path])
+ if test -z "$python_path" ; then
+ AC_MSG_ERROR([cannot find Python library path])
+ fi
+ AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
+ #
+ python_site=`echo $python_path | sed "s/config/site-packages/"`
+ AC_SUBST([PYTHON_SITE_PKG],[$python_site])
+ #
+ # libraries which must be linked in when embedding
+ #
+ AC_MSG_CHECKING(python extra libraries)
+ PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
+ conf = distutils.sysconfig.get_config_var; \
+ print conf('LOCALMODLIBS')+' '+conf('LIBS')"
+ AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
+ AC_SUBST(PYTHON_EXTRA_LIBS)
+])
+dnl as-ac-expand.m4 0.2.0
+dnl autostars m4 macro for expanding directories using configure's prefix
+dnl thomas@apestaart.org
+
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+ EXP_VAR=[$1]
+ FROM_VAR=[$2]
+
+ dnl first expand prefix and exec_prefix if necessary
+ prefix_save=$prefix
+ exec_prefix_save=$exec_prefix
+
+ dnl if no prefix given, then use /usr/local, the default prefix
+ if test "x$prefix" = "xNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ dnl if no exec_prefix given, then use prefix
+ if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+ fi
+
+ full_var="$FROM_VAR"
+ dnl loop until it doesn't change anymore
+ while true; do
+ new_full_var="`eval echo $full_var`"
+ if test "x$new_full_var" = "x$full_var"; then break; fi
+ full_var=$new_full_var
+ done
+
+ dnl clean up
+ full_var=$new_full_var
+ AC_SUBST([$1], "$full_var")
+
+ dnl restore prefix and exec_prefix
+ prefix=$prefix_save
+ exec_prefix=$exec_prefix_save
+])
diff --git a/debian/opensync/opensync-0.22/aclocal.m4 b/debian/opensync/opensync-0.22/aclocal.m4
new file mode 100644
index 00000000..46089190
--- /dev/null
+++ b/debian/opensync/opensync-0.22/aclocal.m4
@@ -0,0 +1,7413 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 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.
+
+# 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.
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 48 Debian 1.5.22-4 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_deplibs'
+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_outfile=conftest.$ac_objext
+printf "$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_outfile=conftest.$ac_objext
+printf "$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_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-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])
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{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_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The 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
+ ;;
+ *)
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+ = "XX$teststring") >/dev/null 2>&1 &&
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _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_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{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"
+ 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_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+else
+ 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`'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${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
+ ;;
+ freebsd*) # from 4.6 on
+ 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'
+ ;;
+
+interix3*)
+ 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
+
+ # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $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'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_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"
+ ;;
+
+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_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 recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="ifelse([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** 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@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the 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 recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+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'.
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+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
+ ;;
+
+interix3*)
+ # 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* | netbsdelf*-gnu)
+ 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
+ ;;
+
+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;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_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;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# 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
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ 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@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` $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 -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+
+ 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(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ ;;
+ *)
+ _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
+ ;;
+ interix3*)
+ _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'
+ ;;
+ 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* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ ;;
+ osf3*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # 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 C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker. We must also pass each convience library through
+ # to the system linker between allextract/defaultextract.
+ # The C++ compiler will combine linker options so we
+ # cannot just pass the convience library names through
+ # without $wl.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}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'
+ 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
+interix3*)
+ # 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)=
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # 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.
+ _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ ;;
+ 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\n return\n end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=" program t\n end\n"
+
+# 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 {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_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 }\n'
+
+# 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(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
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@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_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+ case $host_os in
+ aix3*)
+ cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+EOF
+ ;;
+ 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([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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | os2* | pw32*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix3*)
+ # 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'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ 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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ interix3*)
+ # 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* | 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'
+ ;;
+ 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'
+ ;;
+
+ 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_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'
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _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@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@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/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--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
+ ;;
+
+ interix3*)
+ _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'
+ ;;
+
+ 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
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ 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
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ 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` $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 -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+
+ 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* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $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
+ ;;
+
+ 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 linker options so we
+ # cannot just pass the convience library names through
+ # without $wl, iff we do not link with $LD.
+ # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ case $wlarc in
+ '')
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ *)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ esac ;;
+ 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*)
+ _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*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ 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)
+])
+
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && 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_MSG_RESULT([$SED])
+])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@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 "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+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 --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ 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://www.freedesktop.org/software/pkgconfig>.])],
+ [$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 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.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.9.6])])
+
+# 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`
+])
+
+
+# Copyright (C) 1996, 1997, 1999, 2000, 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 4
+
+# This was merged into AC_PROG_CC in Autoconf.
+
+AU_DEFUN([AM_PROG_CC_STDC],
+[AC_PROG_CC
+AC_DIAGNOSE([obsolete], [$0:
+ your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
+ `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
+ you adjust the code. You can also remove the above call to
+ AC_PROG_CC if you already called it elsewhere.])
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+])
+AU_DEFUN([fp_PROG_CC_STDC])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 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 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+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
+# 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
+
+# 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], 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/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])
+])
+
+# 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.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /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
+# 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 12
+
+# 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.58])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# 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-"$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])])
+
+# 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
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 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_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
+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 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 whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake. There are at least two reasons why we must not
+# use `-m 0755':
+# - it causes special bits like SGID to be ignored,
+# - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out. Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 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])])
+
+# 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="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# 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([acinclude.m4])
diff --git a/debian/opensync/opensync-0.22/config.guess b/debian/opensync/opensync-0.22/config.guess
new file mode 100755
index 00000000..396482d6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/config.guess
@@ -0,0 +1,1500 @@
+#! /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 Free Software Foundation,
+# Inc.
+
+timestamp='2006-07-02'
+
+# 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@bothner.com>.
+# Please send patches to <config-patches@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@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
+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@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 ;;
+ *) 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@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.*:*)
+ 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:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/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 ;;
+ i*: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 ;;
+ x86:Interix*:[3456]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[3456]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&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:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 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 ;;
+ 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@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ 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 ;;
+ 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@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:
diff --git a/debian/opensync/opensync-0.22/config.h.in b/debian/opensync/opensync-0.22/config.h.in
new file mode 100644
index 00000000..ff76794a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/config.h.in
@@ -0,0 +1,76 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Stress Testing */
+#undef BUILD_ENGINE
+
+/* Debugging */
+#undef ENABLE_DEBUG
+
+/* Profiling */
+#undef ENABLE_PROF
+
+/* Tracing */
+#undef ENABLE_TRACE
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* 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 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
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Compiling on Linux */
+#undef LINUX
+
+/* Full path to osplugin binary */
+#undef OSPLUGIN
+
+/* 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
+
+/* Compiling on Solaris */
+#undef SOLARIS
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
diff --git a/debian/opensync/opensync-0.22/config.sub b/debian/opensync/opensync-0.22/config.sub
new file mode 100755
index 00000000..fab0aa35
--- /dev/null
+++ b/debian/opensync/opensync-0.22/config.sub
@@ -0,0 +1,1616 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-09-20'
+
+# 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@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@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+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 \
+ | 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 \
+ | 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-* | 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 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
+ ;;
+ 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
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ 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
+ ;;
+ 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
+ ;;
+ 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
+ ;;
+ 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
+ ;;
+ 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
+ ;;
+ 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*)
+ # 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
+ ;;
+ 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:
diff --git a/debian/opensync/opensync-0.22/configure b/debian/opensync/opensync-0.22/configure
new file mode 100755
index 00000000..17ecf6c9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/configure
@@ -0,0 +1,23862 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for OpenSync 0.22.
+#
+# 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@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='OpenSync'
+PACKAGE_TARNAME='libopensync'
+PACKAGE_VERSION='0.22'
+PACKAGE_STRING='OpenSync 0.22'
+PACKAGE_BUGREPORT=''
+
+ac_unique_file="opensync/opensync.h"
+# 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
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+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
+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
+CPP
+GREP
+EGREP
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+LN_S
+ECHO
+AR
+RANLIB
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+CXXCPP
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+YACC
+YFLAGS
+OPENSYNC_CONFIGDIR
+OPENSYNC_PLUGINDIR
+OPENSYNC_FORMATSDIR
+OPENSYNC_HEADERDIR
+OPENSYNC_ENGINEHEADERDIR
+OSPLUGIN
+BUILD_ENGINE
+BUILD_ENGINE_TRUE
+BUILD_ENGINE_FALSE
+ENABLE_DEBUG
+ENABLE_TRACE
+GCOV_CFLAGS
+GCOV_LDFLAGS
+ENABLE_PROF_TRUE
+ENABLE_PROF_FALSE
+ENABLE_TOOLS_TRUE
+ENABLE_TOOLS_FALSE
+PKG_CONFIG
+XML_CFLAGS
+XML_LIBS
+CHECK_CFLAGS
+CHECK_LIBS
+ENABLE_TESTS_TRUE
+ENABLE_TESTS_FALSE
+PYTHON
+PYTHON_VERSION
+PYTHON_PREFIX
+PYTHON_EXEC_PREFIX
+PYTHON_PLATFORM
+pythondir
+pkgpythondir
+pyexecdir
+pkgpyexecdir
+PYTHON_INCLUDES
+SWIG
+SWIG_LIB
+PYTHON_CPPFLAGS
+PYTHON_LDFLAGS
+PYTHON_SITE_PKG
+PYTHON_EXTRA_LIBS
+SWIG_PYTHON_OPT
+SWIG_PYTHON_CPPFLAGS
+HAVE_PYTHON_TRUE
+HAVE_PYTHON_FALSE
+PACKAGE_CFLAGS
+PACKAGE_LIBS
+ac_workaround_abs_builddir
+ac_workaround_abs_srcdir
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+F77
+FFLAGS
+YACC
+YFLAGS
+PKG_CONFIG
+XML_CFLAGS
+XML_LIBS
+PACKAGE_CFLAGS
+PACKAGE_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_TARNAME}'
+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 OpenSync 0.22 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/libopensync]
+ --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
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of OpenSync 0.22:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-static[=PKGS] build static libraries [default=no]
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-engine enable building of the opensync engine
+ --enable-debug enable debug messages
+ --enable-tracing enable tracing
+ --enable-profiling enable code profiling
+ --enable-tools enables building of the tools
+ --enable-unit-tests enable unit tests
+ --enable-python[=minimum_version]
+ build python bindings
+
+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-check=PATH prefix where check is installed default=auto
+
+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>
+ CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
+ F77 Fortran 77 compiler command
+ FFLAGS Fortran 77 compiler flags
+ YACC The `Yet Another C Compiler' implementation to use. Defaults to
+ the first program found out of: `bison -y', `byacc', `yacc'.
+ YFLAGS The list of arguments that will be passed by default to $YACC.
+ This script will default YFLAGS to the empty string to avoid a
+ default value of `-d' given by some make applications.
+ PKG_CONFIG path to pkg-config utility
+ XML_CFLAGS C compiler flags for XML, overriding pkg-config
+ XML_LIBS linker flags for XML, overriding pkg-config
+ PACKAGE_CFLAGS
+ C compiler flags for PACKAGE, overriding pkg-config
+ PACKAGE_LIBS
+ linker flags for PACKAGE, 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
+OpenSync configure 0.22
+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 OpenSync $as_me 0.22, 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
+
+
+
+am__api_version="1.9"
+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
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ # We used to keeping the `.' as first argument, in order to
+ # allow $(mkdir_p) to be used without argument. As in
+ # $(mkdir_p) $(somedir)
+ # where $(somedir) is conditionally defined. However this is wrong
+ # for two reasons:
+ # 1. if the package is installed by a user who cannot write `.'
+ # make install will fail,
+ # 2. the above comment should most certainly read
+ # $(mkdir_p) $(DESTDIR)$(somedir)
+ # so it does not work when $(somedir) is undefined and
+ # $(DESTDIR) is not.
+ # To support the latter case, we have to write
+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+ # so the `.' trick is pointless.
+ mkdir_p='mkdir -p --'
+else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ for d in ./-p ./--version;
+ do
+ test -d $d && rmdir $d
+ done
+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+ if test -f "$ac_aux_dir/mkinstalldirs"; then
+ mkdir_p='$(mkinstalldirs)'
+ else
+ mkdir_p='$(install_sh) -d'
+ fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+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
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+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='libopensync'
+ VERSION='0.22'
+
+
+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-"$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@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@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+#### Defaults #####
+WITH_DEBUG=yes
+WITH_TRACE=yes
+ENABLE_ENGINE=yes
+ENABLE_TESTS=no
+WITH_TOOLS=yes
+WITH_PROF=no
+
+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
+
+
+
+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@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@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@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@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
+
+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/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
+
+
+
+{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$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 strerror ();
+int
+main ()
+{
+return strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' cposix; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ 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_search_strerror=$ac_res
+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
+ if test "${ac_cv_search_strerror+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_strerror+set}" = set; then
+ :
+else
+ ac_cv_search_strerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
+ac_res=$ac_cv_search_strerror
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -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@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@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@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@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); }
+
+{ 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
+
+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/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
+
+
+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@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@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@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@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); }
+
+{ 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
+
+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/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
+
+
+
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+
+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 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"
+
+
+{ 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
+
+# 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=no
+fi
+
+
+
+# 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-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
+
+
+# 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 a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && 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; }
+
+
+# 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
+
+
+{ 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 recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+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'.
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+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
+ ;;
+
+interix3*)
+ # 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* | netbsdelf*-gnu)
+ 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
+ ;;
+
+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 6432 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-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
+
+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@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@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=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
+
+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/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
+
+
+
+
+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@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@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
+ ;;
+ *)
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+ = "XX$teststring") >/dev/null 2>&1 &&
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ ;;
+ esac
+
+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@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@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@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@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@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@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_deplibs'
+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@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@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;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# 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
+printf "$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
+printf "$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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8754: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8758: \$? = $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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ interix3*)
+ # 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* | 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'
+ ;;
+ esac
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ 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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:9022: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:9026: \$? = $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"
+ printf "$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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:9126: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:9130: \$? = $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@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@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/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--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
+ ;;
+
+ interix3*)
+ 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'
+ ;;
+
+ 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
+ archive_cmds='$CC -shared'"$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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ link_all_deplibs=no
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ 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
+ hardcode_direct=yes
+ 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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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` $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 -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ 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* | netbsdelf*-gnu)
+ 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*)
+ 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
+ ;;
+
+ 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 linker options so we
+ # cannot just pass the convience library names through
+ # without $wl, iff we do not link with $LD.
+ # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ case $wlarc in
+ '')
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ *)
+ whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ esac ;;
+ 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*)
+ 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*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 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
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# 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`'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${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
+ ;;
+ freebsd*) # from 4.6 on
+ 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'
+ ;;
+
+interix3*)
+ 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
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $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'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_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"
+ ;;
+
+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"
+ { 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 11423 "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 11523 "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 \
+ 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
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@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="$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;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# 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
+printf "$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
+printf "$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
+ hardcode_direct_CXX=yes
+ 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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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@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` $verstring'
+ module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # 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*)
+ hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+ ;;
+ *)
+ 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
+ ;;
+ interix3*)
+ 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'
+ ;;
+ 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* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+ openbsd*)
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ ;;
+ osf3*)
+ case $cc_basename in
+ 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 C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker. We must also pass each convience library through
+ # to the system linker between allextract/defaultextract.
+ # The C++ compiler will combine linker options so we
+ # cannot just pass the convience library names through
+ # without $wl.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}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'
+ 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
+interix3*)
+ # 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=
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # 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.
+ postdeps_CXX='-lCstd -lCrun'
+ ;;
+ 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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | os2* | pw32*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_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=
+ ;;
+ interix3*)
+ # 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'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ 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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:13859: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:13863: \$? = $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"
+ printf "$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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:13963: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:13967: \$? = $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'
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs_CXX=no
+ ;;
+ *)
+ 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*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 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"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# 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`'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${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
+ ;;
+ freebsd*) # from 4.6 on
+ 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'
+ ;;
+
+interix3*)
+ 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
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $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'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_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"
+ ;;
+
+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 \
+ 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="$fix_srcfile_path_CXX"
+
+# 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\n return\n end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=" program t\n end\n"
+
+# 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
+printf "$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
+printf "$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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_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'
+ ;;
+
+ interix3*)
+ # 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* | 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'
+ ;;
+ esac
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # All OSF/1 code is PIC.
+ 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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_F77"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:15524: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:15528: \$? = $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"
+ printf "$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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:15628: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:15632: \$? = $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@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@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/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--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
+ ;;
+
+ interix3*)
+ 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'
+ ;;
+
+ 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
+ archive_cmds_F77='$CC -shared'"$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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ link_all_deplibs_F77=no
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ 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
+ hardcode_direct_F77=yes
+ 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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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` $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 -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs_F77=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ archive_cmds_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* | netbsdelf*-gnu)
+ 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*)
+ 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
+ ;;
+
+ 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 linker options so we
+ # cannot just pass the convience library names through
+ # without $wl, iff we do not link with $LD.
+ # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ case $wlarc in
+ '')
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+ *)
+ whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ esac ;;
+ 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*)
+ 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*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 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"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# 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`'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${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
+ ;;
+ freebsd*) # from 4.6 on
+ 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'
+ ;;
+
+interix3*)
+ 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
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $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'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_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"
+ ;;
+
+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 \
+ 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="$fix_srcfile_path_F77"
+
+# 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 {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# 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
+printf "$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
+printf "$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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:17815: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:17819: \$? = $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* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_GCJ='-fno-common'
+ ;;
+
+ interix3*)
+ # 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* | 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'
+ ;;
+ esac
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ # All OSF/1 code is PIC.
+ 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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:18083: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:18087: \$? = $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"
+ printf "$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
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:18187: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:18191: \$? = $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@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@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/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--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
+ ;;
+
+ interix3*)
+ 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'
+ ;;
+
+ 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
+ archive_cmds_GCJ='$CC -shared'"$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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ link_all_deplibs_GCJ=no
+ else
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ 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
+ hardcode_direct_GCJ=yes
+ else
+ # We have old collect2
+ hardcode_direct_GCJ=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_GCJ=yes
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ hardcode_libdir_separator_GCJ=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ 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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+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` $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 -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs_GCJ=no
+ ;;
+ esac
+ fi
+ ;;
+
+ 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* | netbsdelf*-gnu)
+ 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*)
+ 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
+ ;;
+
+ 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 linker options so we
+ # cannot just pass the convience library names through
+ # without $wl, iff we do not link with $LD.
+ # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ case $wlarc in
+ '')
+ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+ *)
+ whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+ esac ;;
+ 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*)
+ 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*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 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"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# 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`'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${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
+ ;;
+ freebsd*) # from 4.6 on
+ 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'
+ ;;
+
+interix3*)
+ 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
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $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'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_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"
+ ;;
+
+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 \
+ 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="$fix_srcfile_path_GCJ"
+
+# 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 }\n'
+
+# 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
+printf "$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
+printf "$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 \
+ 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="$fix_srcfile_path_RC"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_prog in 'bison -y' byacc
+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_YACC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # 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_YACC="$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
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ { echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+OPENSYNC_CONFIGDIR=${datadir}/opensync/defaults
+
+
+OPENSYNC_PLUGINDIR=${libdir}/opensync/plugins
+
+
+OPENSYNC_FORMATSDIR=${libdir}/opensync/formats
+
+
+OPENSYNC_HEADERDIR=${includedir}/opensync-1.0/opensync
+
+
+OPENSYNC_ENGINEHEADERDIR=${includedir}/opensync-1.0/osengine
+
+
+
+ EXP_VAR=OSPLUGIN
+ FROM_VAR=$libexecdir/osplugin
+
+ prefix_save=$prefix
+ exec_prefix_save=$exec_prefix
+
+ if test "x$prefix" = "xNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+ fi
+
+ full_var="$FROM_VAR"
+ while true; do
+ new_full_var="`eval echo $full_var`"
+ if test "x$new_full_var" = "x$full_var"; then break; fi
+ full_var=$new_full_var
+ done
+
+ full_var=$new_full_var
+ OSPLUGIN="$full_var"
+
+
+ prefix=$prefix_save
+ exec_prefix=$exec_prefix_save
+
+
+cat >>confdefs.h <<_ACEOF
+#define OSPLUGIN "${OSPLUGIN}"
+_ACEOF
+
+
+# Check whether --enable-engine was given.
+if test "${enable_engine+set}" = set; then
+ enableval=$enable_engine; ENABLE_ENGINE=$enableval
+fi
+
+if test "x${ENABLE_ENGINE}" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define BUILD_ENGINE 1
+_ACEOF
+
+fi
+
+
+
+if test x$ENABLE_ENGINE = xyes; then
+ BUILD_ENGINE_TRUE=
+ BUILD_ENGINE_FALSE='#'
+else
+ BUILD_ENGINE_TRUE='#'
+ BUILD_ENGINE_FALSE=
+fi
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval=$enable_debug; WITH_DEBUG=$enableval
+fi
+
+if test "x${WITH_DEBUG}" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_DEBUG 1
+_ACEOF
+
+
+fi
+
+# Check whether --enable-tracing was given.
+if test "${enable_tracing+set}" = set; then
+ enableval=$enable_tracing; WITH_TRACE=$enableval
+fi
+
+if test "x${WITH_TRACE}" = "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_TRACE 1
+_ACEOF
+
+
+fi
+
+# Check whether --enable-profiling was given.
+if test "${enable_profiling+set}" = set; then
+ enableval=$enable_profiling; WITH_PROF=$enableval
+fi
+
+if test "x${WITH_PROF}" = "xyes"; then
+ GCOV_CFLAGS=" -I/usr/lib/tau/include -DPROFILING_ON -DTAU_STDCXXLIB -DTAU_GNU -DTAU_DOT_H_LESS_HEADERS -fPIC -DPTHREADS"
+ GCOV_LDFLAGS=" -L/usr/lib/tau/i386_linux/lib -ltau-pthread -lstdc++"
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_PROF 1
+_ACEOF
+
+else
+ GCOV_CFLAGS=""
+ GCOV_LDFLAGS=""
+fi
+
+
+
+
+if test "x${WITH_PROF}" = "xyes"; then
+ ENABLE_PROF_TRUE=
+ ENABLE_PROF_FALSE='#'
+else
+ ENABLE_PROF_TRUE='#'
+ ENABLE_PROF_FALSE=
+fi
+
+
+# Check whether --enable-tools was given.
+if test "${enable_tools+set}" = set; then
+ enableval=$enable_tools; WITH_TOOLS=$enableval
+fi
+
+
+
+if test "x${WITH_TOOLS}" = "xyes"; then
+ ENABLE_TOOLS_TRUE=
+ ENABLE_TOOLS_FALSE='#'
+else
+ ENABLE_TOOLS_TRUE='#'
+ ENABLE_TOOLS_FALSE=
+fi
+
+
+#### Check for libxml ####
+
+
+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@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@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 XML" >&5
+echo $ECHO_N "checking for XML... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$XML_CFLAGS"; then
+ pkg_cv_XML_CFLAGS="$XML_CFLAGS"
+ else
+ 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_XML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$XML_LIBS"; then
+ pkg_cv_XML_LIBS="$XML_LIBS"
+ else
+ 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_XML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ 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
+ XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libxml-2.0"`
+ else
+ XML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$XML_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (libxml-2.0) were not met:
+
+$XML_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 XML_CFLAGS
+and XML_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:
+
+$XML_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 XML_CFLAGS
+and XML_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 XML_CFLAGS
+and XML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+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 XML_CFLAGS
+and XML_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ XML_CFLAGS=$pkg_cv_XML_CFLAGS
+ XML_LIBS=$pkg_cv_XML_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+fi
+
+
+
+#### Check for unit tests ####
+# Check whether --enable-unit-tests was given.
+if test "${enable_unit_tests+set}" = set; then
+ enableval=$enable_unit_tests; ENABLE_TESTS=$enableval
+fi
+
+testdir=""
+if test "x${ENABLE_TESTS}" = "xyes"; then
+ if test "${ac_cv_header_check_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for check.h" >&5
+echo $ECHO_N "checking for check.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_check_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_check_h" >&5
+echo "${ECHO_T}$ac_cv_header_check_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking check.h usability" >&5
+echo $ECHO_N "checking check.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 <check.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 check.h presence" >&5
+echo $ECHO_N "checking check.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 <check.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: check.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: check.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: check.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: check.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: check.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: check.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: check.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: check.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: check.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: check.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: check.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: check.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: check.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: check.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: check.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: check.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for check.h" >&5
+echo $ECHO_N "checking for check.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_check_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_check_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_check_h" >&5
+echo "${ECHO_T}$ac_cv_header_check_h" >&6; }
+
+fi
+if test $ac_cv_header_check_h = yes; then
+ HAVE_CHECK=1
+else
+ HAVE_CHECK=0
+fi
+
+
+ if test "x${HAVE_CHECK}" = "x1"; then
+
+
+# Check whether --with-check was given.
+if test "${with_check+set}" = set; then
+ withval=$with_check;
+fi
+
+
+ min_check_version=0.9.0
+
+ { echo "$as_me:$LINENO: checking for check - version >= $min_check_version" >&5
+echo $ECHO_N "checking for check - version >= $min_check_version... $ECHO_C" >&6; }
+
+ if test x$with_check = xno; then
+ { echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6; }
+ { { echo "$as_me:$LINENO: error: disabling check is not supported" >&5
+echo "$as_me: error: disabling check is not supported" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ if test "x$with_check" != x; then
+ CHECK_CFLAGS="-I$with_check/include"
+ CHECK_LIBS="-L$with_check/lib -lcheck"
+ else
+ CHECK_CFLAGS=""
+ CHECK_LIBS="-lcheck"
+ fi
+
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+
+ CFLAGS="$CFLAGS $CHECK_CFLAGS"
+ LIBS="$CHECK_LIBS $LIBS"
+
+ rm -f conf.check-test
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <check.h>
+
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+
+int main ()
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ system ("touch conf.check-test");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = strdup("$min_check_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_check_version");
+ return 1;
+ }
+
+ if ((CHECK_MAJOR_VERSION != check_major_version) ||
+ (CHECK_MINOR_VERSION != check_minor_version) ||
+ (CHECK_MICRO_VERSION != check_micro_version))
+ {
+ printf("\n*** The check header file (version %d.%d.%d) does not match\n",
+ CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
+ printf("*** the check library (version %d.%d.%d).\n",
+ check_major_version, check_minor_version, check_micro_version);
+ return 1;
+ }
+
+ if ((check_major_version > major) ||
+ ((check_major_version == major) && (check_minor_version > minor)) ||
+ ((check_major_version == major) && (check_minor_version == minor) && (check_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of check (%d.%d.%d) was found.\n",
+ check_major_version, check_minor_version, check_micro_version);
+ printf("*** You need a version of check being at least %d.%d.%d.\n", major, minor, micro);
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the check library and header\n");
+ printf("*** file is being found. Rerun configure with the --with-check=PATH option\n");
+ printf("*** to specify the prefix where the correct version was installed.\n");
+ }
+
+ return 1;
+}
+
+_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 )
+no_check=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+
+ if test "x$no_check" = x ; 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; }
+ if test -f conf.check-test ; then
+ :
+ else
+ echo "*** Could not run check test program, checking why..."
+ CFLAGS="$CFLAGS $CHECK_CFLAGS"
+ LIBS="$CHECK_LIBS $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <check.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
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding check. You'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "*** The test program failed to compile or link. See the file config.log for"
+ echo "*** the exact error that occured."
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ CHECK_CFLAGS=""
+ CHECK_LIBS=""
+
+ rm -f conf.check-test
+ { { echo "$as_me:$LINENO: error: check not found" >&5
+echo "$as_me: error: check not found" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+
+
+
+ rm -f conf.check-test
+
+ fi
+
+ fi
+
+fi
+
+
+if test x$HAVE_CHECK = x1; then
+ ENABLE_TESTS_TRUE=
+ ENABLE_TESTS_FALSE='#'
+else
+ ENABLE_TESTS_TRUE='#'
+ ENABLE_TESTS_FALSE=
+fi
+
+
+#### Check for Python and Swig ####
+#(need python, python headers, and pyrex)
+# Check whether --enable-python was given.
+if test "${enable_python+set}" = set; then
+ enableval=$enable_python; enable_python=$enableval
+else
+ enable_python=auto
+fi
+
+
+if test x$enable_python = xno; then
+ have_python=no
+else
+ { echo "$as_me:$LINENO: Checking to see if we can build Python bindings" >&5
+echo "$as_me: Checking to see if we can build Python bindings" >&6;}
+ have_python=no
+ if test x$enable_python != xyes -a x$enable_python != xauto; then
+ minimum_version=$enable_python
+ enable_python=yes
+ else
+ minimum_version=2.2
+ fi
+
+
+
+
+ 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 >= $minimum_version" >&5
+echo $ECHO_N "checking whether $PYTHON version >= $minimum_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('$minimum_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
+
+ else
+ # Otherwise, try each interpreter until we find one that satisfies
+ # VERSION.
+ { echo "$as_me:$LINENO: checking for a Python interpreter with version >= $minimum_version" >&5
+echo $ECHO_N "checking for a Python interpreter with version >= $minimum_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.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 : ; do
+ if test "$am_cv_pathless_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; }; }
+ fi
+ 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('$minimum_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.
+ # 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
+
+
+ am_display_PYTHON=$am_cv_pathless_PYTHON
+ fi
+
+
+
+ { 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(1,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
+
+
+
+{ echo "$as_me:$LINENO: checking for headers required to compile python extensions" >&5
+echo $ECHO_N "checking for headers required to compile python extensions... $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; }
+have_python_header=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; }
+have_python_header=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+CPPFLAGS="$save_CPPFLAGS"
+
+
+ if test x$have_python_header = xno ; then
+ if test x$enable_python = xyes ; then
+ { { echo "$as_me:$LINENO: error: Building python explicitly requested, but can't build python bindings" >&5
+echo "$as_me: error: Building python explicitly requested, but can't build python bindings" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ else
+ if test -z "$PYTHON" ; then
+ { echo "$as_me:$LINENO: WARNING: Python not found" >&5
+echo "$as_me: WARNING: Python not found" >&2;}
+ else
+
+ # 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 "1.3.17" ; 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=1.3.17
+ 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 >= 1.3.17 is required. You have $swig_version. You should look at http://www.swig.org" >&5
+echo "$as_me: WARNING: SWIG version >= 1.3.17 is required. You have $swig_version. You should look at http://www.swig.org" >&2;}
+ SWIG='echo "Error: SWIG version >= 1.3.17 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+ else
+ { echo "$as_me:$LINENO: SWIG executable is '$SWIG'" >&5
+echo "$as_me: SWIG executable is '$SWIG'" >&6;}
+ SWIG_LIB=`$SWIG -swiglib`
+ { echo "$as_me:$LINENO: SWIG library directory is '$SWIG_LIB'" >&5
+echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;}
+ 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'
+ fi
+ fi
+
+
+
+ #
+ # should allow for checking of python version here...
+ #
+
+
+ # Check for Python include path
+ { echo "$as_me:$LINENO: checking for Python include path" >&5
+echo $ECHO_N "checking for Python include path... $ECHO_C" >&6; }
+ python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+ for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
+ python_path=`find $i -type f -name Python.h -print | sed "1q"`
+ if test -n "$python_path" ; then
+ break
+ fi
+ done
+ python_path=`echo $python_path | sed "s,/Python.h$,,"`
+ { echo "$as_me:$LINENO: result: $python_path" >&5
+echo "${ECHO_T}$python_path" >&6; }
+ if test -z "$python_path" ; then
+ { { echo "$as_me:$LINENO: error: cannot find Python include path" >&5
+echo "$as_me: error: cannot find Python include path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PYTHON_CPPFLAGS=-I$python_path
+
+
+ # Check for Python library path
+ { echo "$as_me:$LINENO: checking for Python library path" >&5
+echo $ECHO_N "checking for Python library path... $ECHO_C" >&6; }
+ python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+ for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
+ python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
+ if test -n "$python_path" ; then
+ break
+ fi
+ done
+ python_path=`echo $python_path | sed "s,/libpython.*$,,"`
+ { echo "$as_me:$LINENO: result: $python_path" >&5
+echo "${ECHO_T}$python_path" >&6; }
+ if test -z "$python_path" ; then
+ { { echo "$as_me:$LINENO: error: cannot find Python library path" >&5
+echo "$as_me: error: cannot find Python library path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PYTHON_LDFLAGS="-L$python_path -lpython$PYTHON_VERSION"
+
+ #
+ python_site=`echo $python_path | sed "s/config/site-packages/"`
+ PYTHON_SITE_PKG=$python_site
+
+ #
+ # libraries which must be linked in when embedding
+ #
+ { echo "$as_me:$LINENO: checking python extra libraries" >&5
+echo $ECHO_N "checking python extra libraries... $ECHO_C" >&6; }
+ PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
+ conf = distutils.sysconfig.get_config_var; \
+ print conf('LOCALMODLIBS')+' '+conf('LIBS')"
+ { echo "$as_me:$LINENO: result: $PYTHON_EXTRA_LIBS" >&5
+echo "${ECHO_T}$PYTHON_EXTRA_LIBS" >&6; }`
+
+
+
+
+
+ test "x" != "xno" || swig_shadow=" -noproxy"
+ SWIG_PYTHON_OPT=-python$swig_shadow
+
+ SWIG_PYTHON_CPPFLAGS=$PYTHON_CPPFLAGS
+
+
+ if test x$SWIG_LIB = x; then
+ have_python=no
+ else
+ have_python=yes
+ fi
+ fi
+
+ if test x$have_python = xno ; then
+ if test x$enable_python = xyes ; then
+ { { echo "$as_me:$LINENO: error: Building python explicitly requested, but can't build python bindings" >&5
+echo "$as_me: error: Building python explicitly requested, but can't build python bindings" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+ fi
+fi
+
+
+if test x$have_python = xyes; then
+ HAVE_PYTHON_TRUE=
+ HAVE_PYTHON_FALSE='#'
+else
+ HAVE_PYTHON_TRUE='#'
+ HAVE_PYTHON_FALSE=
+fi
+
+
+#### Check for glib and sqlite ####
+pkg_modules="glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 sqlite3"
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for PACKAGE" >&5
+echo $ECHO_N "checking for PACKAGE... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$PACKAGE_CFLAGS"; then
+ pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\"") >&5
+ ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$PACKAGE_LIBS"; then
+ pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\"") >&5
+ ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ 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
+ PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$pkg_modules"`
+ else
+ PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$PACKAGE_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements ($pkg_modules) were not met:
+
+$PACKAGE_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 PACKAGE_CFLAGS
+and PACKAGE_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 ($pkg_modules) were not met:
+
+$PACKAGE_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 PACKAGE_CFLAGS
+and PACKAGE_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 PACKAGE_CFLAGS
+and PACKAGE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+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 PACKAGE_CFLAGS
+and PACKAGE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS
+ PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+fi
+
+
+
+# Workaround for autoconf 2.58, in which abs_builddir/abs_srcdir are not
+# absolute at all.
+# These are used in *-uninstalled.pc.in
+ac_workaround_abs_builddir=$PWD
+ # builddir is defined as '.'
+ac_workaround_abs_srcdir=$PWD/$srcdir
+
+
+#### Check for Solaris (SunOS) ####
+OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+if test "$OS" = "sunos"; then
+ { echo "$as_me:$LINENO: OS Solaris detected" >&5
+echo "$as_me: OS Solaris detected" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define SOLARIS
+_ACEOF
+
+else
+ if test "$OS" = "linux"; then
+ { echo "$as_me:$LINENO: OS Linux detected" >&5
+echo "$as_me: OS Linux detected" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LINUX
+_ACEOF
+
+ else
+ { echo "$as_me:$LINENO: Unknown OS detected" >&5
+echo "$as_me: Unknown OS detected" >&6;}
+ fi
+fi
+
+
+ac_config_files="$ac_config_files Makefile opensync/Makefile tools/Makefile tests/Makefile tests/mock-plugin/Makefile formats/Makefile formats/vformats-xml/Makefile osengine/Makefile osplugin/Makefile opensync-1.0.pc opensync-1.0-uninstalled.pc osengine-1.0.pc osengine-1.0-uninstalled.pc Doxyfile wrapper/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# 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 "${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__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__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
+if test -z "${BUILD_ENGINE_TRUE}" && test -z "${BUILD_ENGINE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"BUILD_ENGINE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"BUILD_ENGINE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_PROF_TRUE}" && test -z "${ENABLE_PROF_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"ENABLE_PROF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_PROF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_TOOLS_TRUE}" && test -z "${ENABLE_TOOLS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"ENABLE_TOOLS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_TOOLS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_TESTS_TRUE}" && test -z "${ENABLE_TESTS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"ENABLE_TESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_TESTS\" 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 OpenSync $as_me 0.22, 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@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+OpenSync config.status 0.22
+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'
+_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"
+
+_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" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "opensync/Makefile") CONFIG_FILES="$CONFIG_FILES opensync/Makefile" ;;
+ "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "tests/mock-plugin/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mock-plugin/Makefile" ;;
+ "formats/Makefile") CONFIG_FILES="$CONFIG_FILES formats/Makefile" ;;
+ "formats/vformats-xml/Makefile") CONFIG_FILES="$CONFIG_FILES formats/vformats-xml/Makefile" ;;
+ "osengine/Makefile") CONFIG_FILES="$CONFIG_FILES osengine/Makefile" ;;
+ "osplugin/Makefile") CONFIG_FILES="$CONFIG_FILES osplugin/Makefile" ;;
+ "opensync-1.0.pc") CONFIG_FILES="$CONFIG_FILES opensync-1.0.pc" ;;
+ "opensync-1.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES opensync-1.0-uninstalled.pc" ;;
+ "osengine-1.0.pc") CONFIG_FILES="$CONFIG_FILES osengine-1.0.pc" ;;
+ "osengine-1.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES osengine-1.0-uninstalled.pc" ;;
+ "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
+ "wrapper/Makefile") CONFIG_FILES="$CONFIG_FILES wrapper/Makefile" ;;
+
+ *) { { 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
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$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
+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
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$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
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+LN_S!$LN_S$ac_delim
+ECHO!$ECHO$ac_delim
+AR!$AR$ac_delim
+RANLIB!$RANLIB$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
+CXXCPP!$CXXCPP$ac_delim
+F77!$F77$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
+FFLAGS!$FFLAGS$ac_delim
+ac_ct_F77!$ac_ct_F77$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+YACC!$YACC$ac_delim
+YFLAGS!$YFLAGS$ac_delim
+OPENSYNC_CONFIGDIR!$OPENSYNC_CONFIGDIR$ac_delim
+OPENSYNC_PLUGINDIR!$OPENSYNC_PLUGINDIR$ac_delim
+OPENSYNC_FORMATSDIR!$OPENSYNC_FORMATSDIR$ac_delim
+OPENSYNC_HEADERDIR!$OPENSYNC_HEADERDIR$ac_delim
+OPENSYNC_ENGINEHEADERDIR!$OPENSYNC_ENGINEHEADERDIR$ac_delim
+OSPLUGIN!$OSPLUGIN$ac_delim
+BUILD_ENGINE!$BUILD_ENGINE$ac_delim
+BUILD_ENGINE_TRUE!$BUILD_ENGINE_TRUE$ac_delim
+BUILD_ENGINE_FALSE!$BUILD_ENGINE_FALSE$ac_delim
+ENABLE_DEBUG!$ENABLE_DEBUG$ac_delim
+ENABLE_TRACE!$ENABLE_TRACE$ac_delim
+GCOV_CFLAGS!$GCOV_CFLAGS$ac_delim
+GCOV_LDFLAGS!$GCOV_LDFLAGS$ac_delim
+ENABLE_PROF_TRUE!$ENABLE_PROF_TRUE$ac_delim
+ENABLE_PROF_FALSE!$ENABLE_PROF_FALSE$ac_delim
+ENABLE_TOOLS_TRUE!$ENABLE_TOOLS_TRUE$ac_delim
+ENABLE_TOOLS_FALSE!$ENABLE_TOOLS_FALSE$ac_delim
+PKG_CONFIG!$PKG_CONFIG$ac_delim
+XML_CFLAGS!$XML_CFLAGS$ac_delim
+XML_LIBS!$XML_LIBS$ac_delim
+CHECK_CFLAGS!$CHECK_CFLAGS$ac_delim
+CHECK_LIBS!$CHECK_LIBS$ac_delim
+ENABLE_TESTS_TRUE!$ENABLE_TESTS_TRUE$ac_delim
+ENABLE_TESTS_FALSE!$ENABLE_TESTS_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
+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
+SWIG!$SWIG$ac_delim
+SWIG_LIB!$SWIG_LIB$ac_delim
+PYTHON_CPPFLAGS!$PYTHON_CPPFLAGS$ac_delim
+PYTHON_LDFLAGS!$PYTHON_LDFLAGS$ac_delim
+PYTHON_SITE_PKG!$PYTHON_SITE_PKG$ac_delim
+PYTHON_EXTRA_LIBS!$PYTHON_EXTRA_LIBS$ac_delim
+SWIG_PYTHON_OPT!$SWIG_PYTHON_OPT$ac_delim
+SWIG_PYTHON_CPPFLAGS!$SWIG_PYTHON_CPPFLAGS$ac_delim
+HAVE_PYTHON_TRUE!$HAVE_PYTHON_TRUE$ac_delim
+HAVE_PYTHON_FALSE!$HAVE_PYTHON_FALSE$ac_delim
+PACKAGE_CFLAGS!$PACKAGE_CFLAGS$ac_delim
+PACKAGE_LIBS!$PACKAGE_LIBS$ac_delim
+ac_workaround_abs_builddir!$ac_workaround_abs_builddir$ac_delim
+ac_workaround_abs_srcdir!$ac_workaround_abs_srcdir$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` = 55; 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 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
+_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
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.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_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`$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'`/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.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /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
+ ;;
+
+ 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
+
+
+
+# AC_OPENSYNC_ISENABLED(NAME, VARIABLE, [TESTFOR = yes])
+
+
+echo ""
+echo "========================================"
+
+if test ""; then
+ ac_opensync_isenabled_testfor=""
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${have_python}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo " Python Bindings: Enabled"
+else
+ echo " Python Bindings: Disabled"
+fi
+
+
+if test ""; then
+ ac_opensync_isenabled_testfor=""
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${ENABLE_TESTS}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo " Unit Tests: Enabled"
+else
+ echo " Unit Tests: Disabled"
+fi
+
+
+if test ""; then
+ ac_opensync_isenabled_testfor=""
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${WITH_DEBUG}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo " Debug messages: Enabled"
+else
+ echo " Debug messages: Disabled"
+fi
+
+
+if test ""; then
+ ac_opensync_isenabled_testfor=""
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${WITH_TRACE}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo " Tracing: Enabled"
+else
+ echo " Tracing: Disabled"
+fi
+
+
+if test ""; then
+ ac_opensync_isenabled_testfor=""
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${WITH_PROF}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo " Profiling: Enabled"
+else
+ echo " Profiling: Disabled"
+fi
+
+
+if test ""; then
+ ac_opensync_isenabled_testfor=""
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${ENABLE_ENGINE}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo " Sync Engine: Enabled"
+else
+ echo " Sync Engine: Disabled"
+fi
+
+
+if test ""; then
+ ac_opensync_isenabled_testfor=""
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${WITH_TOOLS}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo " Tools: Enabled"
+else
+ echo " Tools: Disabled"
+fi
+
+echo
+echo "Now build opensync and install it."
+echo "Afterwards go into the plugins directory"
+echo "and build the plugins you need."
+echo "========================================"
diff --git a/debian/opensync/opensync-0.22/configure.in b/debian/opensync/opensync-0.22/configure.in
new file mode 100644
index 00000000..174e1924
--- /dev/null
+++ b/debian/opensync/opensync-0.22/configure.in
@@ -0,0 +1,228 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.58)
+AC_INIT(OpenSync, 0.22, [], libopensync)
+AC_CONFIG_SRCDIR([opensync/opensync.h])
+AM_INIT_AUTOMAKE(foreign)
+AM_CONFIG_HEADER(config.h)
+
+#### Defaults #####
+WITH_DEBUG=yes
+WITH_TRACE=yes
+ENABLE_ENGINE=yes
+ENABLE_TESTS=no
+WITH_TOOLS=yes
+WITH_PROF=no
+
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_STDC
+AC_HEADER_STDC
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AC_PROG_YACC
+
+OPENSYNC_CONFIGDIR=${datadir}/opensync/defaults
+AC_SUBST(OPENSYNC_CONFIGDIR)
+
+OPENSYNC_PLUGINDIR=${libdir}/opensync/plugins
+AC_SUBST(OPENSYNC_PLUGINDIR)
+
+OPENSYNC_FORMATSDIR=${libdir}/opensync/formats
+AC_SUBST(OPENSYNC_FORMATSDIR)
+
+OPENSYNC_HEADERDIR=${includedir}/opensync-1.0/opensync
+AC_SUBST(OPENSYNC_HEADERDIR)
+
+OPENSYNC_ENGINEHEADERDIR=${includedir}/opensync-1.0/osengine
+AC_SUBST(OPENSYNC_ENGINEHEADERDIR)
+
+AS_AC_EXPAND(OSPLUGIN, $libexecdir/osplugin)
+AC_DEFINE_UNQUOTED(OSPLUGIN, ["${OSPLUGIN}"], [Full path to osplugin binary])
+
+AC_ARG_ENABLE(engine,
+ AS_HELP_STRING([--enable-engine], [enable building of the opensync engine]),
+ ENABLE_ENGINE=$enableval)
+if test "x${ENABLE_ENGINE}" = "xyes"; then
+ AC_DEFINE(BUILD_ENGINE,1,[Stress Testing])
+fi
+AC_SUBST(BUILD_ENGINE)
+AM_CONDITIONAL(BUILD_ENGINE, test x$ENABLE_ENGINE = xyes)
+
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [enable debug messages]),
+ WITH_DEBUG=$enableval)
+if test "x${WITH_DEBUG}" = "xyes"; then
+ AC_DEFINE(ENABLE_DEBUG,1,[Debugging])
+ AC_SUBST(ENABLE_DEBUG)
+fi
+
+AC_ARG_ENABLE(tracing,
+ AS_HELP_STRING([--enable-tracing], [enable tracing]),
+ WITH_TRACE=$enableval)
+if test "x${WITH_TRACE}" = "xyes"; then
+ AC_DEFINE(ENABLE_TRACE,1,[Tracing])
+ AC_SUBST(ENABLE_TRACE)
+fi
+
+AC_ARG_ENABLE(profiling,
+ AS_HELP_STRING([--enable-profiling], [enable code profiling]),
+ WITH_PROF=$enableval)
+if test "x${WITH_PROF}" = "xyes"; then
+ GCOV_CFLAGS=" -I/usr/lib/tau/include -DPROFILING_ON -DTAU_STDCXXLIB -DTAU_GNU -DTAU_DOT_H_LESS_HEADERS -fPIC -DPTHREADS"
+ GCOV_LDFLAGS=" -L/usr/lib/tau/i386_linux/lib -ltau-pthread -lstdc++"
+ AC_DEFINE(ENABLE_PROF,1,[Profiling])
+else
+ GCOV_CFLAGS=""
+ GCOV_LDFLAGS=""
+fi
+AC_SUBST(GCOV_CFLAGS)
+AC_SUBST(GCOV_LDFLAGS)
+AM_CONDITIONAL(ENABLE_PROF, test "x${WITH_PROF}" = "xyes")
+
+AC_ARG_ENABLE(tools,
+ AS_HELP_STRING([--enable-tools], [enables building of the tools]),
+ WITH_TOOLS=$enableval)
+AM_CONDITIONAL(ENABLE_TOOLS, test "x${WITH_TOOLS}" = "xyes")
+
+#### Check for libxml ####
+PKG_CHECK_MODULES(XML, [libxml-2.0])
+AC_SUBST(XML_CFLAGS)
+AC_SUBST(XML_LIBS)
+
+#### Check for unit tests ####
+AC_ARG_ENABLE(unit-tests,
+ AS_HELP_STRING([--enable-unit-tests], [enable unit tests]),
+ ENABLE_TESTS=$enableval)
+testdir=""
+if test "x${ENABLE_TESTS}" = "xyes"; then
+ AC_CHECK_HEADER(check.h,HAVE_CHECK=1,HAVE_CHECK=0)
+ if test "x${HAVE_CHECK}" = "x1"; then
+ AM_PATH_CHECK(0.9.0)
+ fi
+
+fi
+AM_CONDITIONAL(ENABLE_TESTS, test x$HAVE_CHECK = x1)
+
+#### Check for Python and Swig ####
+#(need python, python headers, and pyrex)
+AC_ARG_ENABLE(python,
+ AS_HELP_STRING([--enable-python@<:@=minimum_version@:>@], [build python bindings]),
+ [enable_python=$enableval], [enable_python=auto])
+
+if test x$enable_python = xno; then
+ have_python=no
+else
+ AC_MSG_NOTICE([Checking to see if we can build Python bindings])
+ have_python=no
+ if test x$enable_python != xyes -a x$enable_python != xauto; then
+ minimum_version=$enable_python
+ enable_python=yes
+ else
+ minimum_version=2.2
+ fi
+ AM_PATH_PYTHON($minimum_version)
+ AM_CHECK_PYTHON_HEADERS([have_python_header=yes], [have_python_header=no])
+
+ if test x$have_python_header = xno ; then
+ if test x$enable_python = xyes ; then
+ AC_MSG_ERROR([Building python explicitly requested, but can't build python bindings])
+ fi
+ else
+ if test -z "$PYTHON" ; then
+ AC_MSG_WARN([Python not found])
+ else
+ AC_PROG_SWIG(1.3.17)
+ SWIG_PYTHON
+ if test x$SWIG_LIB = x; then
+ have_python=no
+ else
+ have_python=yes
+ fi
+ fi
+
+ if test x$have_python = xno ; then
+ if test x$enable_python = xyes ; then
+ AC_MSG_ERROR([Building python explicitly requested, but can't build python bindings])
+ fi
+ fi
+ fi
+fi
+AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
+
+#### Check for glib and sqlite ####
+pkg_modules="glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 sqlite3"
+PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
+AC_SUBST(PACKAGE_CFLAGS)
+AC_SUBST(PACKAGE_LIBS)
+
+# Workaround for autoconf 2.58, in which abs_builddir/abs_srcdir are not
+# absolute at all.
+# These are used in *-uninstalled.pc.in
+AC_SUBST(ac_workaround_abs_builddir, $PWD) # builddir is defined as '.'
+AC_SUBST(ac_workaround_abs_srcdir, $PWD/$srcdir)
+
+#### Check for Solaris (SunOS) ####
+OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+if test "$OS" = "sunos"; then
+ AC_MSG_NOTICE([OS Solaris detected])
+ AC_DEFINE([SOLARIS], [], [Compiling on Solaris])
+else
+ if test "$OS" = "linux"; then
+ AC_MSG_NOTICE([OS Linux detected])
+ AC_DEFINE([LINUX], [], [Compiling on Linux])
+ else
+ AC_MSG_NOTICE([Unknown OS detected])
+ fi
+fi
+
+
+AC_OUTPUT([
+Makefile
+opensync/Makefile
+tools/Makefile
+tests/Makefile
+tests/mock-plugin/Makefile
+formats/Makefile
+formats/vformats-xml/Makefile
+osengine/Makefile
+osplugin/Makefile
+opensync-1.0.pc
+opensync-1.0-uninstalled.pc
+osengine-1.0.pc
+osengine-1.0-uninstalled.pc
+Doxyfile
+wrapper/Makefile
+])
+
+
+# AC_OPENSYNC_ISENABLED(NAME, VARIABLE, [TESTFOR = yes])
+AC_DEFUN([AC_OPENSYNC_ISENABLED],
+[
+if test "$3"; then
+ ac_opensync_isenabled_testfor="$3"
+else
+ ac_opensync_isenabled_testfor="yes"
+fi
+
+if test "x${$2}" = "x${ac_opensync_isenabled_testfor}"; then
+ echo "AS_HELP_STRING([$1:], Enabled)"
+else
+ echo "AS_HELP_STRING([$1:], Disabled)"
+fi
+])
+
+echo ""
+echo "========================================"
+AC_OPENSYNC_ISENABLED([Python Bindings], have_python)
+AC_OPENSYNC_ISENABLED([Unit Tests], ENABLE_TESTS)
+AC_OPENSYNC_ISENABLED([Debug messages], WITH_DEBUG)
+AC_OPENSYNC_ISENABLED([Tracing], WITH_TRACE)
+AC_OPENSYNC_ISENABLED([Profiling], WITH_PROF)
+AC_OPENSYNC_ISENABLED([Sync Engine], ENABLE_ENGINE)
+AC_OPENSYNC_ISENABLED([Tools], WITH_TOOLS)
+echo
+echo "Now build opensync and install it."
+echo "Afterwards go into the plugins directory"
+echo "and build the plugins you need."
+echo "========================================"
diff --git a/debian/opensync/opensync-0.22/debian/README.Debian b/debian/opensync/opensync-0.22/debian/README.Debian
new file mode 100644
index 00000000..96edfaf8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/README.Debian
@@ -0,0 +1,9 @@
+Debian packages of opensync
+---------------------------
+
+There are 3 primary packages at this point:
+libopensync0, libopensync0-dev and libopensync0-dbg, which respectively
+provide the library, static and headers for the library, and debug symbols for
+the shared library.
+
+- Robert Collins.
diff --git a/debian/opensync/opensync-0.22/debian/changelog b/debian/opensync/opensync-0.22/debian/changelog
new file mode 100644
index 00000000..daeb1bf5
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/changelog
@@ -0,0 +1,165 @@
+opensync (0.22-7debian11.0.0+6~a) bullseye; urgency=low
+
+ * Change debhelper compatibility level to 9
+
+ -- Slávek Banko <slavek.banko@axis.cz> Tue, 07 Apr 2020 16:13:21 +0200
+
+opensync (0.22-7ubuntu20.04.0+5~a) focal; urgency=low
+
+ * debian/rules: prefer dh_python2 before dh_pysupport
+
+ -- Slávek Banko <slavek.banko@axis.cz> Sat, 15 Jun 2019 12:56:59 +0200
+
+opensync (0.22-7ubuntu19.10.0+4~a) eoan; urgency=low
+
+ * Change debhelper compatibility level to 7
+
+ -- Slávek Banko <slavek.banko@axis.cz> Sat, 13 Aug 2016 18:53:28 +0200
+
+opensync (0.22-7ubuntu16.10.0+3~a) yakkety; urgency=low
+
+ [ Michele Calgaro ]
+ * debian/rules: fixed FTBFS caused by missing python-support
+
+ [ Slávek Banko ]
+ * debian/rules: preserve call dh_pysupport, if installed
+ + necessary for older distributions that use pysupport
+ * debian/rules: don't ship .a and .la files in python module
+
+ -- Slávek Banko <slavek.banko@axis.cz> Mon, 08 Feb 2016 21:55:25 +0100
+
+opensync (0.22-7ubuntu16.04.0+2~a) xenial; urgency=low
+
+ * debian/rules: update config.{guess,sub} at build time
+
+ -- Slávek Banko <slavek.banko@axis.cz> Wed, 14 Jan 2015 00:55:44 +0100
+
+opensync (0.22-6ubuntu15.04.0+2~a) vivid; urgency=low
+
+ [ Michele Calgaro ]
+ * debian/control:
+ + fix automake dependency
+
+ -- Slávek Banko <slavek.banko@axis.cz> Sun, 21 Sep 2014 15:36:40 +0200
+
+opensync (0.22-6ubuntu14.10.0+1) utopic; urgency=low
+
+ * Switch to dh_python2
+
+ -- Slávek Banko <slavek.banko@axis.cz> Sat, 07 Sep 2013 15:10:40 +0200
+
+opensync (0.22-6debian8.0.0+0) jessie; urgency=low
+
+ * Fixed crappy test swig version
+ * Removed unused variables
+ * Removed -Werror to not take deprecated as error
+
+ -- Slávek Banko <slavek.banko@axis.cz> Sat, 20 Oct 2012 15:03:15 +0200
+
+opensync (0.22-4) maverick; urgency=low
+
+ * debian/control (Maintainer): Really remove Robert Collins now.
+
+ -- Michael Banck <mbanck@debian.org> Sat, 05 Dec 2009 18:55:29 +0100
+
+opensync (0.22-3) unstable; urgency=low
+
+ * opensync/opensnyc_debug.c: Set privacy for traces by default.
+ * debian/control (Maintainer): Removed Robert Collins (Closes: #544166).
+ * debian/rules: Applied patch by Kumar Appaiah.
+ + (debian/configure-python%-stamp): Set python version explicitely
+ (Closes: #557391)
+ + (CROSS): New variable, better handle cross-building.
+ * tests/Makefile.am, wrapper/Makefile.am, osplugin/Makefile.am,
+ tools/Makefile.am, osengine/Makefile.am: Removed RPATH argument to
+ LDFLAGS.
+ * debian/rules (configure): Made PHONY.
+ * debian/rules (build): Depend on configure.
+
+ -- Michael Banck <mbanck@debian.org> Sat, 05 Dec 2009 17:38:54 +0100
+
+opensync (0.22-2) unstable; urgency=low
+
+ * debian/libopensync0-dev.install: Do not install python stuff.
+ * debian/control (Standards-Version): Bump to 3.7.3.
+ * debian/control: Replaced ${Source:Version} with ${binary:Version}.
+
+ -- Michael Banck <mbanck@debian.org> Sun, 02 Mar 2008 12:39:41 +0100
+
+opensync (0.22-1) unstable; urgency=low
+
+ * New upstream release (Closes: #404856, #442827)
+ * debian/control (Uploaders): Added myself.
+ * debian/rules (debian/build-stamp): Added --enable-tracing.
+ * opensync/opensync_user.c: Change user config dir to ~/.opensync-0.22.
+ * debian/rules (debian/configure-stamp): New target.
+ * debian/rules (debian/build-stamp): Move configuring to it.
+ * debian/copyright: Added download location and clarified copyright and
+ licensing (Closes: #439876, #455827).
+ * debian/pyversions: Set 2.4 as minimum version (Closes: #445394).
+ * debian/rules: Ported generic python handling from experimental branch.
+ * debian/python-opensync: Wildcard python directory.
+ * acinclude.m4: Add python2.5 to list of python interpreters.
+ * Reran aclocal and autoconf.
+ * debian/control (libopensync0-dbg): Set Priority to extra.
+ * debian/control (python-opensync): Set Section to python.
+ * debian/rules (binary-arch): Tighten shlibs to dh_makeshlibs -V.
+
+ -- Michael Banck <mbanck@debian.org> Fri, 29 Feb 2008 00:45:57 +0100
+
+opensync (0.19-1.2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Use CURDIR instead of PWD to fix FTBFS with sudo (Closes: #396818).
+ * Install osplugin binary in usr/lib (Closes: #396006).
+
+ -- Luk Claes <luk@debian.org> Sun, 5 Nov 2006 18:32:05 +0100
+
+opensync (0.19-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * FTBFS: /opensync-0.19/tests/check_ipc.c:2062: warning: passing
+ argument 3 of 'create_case' from incompatible pointer type
+ (Closes: #393720)
+
+ -- Neil Williams <codehelp@debian.org> Sun, 22 Oct 2006 00:37:28 +0100
+
+opensync (0.19-1) unstable; urgency=low
+
+ * New upstream release (Closes: #392162).
+ * Remove autoreconf dependency on the debian/rules timestamp, developers can
+ still run 'debian/rules configure' to recreate configure, but buildds should
+ no longer randomly autoreconf (Closes: #387576).
+ * Move libopensync0-dev to section libdevel (Closes: #367705).
+ * Update python bindings short description (Closes: #377564).
+
+ -- Robert Collins <robertc@robertcollins.net> Mon, 16 Oct 2006 08:38:33 +1000
+
+opensync (0.18-2.2) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Rebuild opensync against python-support 0.3.9 that will fix the stupid
+ versionned soname for a python module (this *is* an upstream bug).
+ (Closes: #378049).
+
+ -- Pierre Habouzit <madcoder@debian.org> Mon, 7 Aug 2006 09:56:08 +0200
+
+opensync (0.18-2.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Uppdate package to the last python policy (Closes: #373470).
+
+ -- Pierre Habouzit <madcoder@debian.org> Sun, 2 Jul 2006 00:39:36 +0200
+
+opensync (0.18-2) unstable; urgency=low
+
+ * Build-depend on libtool.
+ * Loosen the debhelper build-dep to allow building on sarge and breezy.
+
+ -- Robert Collins <robertc@robertcollins.net> Sun, 18 Dec 2005 00:59:13 +1100
+
+opensync (0.18-1) unstable; urgency=low
+
+ * Initial upload. closes: #342179
+
+ -- Robert Collins <robertc@robertcollins.net> Sun, 11 Dec 2005 20:52:35 +1100
diff --git a/debian/opensync/opensync-0.22/debian/compat b/debian/opensync/opensync-0.22/debian/compat
new file mode 100644
index 00000000..ec635144
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/opensync/opensync-0.22/debian/control b/debian/opensync/opensync-0.22/debian/control
new file mode 100644
index 00000000..614881fc
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/control
@@ -0,0 +1,54 @@
+Source: opensync
+Section: deps-r14/libs
+Priority: optional
+Maintainer: Michael Banck <mbanck@debian.org>
+Build-Depends: debhelper (>= 9~), quilt, cdbs, python-all-dev (>= 2.3.5-11),
+ python-support (>= 0.3.9) | dh-python, libglib2.0-dev, libsqlite3-dev, libxml2-dev, check,
+ swig, automake, autoconf (>= 2.60), autotools-dev, libtool
+Standards-Version: 3.7.3
+
+Package: libopensync0
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Synchronisation framework for email/pdas/and more
+ A synchronisation framework for synchronising data in various format. You
+ can use libopensync from programs. See multisync for an existing X11 gui
+ program that uses opensync.
+
+Package: opensyncutils
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Command line utilities for libopensync
+ Libopensync provides a number of command line debugging and utility programs.
+ Install this package for the osyncdump, osyncstress, osyncplugin, osynctest,
+ osyncbinary programs.
+
+Package: libopensync0-dev
+Section: deps-r14/libdevel
+Provides: libopensync-dev
+Conflicts: libopensync-dev
+Architecture: any
+Depends: libopensync0 (= ${binary:Version}), libglib2.0-dev, libsqlite3-dev, libxml2-dev
+Description: Headers and static libraries for libopensync
+ Headers and static libraries for libopensync. These are not needed to use
+ opensync, but are needed to build plugins or programs like multisync that
+ link against libopensync.
+
+Package: libopensync0-dbg
+Architecture: any
+Priority: extra
+Depends: libopensync0 (= ${binary:Version})
+Description: Debug symbols for libopensync0
+ Debug symbols for libopensync that will allow useful tracebacks and debugging
+ on end user machines.
+
+Package: python-opensync
+Section: deps-r14/python
+Architecture: any
+Depends: ${shlibs:Depends}, ${python:Depends}, libopensync0 (= ${binary:Version})
+Provides: ${python:Provides}
+Replaces: python2.4-opensync (<< 0.18-2.1)
+Conflicts: python2.4-opensync (<< 0.18-2.1)
+XB-Python-Version: ${python:Versions}
+Description: Python bindings to the opensync synchronisation engine
+ Python bindings to the opensync synchronisation engine.
diff --git a/debian/opensync/opensync-0.22/debian/copyright b/debian/opensync/opensync-0.22/debian/copyright
new file mode 100644
index 00000000..3e6ccfeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/copyright
@@ -0,0 +1,33 @@
+This package was debianized by Robert Collins <robertc@debian.org> on
+Sun, 11 Dec 2005 20:52:35 +1100
+
+It was downloaded from http://www.opensync.org/download/releases/
+
+Upstream Author: Armin Bauer <armin.bauer@desscon.com>
+
+Copyright:
+ Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ Copyright (C) 2006 Daniel Gollub <dgollub@suse.de>
+
+License:
+
+ This package 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 package 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 package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
+
+The vformats-xml module is published under the GPL-2, which can be found in
+/usr/share/common-licenses/GPL-2.
+
diff --git a/debian/opensync/opensync-0.22/debian/libopensync0-dev.install b/debian/opensync/opensync-0.22/debian/libopensync0-dev.install
new file mode 100644
index 00000000..ae6f6e8e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/libopensync0-dev.install
@@ -0,0 +1,16 @@
+usr/lib/libopensync.a
+usr/lib/libopensync.la
+usr/lib/libopensync.so
+usr/lib/libosengine.a
+usr/lib/libosengine.la
+usr/lib/libosengine.so
+usr/lib/libopensync-xml.a
+usr/lib/libopensync-xml.la
+usr/lib/libopensync-xml.so
+usr/lib/opensync/formats/*.a
+usr/lib/opensync/formats/*.la
+usr/lib/pkgconfig/opensync-1.0.pc
+usr/lib/pkgconfig/osengine-1.0.pc
+usr/include/opensync-1.0/opensync/*.h
+usr/include/opensync-1.0/osengine/*.h
+
diff --git a/debian/opensync/opensync-0.22/debian/libopensync0.docs b/debian/opensync/opensync-0.22/debian/libopensync0.docs
new file mode 100644
index 00000000..724e0844
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/libopensync0.docs
@@ -0,0 +1,2 @@
+README
+TODO
diff --git a/debian/opensync/opensync-0.22/debian/libopensync0.install b/debian/opensync/opensync-0.22/debian/libopensync0.install
new file mode 100644
index 00000000..49fcdee7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/libopensync0.install
@@ -0,0 +1,5 @@
+usr/lib/libopensync*.so.*
+usr/lib/libosengine*.so.*
+usr/lib/libopensync-xml*.so.*
+usr/lib/opensync/formats/*.so
+usr/lib/opensync/osplugin
diff --git a/debian/opensync/opensync-0.22/debian/opensyncutils.install b/debian/opensync/opensync-0.22/debian/opensyncutils.install
new file mode 100644
index 00000000..99d23886
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/opensyncutils.install
@@ -0,0 +1,5 @@
+usr/bin/osyncdump
+usr/bin/osyncstress
+usr/bin/osyncplugin
+usr/bin/osynctest
+usr/bin/osyncbinary
diff --git a/debian/opensync/opensync-0.22/debian/patches/000-debian.diff b/debian/opensync/opensync-0.22/debian/patches/000-debian.diff
new file mode 100644
index 00000000..0747456f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/patches/000-debian.diff
@@ -0,0 +1,10206 @@
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/acinclude.m4 opensync-0.22/acinclude.m4
+--- libopensync-0.22/acinclude.m4 2007-03-27 13:49:27.000000000 +0200
++++ opensync-0.22/acinclude.m4 2013-04-28 02:38:27.000000000 +0200
+@@ -817,7 +817,7 @@
+ dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+ dnl in 1.5.
+ m4_define([_AM_PYTHON_INTERPRETER_LIST],
+- [python python2 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
++ [python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5])
+
+ m4_if([$1],[],[
+ dnl No version check is needed.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/aclocal.m4 opensync-0.22/aclocal.m4
+--- libopensync-0.22/aclocal.m4 2007-03-27 14:21:50.000000000 +0200
++++ opensync-0.22/aclocal.m4 2013-04-28 02:38:27.000000000 +0200
+@@ -1,7 +1,7 @@
+-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
++# generated automatically by aclocal 1.10 -*- Autoconf -*-
+
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+-# 2005 Free Software Foundation, Inc.
++# 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.
+@@ -11,9 +11,14 @@
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ # PARTICULAR PURPOSE.
+
++m4_if(m4_PACKAGE_VERSION, [2.61],,
++[m4_fatal([this file was generated for autoconf 2.61.
++You have another version of autoconf. If you want to use that,
++you should regenerate the build system entirely.], [63])])
++
+ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+-# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
++# serial 52 Debian 1.5.26-1 AC_PROG_LIBTOOL
+
+
+ # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+@@ -101,7 +106,6 @@
+ 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
+@@ -176,7 +180,7 @@
+ test -z "$ac_objext" && ac_objext=o
+
+ # Determine commands to create old-style static archives.
+-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+ old_postinstall_cmds='chmod 644 $oldlib'
+ old_postuninstall_cmds=
+
+@@ -203,6 +207,8 @@
+ ;;
+ esac
+
++_LT_REQUIRED_DARWIN_CHECKS
++
+ 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)
+@@ -263,8 +269,9 @@
+ # Check for compiler boilerplate output or warnings with
+ # the simple compiler test code.
+ AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+-[ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++[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*
+@@ -276,13 +283,85 @@
+ # Check for linker boilerplate output or warnings with
+ # the simple link test code.
+ AC_DEFUN([_LT_LINKER_BOILERPLATE],
+-[ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++[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*
++$rm -r conftest*
+ ])# _LT_LINKER_BOILERPLATE
+
++# _LT_REQUIRED_DARWIN_CHECKS
++# --------------------------
++# Check for some things on darwin
++AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
++ case $host_os in
++ rhapsody* | darwin*)
++ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
++ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
++
++ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
++ [lt_cv_apple_cc_single_mod=no
++ if test -z "${LT_MULTI_MODULE}"; then
++ # By default we will add the -single_module flag. You can override
++ # by either setting the environment variable LT_MULTI_MODULE
++ # non-empty at configure time, or by adding -multi_module to the
++ # link flags.
++ echo "int foo(void){return 1;}" > conftest.c
++ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++ -dynamiclib ${wl}-single_module conftest.c
++ if test -f libconftest.dylib; then
++ lt_cv_apple_cc_single_mod=yes
++ rm -rf libconftest.dylib*
++ fi
++ rm conftest.c
++ fi])
++ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
++ [lt_cv_ld_exported_symbols_list],
++ [lt_cv_ld_exported_symbols_list=no
++ save_LDFLAGS=$LDFLAGS
++ echo "_main" > conftest.sym
++ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
++ [lt_cv_ld_exported_symbols_list=yes],
++ [lt_cv_ld_exported_symbols_list=no])
++ LDFLAGS="$save_LDFLAGS"
++ ])
++ case $host_os in
++ rhapsody* | darwin1.[[0123]])
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
++ darwin1.*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ darwin*)
++ # if running on 10.5 or later, the deployment target defaults
++ # to the OS version, if on x86, and 10.4, the deployment
++ # target defaults to 10.4. Don't you love it?
++ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
++ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ 10.[[012]]*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ 10.*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ esac
++ ;;
++ esac
++ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
++ _lt_dar_single_mod='$single_module'
++ fi
++ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
++ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
++ else
++ _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
++ fi
++ if test "$DSYMUTIL" != ":"; then
++ _lt_dsymutil="~$DSYMUTIL \$lib || :"
++ else
++ _lt_dsymutil=
++ fi
++ ;;
++ esac
++])
+
+ # _LT_AC_SYS_LIBPATH_AIX
+ # ----------------------
+@@ -293,12 +372,20 @@
+ # If we don't find anything, use the default library path according
+ # to the aix ld manual.
+ AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++[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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi],[])
++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
+
+@@ -529,13 +616,17 @@
+ rm -rf conftest*
+ ;;
+
+-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
++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"
+ ;;
+@@ -552,6 +643,9 @@
+ ;;
+ *64-bit*)
+ 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"
+ ;;
+@@ -592,7 +686,11 @@
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+- *) LD="${LD-ld} -64" ;;
++ *)
++ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
++ LD="${LD-ld} -64"
++ fi
++ ;;
+ esac
+ ;;
+ esac
+@@ -623,7 +721,7 @@
+ AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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.
+@@ -664,11 +762,12 @@
+ # ------------------------------------------------------------
+ # Check whether the given compiler option works
+ AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+-[AC_CACHE_CHECK([$1], [$2],
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+- printf "$lt_simple_link_test_code" > conftest.$ac_ext
++ 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
+@@ -684,7 +783,7 @@
+ $2=yes
+ fi
+ fi
+- $rm conftest*
++ $rm -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+ ])
+
+@@ -782,24 +881,27 @@
+ fi
+ ;;
+ *)
+- # If test is not a shell built-in, we'll probably end up computing a
+- # maximum length that is only half of the actual maximum length, but
+- # we can't tell.
+- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
++ 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`
++ 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
+ ])
+@@ -952,7 +1054,7 @@
+ 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"],
++ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+@@ -960,7 +1062,7 @@
+ [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"])
++ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+@@ -1026,7 +1128,8 @@
+ # ---------------------------------
+ # Check to see if options -c and -o are simultaneously supported by compiler
+ AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
++[AC_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
+@@ -1034,7 +1137,7 @@
+ mkdir conftest
+ cd conftest
+ mkdir out
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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
+@@ -1174,6 +1277,7 @@
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
++ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+@@ -1191,7 +1295,8 @@
+ # -----------------------------
+ # PORTME Fill in your ld.so characteristics
+ AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+-[AC_MSG_CHECKING([dynamic linker characteristics])
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_MSG_CHECKING([dynamic linker characteristics])
+ library_names_spec=
+ libname_spec='lib$name'
+ soname_spec=
+@@ -1205,20 +1310,58 @@
+ 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
+- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
++ 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.
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++ lt_search_path_spec=`echo "$lt_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"`
++ 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
++fi])
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+
+@@ -1236,7 +1379,7 @@
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+-aix4* | aix5*)
++aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -1375,12 +1518,8 @@
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+- if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+- else
+- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+- fi
++ 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'
+ ;;
+
+@@ -1434,7 +1573,7 @@
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+- freebsd*) # from 4.6 on
++ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+@@ -1497,7 +1636,7 @@
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+-interix3*)
++interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -1568,7 +1707,7 @@
+
+ # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++ 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="/lib /usr/lib $lt_ld_extra"
+ fi
+
+@@ -1674,6 +1813,10 @@
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
++rdos*)
++ dynamic_linker=no
++ ;;
++
+ solaris*)
+ version_type=linux
+ need_lib_prefix=no
+@@ -1769,6 +1912,13 @@
+ AC_MSG_RESULT([$dynamic_linker])
+ test "$dynamic_linker" = no && can_build_shared=no
+
++AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
++[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
++[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++
+ 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"
+@@ -1779,7 +1929,8 @@
+ # _LT_AC_TAGCONFIG
+ # ----------------
+ AC_DEFUN([_LT_AC_TAGCONFIG],
+-[AC_ARG_WITH([tags],
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
++AC_ARG_WITH([tags],
+ [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+ [include additional configurations @<:@automatic@:>@])],
+ [tagnames="$withval"])
+@@ -2040,7 +2191,7 @@
+
+ # AC_PATH_TOOL_PREFIX
+ # -------------------
+-# find a file program which can recognise shared library
++# 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])
+@@ -2103,7 +2254,7 @@
+
+ # AC_PATH_MAGIC
+ # -------------
+-# find a file program which can recognise a shared library
++# 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
+@@ -2250,7 +2401,7 @@
+ # how to check for library dependencies
+ # -- PORTME fill in with the dynamic library characteristics
+ AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+-[AC_CACHE_CHECK([how to recognise dependent libraries],
++[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=
+@@ -2267,7 +2418,7 @@
+ # whether `pass_all' will *always* work, you probably want this one.
+
+ case $host_os in
+-aix4* | aix5*)
++aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+@@ -2289,9 +2440,15 @@
+
+ mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+- lt_cv_file_magic_cmd='$OBJDUMP -f'
++ # 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*)
+@@ -2336,7 +2493,7 @@
+ esac
+ ;;
+
+-interix3*)
++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)$'
+ ;;
+@@ -2386,6 +2543,10 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++rdos*)
++ lt_cv_deplibs_check_method=pass_all
++ ;;
++
+ solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+@@ -2438,7 +2599,7 @@
+ lt_cv_path_NM="$NM"
+ else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
++ 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
+@@ -2654,10 +2815,10 @@
+ _LT_AC_TAGVAR(objext, $1)=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++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);}\n'
++lt_simple_link_test_code='int main(){return(0);}'
+
+ _LT_AC_SYS_COMPILER
+
+@@ -2693,7 +2854,7 @@
+ fi
+ ;;
+
+-aix4* | aix5*)
++aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+@@ -2750,6 +2911,7 @@
+ _LT_AC_TAGVAR(predeps, $1)=
+ _LT_AC_TAGVAR(postdeps, $1)=
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
++_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+
+ # Source file extension for C++ test sources.
+ ac_ext=cpp
+@@ -2759,10 +2921,10 @@
+ _LT_AC_TAGVAR(objext, $1)=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++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); }\n'
++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
+@@ -2859,7 +3021,7 @@
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+- aix4* | aix5*)
++ aix[[4-9]]*)
+ 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.
+@@ -2872,7 +3034,7 @@
+ # 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*)
++ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+@@ -2908,7 +3070,7 @@
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++ :
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+@@ -3018,59 +3180,31 @@
+ 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
++ _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
++ if test "$GXX" = yes ; then
+ output_verbose_link_cmd='echo'
+- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+- lt_int_apple_cc_single_mod=yes
++ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
++ _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${_lt_dsymutil}"
++ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
+ 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` $verstring'
++ _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ _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}'
+ ;;
+ *)
+@@ -3153,9 +3287,7 @@
+ _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'
+- ;;
++ hppa*64*|ia64*) ;;
+ *)
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+@@ -3223,7 +3355,7 @@
+ ;;
+ esac
+ ;;
+- interix3*)
++ 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'
+@@ -3315,7 +3447,7 @@
+ _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*)
++ pgCC* | pgcpp*)
+ # 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'
+@@ -3343,6 +3475,29 @@
+ # 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*)
+@@ -3381,16 +3536,20 @@
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ openbsd*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ 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
+- output_verbose_link_cmd='echo'
+ ;;
+ osf3*)
+ case $cc_basename in
+@@ -3552,15 +3711,10 @@
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+- # The C++ compiler is used as linker so we must use $wl
+- # flag to pass the commands to the underlying system
+- # linker. We must also pass each convience library through
+- # to the system linker between allextract/defaultextract.
+- # The C++ compiler will combine linker options so we
+- # cannot just pass the convience library names through
+- # without $wl.
++ # 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)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
++ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+@@ -3607,6 +3761,12 @@
+ 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
+@@ -3722,7 +3882,8 @@
+ # 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],[
++AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
++[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ 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
+@@ -3847,10 +4008,15 @@
+
+ $rm -f confest.$objext
+
++_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
++if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
++ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
++fi
++
+ # PORTME: override above test on systems where it is broken
+ ifelse([$1],[CXX],
+ [case $host_os in
+-interix3*)
++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)=
+@@ -3858,19 +4024,51 @@
+ _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.
+- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
++ 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
+@@ -3913,10 +4111,17 @@
+ _LT_AC_TAGVAR(objext, $1)=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
++lt_simple_compile_test_code="\
++ subroutine t
++ return
++ end
++"
+
+ # Code to be used in simple link tests
+-lt_simple_link_test_code=" program t\n end\n"
++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
+@@ -3948,7 +4153,7 @@
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+-aix4* | aix5*)
++aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+@@ -3995,10 +4200,10 @@
+ _LT_AC_TAGVAR(objext, $1)=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="class foo {}\n"
++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) {}; }\n'
++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
+@@ -4051,7 +4256,7 @@
+ _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 }\n'
++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"
+@@ -4125,6 +4330,7 @@
+ _LT_AC_TAGVAR(predeps, $1) \
+ _LT_AC_TAGVAR(postdeps, $1) \
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
++ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
+ _LT_AC_TAGVAR(archive_cmds, $1) \
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+ _LT_AC_TAGVAR(postinstall_cmds, $1) \
+@@ -4140,6 +4346,7 @@
+ _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
+
+@@ -4186,7 +4393,7 @@
+ # 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
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ # Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Libtool:
+@@ -4423,6 +4630,10 @@
+ # shared library.
+ postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
++# The directories searched by this compiler when creating a shared
++# library
++compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $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)
+@@ -4511,7 +4722,7 @@
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
++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)
+@@ -4594,6 +4805,7 @@
+ # ---------------------------------
+ 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.
+@@ -4771,7 +4983,7 @@
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+- rm -f conftest* conftst*
++ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+@@ -4820,13 +5032,16 @@
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+- mingw* | os2* | pw32*)
++ 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).
+- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
++ # Although the cygwin gcc ignores -fPIC, still need this for old-style
++ # (--disable-auto-import) libraries
++ m4_if([$1], [GCJ], [],
++ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+@@ -4837,7 +5052,7 @@
+ # DJGPP does not support shared libraries at all
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+- interix3*)
++ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+@@ -4863,7 +5078,7 @@
+ esac
+ else
+ case $host_os in
+- aix4* | aix5*)
++ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+@@ -4959,7 +5174,7 @@
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+- pgCC*)
++ pgCC* | pgcpp*)
+ # Portland Group C++ compiler.
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+@@ -4973,6 +5188,14 @@
+ _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
+ ;;
+@@ -5093,14 +5316,17 @@
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+
+- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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'
++ # Although the cygwin gcc ignores -fPIC, still need this for old-style
++ # (--disable-auto-import) libraries
++ m4_if([$1], [GCJ], [],
++ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+@@ -5109,7 +5335,7 @@
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+- interix3*)
++ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+@@ -5167,10 +5393,11 @@
+ esac
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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'
++ m4_if([$1], [GCJ], [],
++ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+@@ -5219,6 +5446,22 @@
+ # 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
+ ;;
+
+@@ -5228,6 +5471,10 @@
+ _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'
+@@ -5287,7 +5534,7 @@
+ #
+ 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_cv_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
+ "" | " "*) ;;
+@@ -5311,7 +5558,7 @@
+ #
+ 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_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+@@ -5322,11 +5569,12 @@
+ # ------------------------------------
+ # See if the linker supports building shared libraries.
+ AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
++[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*)
++ aix[[4-9]]*)
+ # 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
+@@ -5339,7 +5587,7 @@
+ _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 -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+@@ -5348,6 +5596,7 @@
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
++ _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ ],[
+ runpath_var=
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+@@ -5378,12 +5627,14 @@
+ # 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_"
++ _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # 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.
++ # Exclude shared library initialization/finalization symbols.
++dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+ # Just being paranoid about ensuring that cc_basename is set.
+ _LT_CC_BASENAME([$compiler])
+@@ -5433,7 +5684,7 @@
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+- aix3* | aix4* | aix5*)
++ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+@@ -5481,7 +5732,7 @@
+ _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/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
++ _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'
+@@ -5499,7 +5750,7 @@
+ fi
+ ;;
+
+- interix3*)
++ 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'
+@@ -5514,7 +5765,7 @@
+ _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'
+ ;;
+
+- linux* | k*bsd*-gnu)
++ 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
+@@ -5532,13 +5783,22 @@
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=no
+ else
+@@ -5579,7 +5839,7 @@
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
++ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+@@ -5644,7 +5904,7 @@
+ fi
+ ;;
+
+- aix4* | aix5*)
++ aix[[4-9]]*)
+ 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.
+@@ -5664,7 +5924,7 @@
+ # 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*)
++ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+@@ -5698,7 +5958,7 @@
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++ :
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+@@ -5791,7 +6051,7 @@
+ # 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(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
+ ;;
+@@ -5824,19 +6084,18 @@
+ _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}'
++ _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++ _LT_AC_TAGVAR(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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ _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}'
+ ;;
+ *)
+@@ -5998,24 +6257,28 @@
+ ;;
+
+ openbsd*)
+- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
++ 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
+- 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
++ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+@@ -6074,17 +6337,16 @@
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+- # The compiler driver will combine linker options so we
+- # cannot just pass the convience library names through
+- # without $wl, iff we do not link with $LD.
+- # Luckily, gcc supports the same syntax we need for Sun Studio.
++ # 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?)
+- case $wlarc in
+- '')
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+- *)
+- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+- esac ;;
++ 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
+ ;;
+@@ -6141,7 +6403,7 @@
+ fi
+ ;;
+
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
++ 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
+@@ -6216,7 +6478,7 @@
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $rm conftest*
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+@@ -6319,6 +6581,30 @@
+ [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 #
+@@ -6339,12 +6625,13 @@
+ 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
++ 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
+@@ -6377,6 +6664,7 @@
+ done
+ ])
+ SED=$lt_cv_path_SED
++AC_SUBST([SED])
+ AC_MSG_RESULT([$SED])
+ ])
+
+@@ -6528,7 +6816,7 @@
+
+ _PKG_TEXT
+
+-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+ else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+@@ -6538,7 +6826,7 @@
+ fi[]dnl
+ ])# PKG_CHECK_MODULES
+
+-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
++# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+ #
+ # This file is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+@@ -6548,14 +6836,29 @@
+ # ----------------------------
+ # Automake X.Y traces this macro to ensure aclocal.m4 has been
+ # generated from the m4 files accompanying Automake X.Y.
+-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
++# (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], [],
++ [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 so it can be traced.
++# 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.9.6])])
++[AM_AUTOMAKE_VERSION([1.10])dnl
++_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+
+ # AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+@@ -6635,14 +6938,14 @@
+
+ # AM_CONDITIONAL -*- Autoconf -*-
+
+-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
++# 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 7
++# serial 8
+
+ # AM_CONDITIONAL(NAME, SHELL-CONDITION)
+ # -------------------------------------
+@@ -6651,8 +6954,10 @@
+ [AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+-AC_SUBST([$1_TRUE])
+-AC_SUBST([$1_FALSE])
++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='#'
+@@ -6666,15 +6971,14 @@
+ Usually this means the macro was only invoked conditionally.]])
+ fi])])
+
+-
+-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++# 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 8
++# 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,
+@@ -6702,6 +7006,7 @@
+ 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=])
+
+@@ -6767,6 +7072,7 @@
+ 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
+@@ -6819,7 +7125,8 @@
+ AMDEPBACKSLASH='\'
+ fi
+ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+-AC_SUBST([AMDEPBACKSLASH])
++AC_SUBST([AMDEPBACKSLASH])dnl
++_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+ ])
+
+ # Generate code to set up dependency tracking. -*- Autoconf -*-
+@@ -6844,8 +7151,9 @@
+ # 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.
+- # So let's grep whole file.
+- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
++ # 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 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+@@ -6904,8 +7212,8 @@
+
+ # Do all the work for Automake. -*- Autoconf -*-
+
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+-# Free Software Foundation, Inc.
++# Copyright (C) 1996, 1997, 1998, 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,
+@@ -6928,16 +7236,20 @@
+ # arguments mandatory, and then we can depend on a new Autoconf
+ # release and drop the old call support.
+ AC_DEFUN([AM_INIT_AUTOMAKE],
+-[AC_PREREQ([2.58])dnl
++[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
+-# test to see if srcdir already configured
+-if test "`cd $srcdir && pwd`" != "`pwd`" &&
+- test -f $srcdir/config.status; then
+- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++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
+@@ -6957,6 +7269,9 @@
+ 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
+
+@@ -6992,6 +7307,10 @@
+ [_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
+ ])
+ ])
+
+@@ -7027,7 +7346,7 @@
+ # Define $install_sh.
+ AC_DEFUN([AM_PROG_INSTALL_SH],
+ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+-install_sh=${install_sh-"$am_aux_dir/install-sh"}
++install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+ AC_SUBST(install_sh)])
+
+ # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+@@ -7105,14 +7424,14 @@
+
+ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
++# 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 4
++# serial 5
+
+ # AM_MISSING_PROG(NAME, PROGRAM)
+ # ------------------------------
+@@ -7128,6 +7447,7 @@
+ # 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
+@@ -7138,7 +7458,7 @@
+ fi
+ ])
+
+-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
++# 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,
+@@ -7146,60 +7466,23 @@
+
+ # AM_PROG_MKDIR_P
+ # ---------------
+-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+-#
+-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+-# created by `make install' are always world readable, even if the
+-# installer happens to have an overly restrictive umask (e.g. 077).
+-# This was a mistake. There are at least two reasons why we must not
+-# use `-m 0755':
+-# - it causes special bits like SGID to be ignored,
+-# - it may be too restrictive (some setups expect 775 directories).
+-#
+-# Do not use -m 0755 and let people choose whatever they expect by
+-# setting umask.
+-#
+-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+-# Some implementations (such as Solaris 8's) are not thread-safe: if a
+-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+-# concurrently, both version can detect that a/ is missing, but only
+-# one can create it and the other will error out. Consequently we
+-# restrict ourselves to GNU make (using the --version option ensures
+-# this.)
++# Check for `mkdir -p'.
+ AC_DEFUN([AM_PROG_MKDIR_P],
+-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+- # We used to keeping the `.' as first argument, in order to
+- # allow $(mkdir_p) to be used without argument. As in
+- # $(mkdir_p) $(somedir)
+- # where $(somedir) is conditionally defined. However this is wrong
+- # for two reasons:
+- # 1. if the package is installed by a user who cannot write `.'
+- # make install will fail,
+- # 2. the above comment should most certainly read
+- # $(mkdir_p) $(DESTDIR)$(somedir)
+- # so it does not work when $(somedir) is undefined and
+- # $(DESTDIR) is not.
+- # To support the latter case, we have to write
+- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+- # so the `.' trick is pointless.
+- mkdir_p='mkdir -p --'
+-else
+- # On NextStep and OpenStep, the `mkdir' command does not
+- # recognize any option. It will interpret all options as
+- # directories to create, and then abort because `.' already
+- # exists.
+- for d in ./-p ./--version;
+- do
+- test -d $d && rmdir $d
+- done
+- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+- if test -f "$ac_aux_dir/mkinstalldirs"; then
+- mkdir_p='$(mkinstalldirs)'
+- else
+- mkdir_p='$(install_sh) -d'
+- fi
+-fi
+-AC_SUBST([mkdir_p])])
++[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 -*-
+
+@@ -7311,9 +7594,21 @@
+ if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+ fi
+-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
++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 outputing 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/configure opensync-0.22/configure
+--- libopensync-0.22/configure 2007-03-27 14:21:55.000000000 +0200
++++ opensync-0.22/configure 2013-04-28 02:38:27.000000000 +0200
+@@ -807,6 +807,7 @@
+ INSTALL_PROGRAM
+ INSTALL_SCRIPT
+ INSTALL_DATA
++am__isrc
+ CYGPATH_W
+ PACKAGE
+ VERSION
+@@ -852,10 +853,13 @@
+ host_cpu
+ host_vendor
+ host_os
++SED
+ LN_S
+ ECHO
+ AR
+ RANLIB
++DSYMUTIL
++NMEDIT
+ CXX
+ CXXFLAGS
+ ac_ct_CXX
+@@ -2004,7 +2008,8 @@
+
+
+
+-am__api_version="1.9"
++am__api_version='1.10'
++
+ ac_aux_dir=
+ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+@@ -2187,38 +2192,53 @@
+ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ fi
+
+-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+- # We used to keeping the `.' as first argument, in order to
+- # allow $(mkdir_p) to be used without argument. As in
+- # $(mkdir_p) $(somedir)
+- # where $(somedir) is conditionally defined. However this is wrong
+- # for two reasons:
+- # 1. if the package is installed by a user who cannot write `.'
+- # make install will fail,
+- # 2. the above comment should most certainly read
+- # $(mkdir_p) $(DESTDIR)$(somedir)
+- # so it does not work when $(somedir) is undefined and
+- # $(DESTDIR) is not.
+- # To support the latter case, we have to write
+- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+- # so the `.' trick is pointless.
+- mkdir_p='mkdir -p --'
+-else
+- # On NextStep and OpenStep, the `mkdir' command does not
+- # recognize any option. It will interpret all options as
+- # directories to create, and then abort because `.' already
+- # exists.
+- for d in ./-p ./--version;
+- do
+- test -d $d && rmdir $d
+- done
+- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+- if test -f "$ac_aux_dir/mkinstalldirs"; then
+- mkdir_p='$(mkinstalldirs)'
++{ 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
+- mkdir_p='$(install_sh) -d'
++ # 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
+@@ -2301,12 +2321,16 @@
+ fi
+ rmdir .tst 2>/dev/null
+
+-# test to see if srcdir already configured
+-if test "`cd $srcdir && pwd`" != "`pwd`" &&
+- test -f $srcdir/config.status; then
+- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
++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
+@@ -2349,7 +2373,7 @@
+
+ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+-install_sh=${install_sh-"$am_aux_dir/install-sh"}
++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
+@@ -2453,7 +2477,7 @@
+ fi
+
+ fi
+-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+ # We need awk for the "check" target. The system "awk" is bad on
+ # some platforms.
+@@ -2531,9 +2555,7 @@
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ fi
+-
+-
+-if test "x$enable_dependency_tracking" != xno; then
++ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+ else
+@@ -2542,7 +2564,6 @@
+ fi
+
+
+-
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -3529,6 +3550,7 @@
+ 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
+@@ -3558,9 +3580,7 @@
+ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+ CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+-
+-
+-if
++ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+@@ -4398,6 +4418,7 @@
+ 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
+@@ -4427,9 +4448,7 @@
+ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+ CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+-
+-
+-if
++ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+@@ -5183,6 +5202,7 @@
+ 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
+@@ -5212,9 +5232,7 @@
+ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+ CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+-
+-
+-if
++ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+@@ -5965,12 +5983,13 @@
+ 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
++ 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
+@@ -6005,6 +6024,7 @@
+ fi
+
+ SED=$lt_cv_path_SED
++
+ { echo "$as_me:$LINENO: result: $SED" >&5
+ echo "${ECHO_T}$SED" >&6; }
+
+@@ -6204,8 +6224,8 @@
+ echo "${ECHO_T}no, using $LN_S" >&6; }
+ fi
+
+-{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
++{ 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
+@@ -6224,7 +6244,7 @@
+ # whether `pass_all' will *always* work, you probably want this one.
+
+ case $host_os in
+-aix4* | aix5*)
++aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+@@ -6246,9 +6266,15 @@
+
+ mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+- lt_cv_file_magic_cmd='$OBJDUMP -f'
++ # 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*)
+@@ -6293,7 +6319,7 @@
+ esac
+ ;;
+
+-interix3*)
++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)$'
+ ;;
+@@ -6343,6 +6369,10 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++rdos*)
++ lt_cv_deplibs_check_method=pass_all
++ ;;
++
+ solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+@@ -6429,7 +6459,7 @@
+ ;;
+ *-*-irix6*)
+ # Find out which ABI we are using.
+- echo '#line 6432 "configure"' > conftest.$ac_ext
++ echo '#line 6462 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+@@ -6464,7 +6494,8 @@
+ rm -rf conftest*
+ ;;
+
+-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
++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
+@@ -6475,6 +6506,9 @@
+ 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"
+ ;;
+@@ -6491,6 +6525,9 @@
+ ;;
+ *64-bit*)
+ 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"
+ ;;
+@@ -6594,7 +6631,11 @@
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+- *) LD="${LD-ld} -64" ;;
++ *)
++ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
++ LD="${LD-ld} -64"
++ fi
++ ;;
+ esac
+ ;;
+ esac
+@@ -7248,6 +7289,7 @@
+ 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
+@@ -7277,9 +7319,7 @@
+ echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+ CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+-
+-
+-if
++ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+@@ -7787,7 +7827,6 @@
+
+
+ # 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; }
+@@ -7874,24 +7913,27 @@
+ fi
+ ;;
+ *)
+- # If test is not a shell built-in, we'll probably end up computing a
+- # maximum length that is only half of the actual maximum length, but
+- # we can't tell.
+- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
++ 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`
++ 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
+
+@@ -7908,6 +7950,7 @@
+
+
+
++
+ # 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; }
+@@ -8098,7 +8141,7 @@
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+- rm -f conftest* conftst*
++ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+@@ -8496,7 +8539,7 @@
+ test -z "$ac_objext" && ac_objext=o
+
+ # Determine commands to create old-style static archives.
+-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+ old_postinstall_cmds='chmod 644 $oldlib'
+ old_postuninstall_cmds=
+
+@@ -8658,6 +8701,318 @@
+ ;;
+ esac
+
++
++ case $host_os in
++ rhapsody* | darwin*)
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
++set dummy ${ac_tool_prefix}dsymutil; 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_DSYMUTIL+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$DSYMUTIL"; then
++ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++DSYMUTIL=$ac_cv_prog_DSYMUTIL
++if test -n "$DSYMUTIL"; then
++ { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
++echo "${ECHO_T}$DSYMUTIL" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_DSYMUTIL"; then
++ ac_ct_DSYMUTIL=$DSYMUTIL
++ # Extract the first word of "dsymutil", so it can be a program name with args.
++set dummy dsymutil; 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_DSYMUTIL+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_DSYMUTIL"; then
++ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil"
++ 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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
++if test -n "$ac_ct_DSYMUTIL"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
++echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ if test "x$ac_ct_DSYMUTIL" = x; then
++ DSYMUTIL=":"
++ 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@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@gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ DSYMUTIL=$ac_ct_DSYMUTIL
++ fi
++else
++ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
++fi
++
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
++set dummy ${ac_tool_prefix}nmedit; 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_NMEDIT+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$NMEDIT"; then
++ ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++NMEDIT=$ac_cv_prog_NMEDIT
++if test -n "$NMEDIT"; then
++ { echo "$as_me:$LINENO: result: $NMEDIT" >&5
++echo "${ECHO_T}$NMEDIT" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_NMEDIT"; then
++ ac_ct_NMEDIT=$NMEDIT
++ # Extract the first word of "nmedit", so it can be a program name with args.
++set dummy nmedit; 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_NMEDIT+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_NMEDIT"; then
++ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit"
++ 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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
++if test -n "$ac_ct_NMEDIT"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
++echo "${ECHO_T}$ac_ct_NMEDIT" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ if test "x$ac_ct_NMEDIT" = x; then
++ NMEDIT=":"
++ 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@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@gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ NMEDIT=$ac_ct_NMEDIT
++ fi
++else
++ NMEDIT="$ac_cv_prog_NMEDIT"
++fi
++
++
++ { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
++echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; }
++if test "${lt_cv_apple_cc_single_mod+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_apple_cc_single_mod=no
++ if test -z "${LT_MULTI_MODULE}"; then
++ # By default we will add the -single_module flag. You can override
++ # by either setting the environment variable LT_MULTI_MODULE
++ # non-empty at configure time, or by adding -multi_module to the
++ # link flags.
++ echo "int foo(void){return 1;}" > conftest.c
++ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
++ -dynamiclib ${wl}-single_module conftest.c
++ if test -f libconftest.dylib; then
++ lt_cv_apple_cc_single_mod=yes
++ rm -rf libconftest.dylib*
++ fi
++ rm conftest.c
++ fi
++fi
++{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
++echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; }
++ { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
++echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; }
++if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_ld_exported_symbols_list=no
++ save_LDFLAGS=$LDFLAGS
++ echo "_main" > conftest.sym
++ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
++ 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_ld_exported_symbols_list=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ lt_cv_ld_exported_symbols_list=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++ conftest$ac_exeext conftest.$ac_ext
++ LDFLAGS="$save_LDFLAGS"
++
++fi
++{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
++echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; }
++ case $host_os in
++ rhapsody* | darwin1.[0123])
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
++ darwin1.*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ darwin*)
++ # if running on 10.5 or later, the deployment target defaults
++ # to the OS version, if on x86, and 10.4, the deployment
++ # target defaults to 10.4. Don't you love it?
++ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
++ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ 10.[012]*)
++ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
++ 10.*)
++ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++ esac
++ ;;
++ esac
++ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
++ _lt_dar_single_mod='$single_module'
++ fi
++ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
++ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
++ else
++ _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
++ fi
++ if test "$DSYMUTIL" != ":"; then
++ _lt_dsymutil="~$DSYMUTIL \$lib || :"
++ else
++ _lt_dsymutil=
++ fi
++ ;;
++ esac
++
++
+ enable_dlopen=no
+ enable_win32_dll=no
+
+@@ -8696,10 +9051,10 @@
+ objext=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++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);}\n'
++lt_simple_link_test_code='int main(){return(0);}'
+
+
+ # If no C compiler was specified, use CC.
+@@ -8714,16 +9069,16 @@
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++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
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++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*
++$rm -r conftest*
+
+
+
+@@ -8740,7 +9095,7 @@
+ else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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.
+@@ -8751,11 +9106,11 @@
+ -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:8754: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:9109: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:8758: \$? = $ac_status" >&5
++ echo "$as_me:9113: \$? = $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.
+@@ -8806,13 +9161,15 @@
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+
+- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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'
+ ;;
+
+@@ -8822,7 +9179,7 @@
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+- interix3*)
++ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+@@ -8880,7 +9237,7 @@
+ esac
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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'
+@@ -8932,6 +9289,22 @@
+ # 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
+ ;;
+
+@@ -8941,6 +9314,10 @@
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
++ rdos*)
++ lt_prog_compiler_static='-non_shared'
++ ;;
++
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+@@ -9003,12 +9380,12 @@
+
+ { 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
++if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_pic_works=no
++ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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.
+@@ -9019,27 +9396,27 @@
+ -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:9022: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:9399: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:9026: \$? = $ac_status" >&5
++ echo "$as_me:9403: \$? = $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
++ lt_cv_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; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; }
+
+-if test x"$lt_prog_compiler_pic_works" = xyes; then
++if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+@@ -9066,13 +9443,13 @@
+ 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
++if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_static_works=no
++ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+- printf "$lt_simple_link_test_code" > conftest.$ac_ext
++ 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
+@@ -9082,20 +9459,20 @@
+ $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
++ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+- lt_prog_compiler_static_works=yes
++ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+- $rm conftest*
++ $rm -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+ fi
+-{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; }
+
+-if test x"$lt_prog_compiler_static_works" = xyes; then
++if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+ else
+ lt_prog_compiler_static=
+@@ -9112,7 +9489,7 @@
+ mkdir conftest
+ cd conftest
+ mkdir out
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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
+@@ -9123,11 +9500,11 @@
+ -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:9126: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:9503: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:9130: \$? = $ac_status" >&5
++ echo "$as_me:9507: \$? = $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
+@@ -9207,12 +9584,13 @@
+ # 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_"
++ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # 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.
++ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+ # Just being paranoid about ensuring that cc_basename is set.
+ for cc_temp in $compiler""; do
+@@ -9271,7 +9649,7 @@
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+- aix3* | aix4* | aix5*)
++ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+@@ -9319,7 +9697,7 @@
+ 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/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
++ 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'
+@@ -9337,7 +9715,7 @@
+ fi
+ ;;
+
+- interix3*)
++ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+@@ -9352,7 +9730,7 @@
+ 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'
+ ;;
+
+- linux* | k*bsd*-gnu)
++ 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
+@@ -9370,13 +9748,22 @@
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ link_all_deplibs=no
+ else
+@@ -9482,7 +9869,7 @@
+ fi
+ ;;
+
+- aix4* | aix5*)
++ aix[4-9]*)
+ 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.
+@@ -9502,7 +9889,7 @@
+ # 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*)
++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+@@ -9536,7 +9923,7 @@
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+- hardcode_direct=yes
++ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+@@ -9610,11 +9997,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -9669,11 +10063,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -9727,7 +10128,7 @@
+ # 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'
++ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+@@ -9760,19 +10161,18 @@
+ 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}'
++ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++ 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ 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}'
+ ;;
+ *)
+@@ -9934,24 +10334,28 @@
+ ;;
+
+ openbsd*)
+- hardcode_direct=yes
+- hardcode_shlibpath_var=no
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $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'
++ 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
+- 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
++ ld_shlibs=no
+ fi
+ ;;
+
+@@ -10010,17 +10414,16 @@
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+- # The compiler driver will combine linker options so we
+- # cannot just pass the convience library names through
+- # without $wl, iff we do not link with $LD.
+- # Luckily, gcc supports the same syntax we need for Sun Studio.
++ # 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?)
+- case $wlarc in
+- '')
+- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+- *)
+- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+- esac ;;
++ 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
+ ;;
+@@ -10077,7 +10480,7 @@
+ fi
+ ;;
+
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
++ 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
+@@ -10154,7 +10557,7 @@
+ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ $rm conftest*
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+@@ -10212,17 +10615,55 @@
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
++
+ if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
++ 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.
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++ lt_search_path_spec=`echo "$lt_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"`
++ 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
+@@ -10243,7 +10684,7 @@
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+-aix4* | aix5*)
++aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -10382,12 +10823,8 @@
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+- if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+- else
+- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+- fi
++
++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+@@ -10441,7 +10878,7 @@
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+- freebsd*) # from 4.6 on
++ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+@@ -10504,7 +10941,7 @@
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+-interix3*)
++interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -10575,7 +11012,7 @@
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++ 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="/lib /usr/lib $lt_ld_extra"
+ fi
+
+@@ -10681,6 +11118,10 @@
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
++rdos*)
++ dynamic_linker=no
++ ;;
++
+ solaris*)
+ version_type=linux
+ need_lib_prefix=no
+@@ -10777,6 +11218,21 @@
+ echo "${ECHO_T}$dynamic_linker" >&6; }
+ test "$dynamic_linker" = no && can_build_shared=no
+
++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
++fi
++
++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
++fi
++
++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++
+ 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"
+@@ -10834,6 +11290,7 @@
+ 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
+@@ -11095,7 +11552,7 @@
+ { 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"
++ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+ else
+ { echo "$as_me:$LINENO: checking for dlopen" >&5
+ echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+@@ -11371,7 +11828,7 @@
+ { 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"
++ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+ fi
+
+
+@@ -11420,7 +11877,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+-#line 11423 "configure"
++#line 11880 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11520,7 +11977,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+-#line 11523 "configure"
++#line 11980 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11647,7 +12104,7 @@
+ fi
+ ;;
+
+-aix4* | aix5*)
++aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+@@ -11703,6 +12160,7 @@
+ predeps \
+ postdeps \
+ compiler_lib_search_path \
++ compiler_lib_search_dirs \
+ archive_cmds \
+ archive_expsym_cmds \
+ postinstall_cmds \
+@@ -11718,6 +12176,7 @@
+ module_cmds \
+ module_expsym_cmds \
+ lt_cv_prog_compiler_c_o \
++ fix_srcfile_path \
+ exclude_expsyms \
+ include_expsyms; do
+
+@@ -11762,7 +12221,7 @@
+ # 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
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ # Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Libtool:
+@@ -11998,6 +12457,10 @@
+ # shared library.
+ postdeps=$lt_postdeps
+
++# The directories searched by this compiler when creating a shared
++# library
++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
++
+ # The library search path used internally by the compiler when linking
+ # a shared library.
+ compiler_lib_search_path=$lt_compiler_lib_search_path
+@@ -12086,7 +12549,7 @@
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$fix_srcfile_path"
++fix_srcfile_path=$lt_fix_srcfile_path
+
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols
+@@ -12246,6 +12709,7 @@
+ predeps_CXX=
+ postdeps_CXX=
+ compiler_lib_search_path_CXX=
++compiler_lib_search_dirs_CXX=
+
+ # Source file extension for C++ test sources.
+ ac_ext=cpp
+@@ -12255,10 +12719,10 @@
+ objext_CXX=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="int some_variable = 0;\n"
++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); }\n'
++lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+@@ -12274,16 +12738,16 @@
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++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
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++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*
++$rm -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+@@ -12490,7 +12954,7 @@
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+- aix4* | aix5*)
++ aix[4-9]*)
+ 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.
+@@ -12503,7 +12967,7 @@
+ # 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*)
++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+@@ -12539,7 +13003,7 @@
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+- hardcode_direct_CXX=yes
++ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+@@ -12613,11 +13077,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -12673,11 +13144,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -12747,59 +13225,31 @@
+ 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
++ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
++ if test "$GXX" = yes ; then
+ output_verbose_link_cmd='echo'
+- if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+- lt_int_apple_cc_single_mod=yes
++ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
++ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
++ 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${_lt_dsymutil}"
++ archive_expsym_cmds_CXX="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
+ 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` $verstring'
++ 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ 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}'
+ ;;
+ *)
+@@ -12882,9 +13332,7 @@
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+- hppa*64*|ia64*)
+- hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+- ;;
++ hppa*64*|ia64*) ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+@@ -12952,7 +13400,7 @@
+ ;;
+ esac
+ ;;
+- interix3*)
++ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+@@ -13044,7 +13492,7 @@
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+- pgCC*)
++ pgCC* | pgcpp*)
+ # 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'
+@@ -13072,6 +13520,29 @@
+ # 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*)
+@@ -13110,16 +13581,20 @@
+ ld_shlibs_CXX=no
+ ;;
+ openbsd*)
+- hardcode_direct_CXX=yes
+- hardcode_shlibpath_var_CXX=no
+- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+- export_dynamic_flag_spec_CXX='${wl}-E'
+- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
++ 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
+- output_verbose_link_cmd='echo'
+ ;;
+ osf3*)
+ case $cc_basename in
+@@ -13281,15 +13756,10 @@
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+- # The C++ compiler is used as linker so we must use $wl
+- # flag to pass the commands to the underlying system
+- # linker. We must also pass each convience library through
+- # to the system linker between allextract/defaultextract.
+- # The C++ compiler will combine linker options so we
+- # cannot just pass the convience library names through
+- # without $wl.
++ # 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='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
++ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+@@ -13336,6 +13806,12 @@
+ 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
+@@ -13423,7 +13899,6 @@
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+-
+ cat > conftest.$ac_ext <<EOF
+ class Foo
+ {
+@@ -13525,9 +14000,14 @@
+
+ $rm -f confest.$objext
+
++compiler_lib_search_dirs_CXX=
++if test -n "$compiler_lib_search_path_CXX"; then
++ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
++fi
++
+ # PORTME: override above test on systems where it is broken
+ case $host_os in
+-interix3*)
++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=
+@@ -13535,19 +14015,51 @@
+ 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.
+- postdeps_CXX='-lCstd -lCrun'
++ 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
+@@ -13578,12 +14090,14 @@
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+- mingw* | os2* | pw32*)
++ 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*)
+@@ -13595,7 +14109,7 @@
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+- interix3*)
++ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+@@ -13621,7 +14135,7 @@
+ esac
+ else
+ case $host_os in
+- aix4* | aix5*)
++ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+@@ -13717,7 +14231,7 @@
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+- pgCC*)
++ pgCC* | pgcpp*)
+ # Portland Group C++ compiler.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+@@ -13731,6 +14245,14 @@
+ 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
+ ;;
+@@ -13840,12 +14362,12 @@
+
+ { 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
++if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_pic_works_CXX=no
++ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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.
+@@ -13856,27 +14378,27 @@
+ -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:13859: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:14381: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:13863: \$? = $ac_status" >&5
++ echo "$as_me:14385: \$? = $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
++ lt_cv_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; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
++if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+@@ -13903,13 +14425,13 @@
+ 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
++if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_static_works_CXX=no
++ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+- printf "$lt_simple_link_test_code" > conftest.$ac_ext
++ 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
+@@ -13919,20 +14441,20 @@
+ $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
++ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+- lt_prog_compiler_static_works_CXX=yes
++ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+- $rm conftest*
++ $rm -r 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; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
++if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
+ else
+ lt_prog_compiler_static_CXX=
+@@ -13949,7 +14471,7 @@
+ mkdir conftest
+ cd conftest
+ mkdir out
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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
+@@ -13960,11 +14482,11 @@
+ -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:13963: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:14485: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:13967: \$? = $ac_status" >&5
++ echo "$as_me:14489: \$? = $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
+@@ -14017,7 +14539,7 @@
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+- aix4* | aix5*)
++ aix[4-9]*)
+ # 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
+@@ -14030,7 +14552,7 @@
+ 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 -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs_CXX=no
+@@ -14039,6 +14561,7 @@
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
++ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+ { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+ echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+@@ -14064,7 +14587,7 @@
+ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ $rm conftest*
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+@@ -14122,20 +14645,7 @@
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
+-if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+- # if the path contains ";" then we assume it to be the separator
+- # otherwise default to the standard path separator (i.e. ":") - it is
+- # assumed that no part of a normal pathname contains ";" but that should
+- # okay in the real world where ";" in dirpaths is itself problematic.
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+- else
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+- fi
+-else
+- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+-fi
++
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+
+@@ -14153,7 +14663,7 @@
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+-aix4* | aix5*)
++aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -14292,12 +14802,7 @@
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+- if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+- else
+- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+- fi
++
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+@@ -14351,7 +14856,7 @@
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+- freebsd*) # from 4.6 on
++ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+@@ -14414,7 +14919,7 @@
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+-interix3*)
++interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -14485,7 +14990,7 @@
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++ 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="/lib /usr/lib $lt_ld_extra"
+ fi
+
+@@ -14591,6 +15096,10 @@
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
++rdos*)
++ dynamic_linker=no
++ ;;
++
+ solaris*)
+ version_type=linux
+ need_lib_prefix=no
+@@ -14687,6 +15196,21 @@
+ echo "${ECHO_T}$dynamic_linker" >&6; }
+ test "$dynamic_linker" = no && can_build_shared=no
+
++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
++fi
++
++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
++fi
++
++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++
+ 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"
+@@ -14770,6 +15294,7 @@
+ predeps_CXX \
+ postdeps_CXX \
+ compiler_lib_search_path_CXX \
++ compiler_lib_search_dirs_CXX \
+ archive_cmds_CXX \
+ archive_expsym_cmds_CXX \
+ postinstall_cmds_CXX \
+@@ -14785,6 +15310,7 @@
+ 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
+
+@@ -15017,6 +15543,10 @@
+ # shared library.
+ postdeps=$lt_postdeps_CXX
+
++# The directories searched by this compiler when creating a shared
++# library
++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_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
+@@ -15105,7 +15635,7 @@
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$fix_srcfile_path_CXX"
++fix_srcfile_path=$lt_fix_srcfile_path
+
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_CXX
+@@ -15196,10 +15726,17 @@
+ objext_F77=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
++lt_simple_compile_test_code="\
++ subroutine t
++ return
++ end
++"
+
+ # Code to be used in simple link tests
+-lt_simple_link_test_code=" program t\n end\n"
++lt_simple_link_test_code="\
++ program t
++ end
++"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+@@ -15215,16 +15752,16 @@
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++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
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++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*
++$rm -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+@@ -15262,7 +15799,7 @@
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+-aix4* | aix5*)
++aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+@@ -15308,13 +15845,15 @@
+ lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+ ;;
+
+- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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'
+ ;;
+
+@@ -15324,7 +15863,7 @@
+ lt_prog_compiler_pic_F77='-fno-common'
+ ;;
+
+- interix3*)
++ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+@@ -15382,7 +15921,7 @@
+ esac
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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'
+@@ -15434,6 +15973,22 @@
+ # 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
+ ;;
+
+@@ -15443,6 +15998,10 @@
+ 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'
+@@ -15505,12 +16064,12 @@
+
+ { 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
++if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_pic_works_F77=no
++ lt_cv_prog_compiler_pic_works_F77=no
+ ac_outfile=conftest.$ac_objext
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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.
+@@ -15521,27 +16080,27 @@
+ -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:15524: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16083: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:15528: \$? = $ac_status" >&5
++ echo "$as_me:16087: \$? = $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
++ lt_cv_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; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; }
+
+-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
++if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
+ case $lt_prog_compiler_pic_F77 in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+@@ -15568,13 +16127,13 @@
+ 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
++if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_static_works_F77=no
++ lt_cv_prog_compiler_static_works_F77=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+- printf "$lt_simple_link_test_code" > conftest.$ac_ext
++ 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
+@@ -15584,20 +16143,20 @@
+ $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
++ lt_cv_prog_compiler_static_works_F77=yes
+ fi
+ else
+- lt_prog_compiler_static_works_F77=yes
++ lt_cv_prog_compiler_static_works_F77=yes
+ fi
+ fi
+- $rm conftest*
++ $rm -r 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; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; }
+
+-if test x"$lt_prog_compiler_static_works_F77" = xyes; then
++if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
+ :
+ else
+ lt_prog_compiler_static_F77=
+@@ -15614,7 +16173,7 @@
+ mkdir conftest
+ cd conftest
+ mkdir out
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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
+@@ -15625,11 +16184,11 @@
+ -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:15628: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:16187: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:15632: \$? = $ac_status" >&5
++ echo "$as_me:16191: \$? = $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
+@@ -15709,12 +16268,13 @@
+ # 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_"
++ exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # 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.
++ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+ # Just being paranoid about ensuring that cc_basename is set.
+ for cc_temp in $compiler""; do
+@@ -15773,7 +16333,7 @@
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+- aix3* | aix4* | aix5*)
++ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs_F77=no
+@@ -15821,7 +16381,7 @@
+ 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/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
++ 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'
+@@ -15839,7 +16399,7 @@
+ fi
+ ;;
+
+- interix3*)
++ interix[3-9]*)
+ hardcode_direct_F77=no
+ hardcode_shlibpath_var_F77=no
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+@@ -15854,7 +16414,7 @@
+ 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'
+ ;;
+
+- linux* | k*bsd*-gnu)
++ 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
+@@ -15872,13 +16432,22 @@
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+- archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ link_all_deplibs_F77=no
+ else
+@@ -15984,7 +16553,7 @@
+ fi
+ ;;
+
+- aix4* | aix5*)
++ aix[4-9]*)
+ 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.
+@@ -16004,7 +16573,7 @@
+ # 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*)
++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+@@ -16038,7 +16607,7 @@
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+- hardcode_direct_F77=yes
++ :
+ else
+ # We have old collect2
+ hardcode_direct_F77=unsupported
+@@ -16102,11 +16671,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -16151,11 +16727,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -16209,7 +16792,7 @@
+ # 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'
++ old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes_F77=yes
+ ;;
+@@ -16242,19 +16825,18 @@
+ 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}'
++ archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++ 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ 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}'
+ ;;
+ *)
+@@ -16416,24 +16998,28 @@
+ ;;
+
+ openbsd*)
+- 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'
++ 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
+- 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
++ ld_shlibs_F77=no
+ fi
+ ;;
+
+@@ -16492,17 +17078,16 @@
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+- # The compiler driver will combine linker options so we
+- # cannot just pass the convience library names through
+- # without $wl, iff we do not link with $LD.
+- # Luckily, gcc supports the same syntax we need for Sun Studio.
++ # 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?)
+- case $wlarc in
+- '')
+- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+- *)
+- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+- esac ;;
++ 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
+ ;;
+@@ -16559,7 +17144,7 @@
+ fi
+ ;;
+
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
++ 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
+@@ -16636,7 +17221,7 @@
+ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ $rm conftest*
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+@@ -16694,20 +17279,7 @@
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
+-if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+- # if the path contains ";" then we assume it to be the separator
+- # otherwise default to the standard path separator (i.e. ":") - it is
+- # assumed that no part of a normal pathname contains ";" but that should
+- # okay in the real world where ";" in dirpaths is itself problematic.
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+- else
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+- fi
+-else
+- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+-fi
++
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+
+@@ -16725,7 +17297,7 @@
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+-aix4* | aix5*)
++aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -16864,12 +17436,7 @@
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+- if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+- else
+- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+- fi
++
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+@@ -16923,7 +17490,7 @@
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+- freebsd*) # from 4.6 on
++ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+@@ -16986,7 +17553,7 @@
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+-interix3*)
++interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -17057,7 +17624,7 @@
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++ 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="/lib /usr/lib $lt_ld_extra"
+ fi
+
+@@ -17163,6 +17730,10 @@
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
++rdos*)
++ dynamic_linker=no
++ ;;
++
+ solaris*)
+ version_type=linux
+ need_lib_prefix=no
+@@ -17259,6 +17830,21 @@
+ echo "${ECHO_T}$dynamic_linker" >&6; }
+ test "$dynamic_linker" = no && can_build_shared=no
+
++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
++fi
++
++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
++fi
++
++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++
+ 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"
+@@ -17342,6 +17928,7 @@
+ predeps_F77 \
+ postdeps_F77 \
+ compiler_lib_search_path_F77 \
++ compiler_lib_search_dirs_F77 \
+ archive_cmds_F77 \
+ archive_expsym_cmds_F77 \
+ postinstall_cmds_F77 \
+@@ -17357,6 +17944,7 @@
+ 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
+
+@@ -17589,6 +18177,10 @@
+ # shared library.
+ postdeps=$lt_postdeps_F77
+
++# The directories searched by this compiler when creating a shared
++# library
++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_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
+@@ -17677,7 +18269,7 @@
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$fix_srcfile_path_F77"
++fix_srcfile_path=$lt_fix_srcfile_path
+
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_F77
+@@ -17735,10 +18327,10 @@
+ objext_GCJ=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code="class foo {}\n"
++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) {}; }\n'
++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.
+
+@@ -17754,16 +18346,16 @@
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++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
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++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*
++$rm -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+@@ -17801,7 +18393,7 @@
+ else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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.
+@@ -17812,11 +18404,11 @@
+ -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:17815: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:18407: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:17819: \$? = $ac_status" >&5
++ echo "$as_me:18411: \$? = $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.
+@@ -17867,14 +18459,16 @@
+ lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+ ;;
+
+- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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'
++ # Although the cygwin gcc ignores -fPIC, still need this for old-style
++ # (--disable-auto-import) libraries
++
+ ;;
+
+ darwin* | rhapsody*)
+@@ -17883,7 +18477,7 @@
+ lt_prog_compiler_pic_GCJ='-fno-common'
+ ;;
+
+- interix3*)
++ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+@@ -17941,10 +18535,10 @@
+ esac
+ ;;
+
+- mingw* | pw32* | os2*)
++ 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*)
+@@ -17993,6 +18587,22 @@
+ # 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
+ ;;
+
+@@ -18002,6 +18612,10 @@
+ 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'
+@@ -18064,12 +18678,12 @@
+
+ { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+ echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
+-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
++if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_pic_works_GCJ=no
++ lt_cv_prog_compiler_pic_works_GCJ=no
+ ac_outfile=conftest.$ac_objext
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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.
+@@ -18080,27 +18694,27 @@
+ -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:18083: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:18697: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+- echo "$as_me:18087: \$? = $ac_status" >&5
++ echo "$as_me:18701: \$? = $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
++ lt_cv_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; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; }
+
+-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
++if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then
+ case $lt_prog_compiler_pic_GCJ in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+@@ -18127,13 +18741,13 @@
+ 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
++if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- lt_prog_compiler_static_works_GCJ=no
++ lt_cv_prog_compiler_static_works_GCJ=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+- printf "$lt_simple_link_test_code" > conftest.$ac_ext
++ 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
+@@ -18143,20 +18757,20 @@
+ $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
++ lt_cv_prog_compiler_static_works_GCJ=yes
+ fi
+ else
+- lt_prog_compiler_static_works_GCJ=yes
++ lt_cv_prog_compiler_static_works_GCJ=yes
+ fi
+ fi
+- $rm conftest*
++ $rm -r 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; }
++{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
++echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; }
+
+-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
++if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then
+ :
+ else
+ lt_prog_compiler_static_GCJ=
+@@ -18173,7 +18787,7 @@
+ mkdir conftest
+ cd conftest
+ mkdir out
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ 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
+@@ -18184,11 +18798,11 @@
+ -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:18187: $lt_compile\"" >&5)
++ (eval echo "\"\$as_me:18801: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+- echo "$as_me:18191: \$? = $ac_status" >&5
++ echo "$as_me:18805: \$? = $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
+@@ -18268,12 +18882,13 @@
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+- exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
++ exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # 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.
++ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+ # Just being paranoid about ensuring that cc_basename is set.
+ for cc_temp in $compiler""; do
+@@ -18332,7 +18947,7 @@
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+- aix3* | aix4* | aix5*)
++ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs_GCJ=no
+@@ -18380,7 +18995,7 @@
+ 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/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
++ 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'
+@@ -18398,7 +19013,7 @@
+ fi
+ ;;
+
+- interix3*)
++ interix[3-9]*)
+ hardcode_direct_GCJ=no
+ hardcode_shlibpath_var_GCJ=no
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+@@ -18413,7 +19028,7 @@
+ 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'
+ ;;
+
+- linux* | k*bsd*-gnu)
++ 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
+@@ -18431,13 +19046,22 @@
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+- archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++ 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ link_all_deplibs_GCJ=no
+ else
+@@ -18543,7 +19167,7 @@
+ fi
+ ;;
+
+- aix4* | aix5*)
++ aix[4-9]*)
+ 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.
+@@ -18563,7 +19187,7 @@
+ # 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*)
++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+@@ -18597,7 +19221,7 @@
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+- hardcode_direct_GCJ=yes
++ :
+ else
+ # We have old collect2
+ hardcode_direct_GCJ=unsupported
+@@ -18671,11 +19295,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -18730,11 +19361,18 @@
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`
++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 '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+-}'`; fi
++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
+@@ -18788,7 +19426,7 @@
+ # 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'
++ old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes_GCJ=yes
+ ;;
+@@ -18821,19 +19459,18 @@
+ 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}'
++ archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
++ module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
++ archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
++ module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd='echo'
+- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
++ 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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
++ 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}'
+ ;;
+ *)
+@@ -18995,24 +19632,28 @@
+ ;;
+
+ openbsd*)
+- hardcode_direct_GCJ=yes
+- hardcode_shlibpath_var_GCJ=no
+- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+- archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+- export_dynamic_flag_spec_GCJ='${wl}-E'
++ 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
+- 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
++ ld_shlibs_GCJ=no
+ fi
+ ;;
+
+@@ -19071,17 +19712,16 @@
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+- # The compiler driver will combine linker options so we
+- # cannot just pass the convience library names through
+- # without $wl, iff we do not link with $LD.
+- # Luckily, gcc supports the same syntax we need for Sun Studio.
++ # 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?)
+- case $wlarc in
+- '')
+- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+- *)
+- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+- esac ;;
++ 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
+ ;;
+@@ -19138,7 +19778,7 @@
+ fi
+ ;;
+
+- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
++ 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
+@@ -19215,7 +19855,7 @@
+ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+ echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ $rm conftest*
+- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
++ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+@@ -19273,20 +19913,7 @@
+ version_type=none
+ dynamic_linker="$host_os ld.so"
+ sys_lib_dlsearch_path_spec="/lib /usr/lib"
+-if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+- # if the path contains ";" then we assume it to be the separator
+- # otherwise default to the standard path separator (i.e. ":") - it is
+- # assumed that no part of a normal pathname contains ";" but that should
+- # okay in the real world where ";" in dirpaths is itself problematic.
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+- else
+- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+- fi
+-else
+- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+-fi
++
+ need_lib_prefix=unknown
+ hardcode_into_libs=no
+
+@@ -19304,7 +19931,7 @@
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+-aix4* | aix5*)
++aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -19443,12 +20070,7 @@
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+- if test "$GCC" = yes; then
+- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+- else
+- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+- fi
++
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+@@ -19502,7 +20124,7 @@
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+- freebsd*) # from 4.6 on
++ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+@@ -19565,7 +20187,7 @@
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+-interix3*)
++interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+@@ -19636,7 +20258,7 @@
+
+ # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
++ 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="/lib /usr/lib $lt_ld_extra"
+ fi
+
+@@ -19742,6 +20364,10 @@
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
++rdos*)
++ dynamic_linker=no
++ ;;
++
+ solaris*)
+ version_type=linux
+ need_lib_prefix=no
+@@ -19838,6 +20464,21 @@
+ echo "${ECHO_T}$dynamic_linker" >&6; }
+ test "$dynamic_linker" = no && can_build_shared=no
+
++if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
++fi
++
++sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
++if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
++fi
++
++sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
++
+ 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"
+@@ -19921,6 +20562,7 @@
+ predeps_GCJ \
+ postdeps_GCJ \
+ compiler_lib_search_path_GCJ \
++ compiler_lib_search_dirs_GCJ \
+ archive_cmds_GCJ \
+ archive_expsym_cmds_GCJ \
+ postinstall_cmds_GCJ \
+@@ -19936,6 +20578,7 @@
+ 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
+
+@@ -20168,6 +20811,10 @@
+ # shared library.
+ postdeps=$lt_postdeps_GCJ
+
++# The directories searched by this compiler when creating a shared
++# library
++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_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
+@@ -20256,7 +20903,7 @@
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$fix_srcfile_path_GCJ"
++fix_srcfile_path=$lt_fix_srcfile_path
+
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_GCJ
+@@ -20313,7 +20960,7 @@
+ objext_RC=$objext
+
+ # Code to be used in simple compile tests
+-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
++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"
+@@ -20332,16 +20979,16 @@
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
++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
+-printf "$lt_simple_link_test_code" >conftest.$ac_ext
++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*
++$rm -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+@@ -20401,6 +21048,7 @@
+ predeps_RC \
+ postdeps_RC \
+ compiler_lib_search_path_RC \
++ compiler_lib_search_dirs_RC \
+ archive_cmds_RC \
+ archive_expsym_cmds_RC \
+ postinstall_cmds_RC \
+@@ -20416,6 +21064,7 @@
+ 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
+
+@@ -20648,6 +21297,10 @@
+ # shared library.
+ postdeps=$lt_postdeps_RC
+
++# The directories searched by this compiler when creating a shared
++# library
++compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_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
+@@ -20736,7 +21389,7 @@
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+ # Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path="$fix_srcfile_path_RC"
++fix_srcfile_path=$lt_fix_srcfile_path
+
+ # Set to yes if exported symbols are required.
+ always_export_symbols=$always_export_symbols_RC
+@@ -20941,9 +21594,7 @@
+
+ fi
+
+-
+-
+-if test x$ENABLE_ENGINE = xyes; then
++ if test x$ENABLE_ENGINE = xyes; then
+ BUILD_ENGINE_TRUE=
+ BUILD_ENGINE_FALSE='#'
+ else
+@@ -20999,9 +21650,7 @@
+ fi
+
+
+-
+-
+-if test "x${WITH_PROF}" = "xyes"; then
++ if test "x${WITH_PROF}" = "xyes"; then
+ ENABLE_PROF_TRUE=
+ ENABLE_PROF_FALSE='#'
+ else
+@@ -21015,9 +21664,7 @@
+ enableval=$enable_tools; WITH_TOOLS=$enableval
+ fi
+
+-
+-
+-if test "x${WITH_TOOLS}" = "xyes"; then
++ if test "x${WITH_TOOLS}" = "xyes"; then
+ ENABLE_TOOLS_TRUE=
+ ENABLE_TOOLS_FALSE='#'
+ else
+@@ -21238,7 +21885,7 @@
+ and XML_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details.
+
+-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
++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
+@@ -21248,7 +21895,7 @@
+ and XML_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details.
+
+-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+ See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ else
+@@ -21633,9 +22280,7 @@
+ fi
+
+ fi
+-
+-
+-if test x$HAVE_CHECK = x1; then
++ if test x$HAVE_CHECK = x1; then
+ ENABLE_TESTS_TRUE=
+ ENABLE_TESTS_FALSE='#'
+ else
+@@ -21703,7 +22348,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+
+- for am_cv_pathless_PYTHON in python python2 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 : ; do
++ for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 : ; do
+ if test "$am_cv_pathless_PYTHON" = : ; then
+ { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
+ echo "$as_me: error: no suitable Python interpreter found" >&2;}
+@@ -22097,9 +22742,7 @@
+ fi
+ fi
+ fi
+-
+-
+-if test x$have_python = xyes; then
++ if test x$have_python = xyes; then
+ HAVE_PYTHON_TRUE=
+ HAVE_PYTHON_FALSE='#'
+ else
+@@ -22201,7 +22844,7 @@
+ and PACKAGE_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details.
+
+-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
++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
+@@ -22211,7 +22854,7 @@
+ and PACKAGE_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details.
+
+-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+ See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ else
+@@ -22790,6 +23433,7 @@
+ ac_pwd='$ac_pwd'
+ srcdir='$srcdir'
+ INSTALL='$INSTALL'
++MKDIR_P='$MKDIR_P'
+ _ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+@@ -23011,6 +23655,7 @@
+ 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
+@@ -23056,18 +23701,17 @@
+ host_cpu!$host_cpu$ac_delim
+ host_vendor!$host_vendor$ac_delim
+ host_os!$host_os$ac_delim
++SED!$SED$ac_delim
+ LN_S!$LN_S$ac_delim
+ ECHO!$ECHO$ac_delim
+ AR!$AR$ac_delim
+ RANLIB!$RANLIB$ac_delim
++DSYMUTIL!$DSYMUTIL$ac_delim
++NMEDIT!$NMEDIT$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
+-CXXCPP!$CXXCPP$ac_delim
+-F77!$F77$ac_delim
+ _ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+@@ -23109,6 +23753,10 @@
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
++am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
++am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$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
+@@ -23166,7 +23814,7 @@
+ LTLIBOBJS!$LTLIBOBJS$ac_delim
+ _ACEOF
+
+- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 55; then
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 59; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+@@ -23393,6 +24041,11 @@
+ [\\/$]* | ?:[\\/]* ) 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
+@@ -23446,6 +24099,7 @@
+ 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" >$tmp/out
+
+@@ -23610,8 +24264,9 @@
+ # 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.
+- # So let's grep whole file.
+- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
++ # 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 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/coverage.sh opensync-0.22/coverage.sh
+--- libopensync-0.22/coverage.sh 1970-01-01 01:00:00.000000000 +0100
++++ opensync-0.22/coverage.sh 2013-04-28 02:38:27.000000000 +0200
+@@ -0,0 +1,23 @@
++#!/bin/bash
++
++echo "Checking Code Coverage:"
++mv ../opensync/.libs/*.bb ../opensync &> /dev/null
++mv ../opensync/.libs/*.bbg ../opensync &> /dev/null
++mv ../opensync/.libs/*.da ../opensync &> /dev/null
++
++mv ../osengine/.libs/*.bb ../osengine &> /dev/null
++mv ../osengine/.libs/*.bbg ../osengine &> /dev/null
++mv ../osengine/.libs/*.da ../osengine &> /dev/null
++
++lcov -d ../opensync -d ../osengine -d . -q -c -o coverage/app.info
++
++genhtml -o coverage coverage/app.info &> /dev/null
++
++#lcov -d ../opensync -q -z &> /dev/null
++#lcov -d ../osengine -q -z &> /dev/null
++#lcov -d . -q -z &> /dev/null
++
++echo -n "Code Coverage is: "
++grep " %</td>" coverage/index.html | sed -e "s/^[^>]*>//g" -e "s/<[^>]*>//g"
++echo -n ""
++exit 0
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/formats/Makefile.in opensync-0.22/formats/Makefile.in
+--- libopensync-0.22/formats/Makefile.in 2007-03-27 14:22:03.000000000 +0200
++++ opensync-0.22/formats/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 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.
+@@ -15,15 +15,11 @@
+ @SET_MAKE@
+
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -61,32 +57,51 @@
+ contact_la_DEPENDENCIES =
+ am_contact_la_OBJECTS = contact.lo
+ contact_la_OBJECTS = $(am_contact_la_OBJECTS)
++contact_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(contact_la_LDFLAGS) $(LDFLAGS) -o $@
+ data_la_DEPENDENCIES =
+ am_data_la_OBJECTS = data.lo
+ data_la_OBJECTS = $(am_data_la_OBJECTS)
++data_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(data_la_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ event_la_DEPENDENCIES =
+ am_event_la_OBJECTS = event.lo
+ event_la_OBJECTS = $(am_event_la_OBJECTS)
++event_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(event_la_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ file_la_DEPENDENCIES =
+ am_file_la_OBJECTS = file.lo
+ file_la_OBJECTS = $(am_file_la_OBJECTS)
++file_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(file_la_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ note_la_DEPENDENCIES =
+ am_note_la_OBJECTS = note.lo
+ note_la_OBJECTS = $(am_note_la_OBJECTS)
++note_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(note_la_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ todo_la_DEPENDENCIES =
+ am_todo_la_OBJECTS = todo.lo
+ todo_la_OBJECTS = $(am_todo_la_OBJECTS)
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++todo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(todo_la_LDFLAGS) \
++ $(LDFLAGS) -o $@
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(contact_la_SOURCES) $(data_la_SOURCES) $(event_la_SOURCES) \
+ $(file_la_SOURCES) $(note_la_SOURCES) $(todo_la_SOURCES)
+ DIST_SOURCES = $(contact_la_SOURCES) $(data_la_SOURCES) \
+@@ -94,19 +109,20 @@
+ $(todo_la_SOURCES)
+ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+- install-exec-recursive install-info-recursive \
+- install-recursive installcheck-recursive installdirs-recursive \
+- pdf-recursive ps-recursive uninstall-info-recursive \
+- uninstall-recursive
++ 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
+ opensyncheaderHEADERS_INSTALL = $(INSTALL_HEADER)
+ HEADERS = $(opensyncheader_HEADERS)
++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@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -114,8 +130,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -130,18 +144,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -149,8 +158,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -162,6 +170,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -190,6 +200,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -202,15 +213,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -222,6 +233,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -253,8 +265,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+ formatsdir = @OPENSYNC_FORMATSDIR@
+ opensyncheaderdir = @OPENSYNC_HEADERDIR@
+@@ -315,7 +330,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-formatsLTLIBRARIES: $(formats_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(formatsdir)" || $(mkdir_p) "$(DESTDIR)$(formatsdir)"
++ test -z "$(formatsdir)" || $(MKDIR_P) "$(DESTDIR)$(formatsdir)"
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -326,7 +341,7 @@
+
+ uninstall-formatsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(formats_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(formatsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(formatsdir)/$$p"; \
+@@ -341,17 +356,17 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ contact.la: $(contact_la_OBJECTS) $(contact_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(contact_la_LDFLAGS) $(contact_la_OBJECTS) $(contact_la_LIBADD) $(LIBS)
++ $(contact_la_LINK) -rpath $(formatsdir) $(contact_la_OBJECTS) $(contact_la_LIBADD) $(LIBS)
+ data.la: $(data_la_OBJECTS) $(data_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(data_la_LDFLAGS) $(data_la_OBJECTS) $(data_la_LIBADD) $(LIBS)
++ $(data_la_LINK) -rpath $(formatsdir) $(data_la_OBJECTS) $(data_la_LIBADD) $(LIBS)
+ event.la: $(event_la_OBJECTS) $(event_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(event_la_LDFLAGS) $(event_la_OBJECTS) $(event_la_LIBADD) $(LIBS)
++ $(event_la_LINK) -rpath $(formatsdir) $(event_la_OBJECTS) $(event_la_LIBADD) $(LIBS)
+ file.la: $(file_la_OBJECTS) $(file_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(file_la_LDFLAGS) $(file_la_OBJECTS) $(file_la_LIBADD) $(LIBS)
++ $(file_la_LINK) -rpath $(formatsdir) $(file_la_OBJECTS) $(file_la_LIBADD) $(LIBS)
+ note.la: $(note_la_OBJECTS) $(note_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(note_la_LDFLAGS) $(note_la_OBJECTS) $(note_la_LIBADD) $(LIBS)
++ $(note_la_LINK) -rpath $(formatsdir) $(note_la_OBJECTS) $(note_la_LIBADD) $(LIBS)
+ todo.la: $(todo_la_OBJECTS) $(todo_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(todo_la_LDFLAGS) $(todo_la_OBJECTS) $(todo_la_LIBADD) $(LIBS)
++ $(todo_la_LINK) -rpath $(formatsdir) $(todo_la_OBJECTS) $(todo_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -367,22 +382,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/todo.Plo@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -392,13 +407,9 @@
+
+ clean-libtool:
+ -rm -rf .libs _libs
+-
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+ install-opensyncheaderHEADERS: $(opensyncheader_HEADERS)
+ @$(NORMAL_INSTALL)
+- test -z "$(opensyncheaderdir)" || $(mkdir_p) "$(DESTDIR)$(opensyncheaderdir)"
++ test -z "$(opensyncheaderdir)" || $(MKDIR_P) "$(DESTDIR)$(opensyncheaderdir)"
+ @list='$(opensyncheader_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+@@ -445,8 +456,7 @@
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+-mostlyclean-recursive clean-recursive distclean-recursive \
+-maintainer-clean-recursive:
++$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+@@ -547,22 +557,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -576,7 +585,7 @@
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+- || $(mkdir_p) "$(distdir)/$$subdir" \
++ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+@@ -584,6 +593,8 @@
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
++ am__remove_distdir=: \
++ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+@@ -594,7 +605,7 @@
+ installdirs: installdirs-recursive
+ installdirs-am:
+ for dir in "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(opensyncheaderdir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-recursive
+ install-exec: install-exec-recursive
+@@ -629,7 +640,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-recursive
+
+@@ -644,12 +655,20 @@
+ install-data-am: install-formatsLTLIBRARIES \
+ install-opensyncheaderHEADERS
+
++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
+@@ -670,27 +689,28 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-formatsLTLIBRARIES uninstall-info-am \
++uninstall-am: uninstall-formatsLTLIBRARIES \
+ uninstall-opensyncheaderHEADERS
+
+-uninstall-info: uninstall-info-recursive
++.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
++ install-strip
+
+-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+- clean clean-formatsLTLIBRARIES clean-generic clean-libtool \
+- clean-recursive ctags ctags-recursive distclean \
++.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
++ all all-am check check-am clean clean-formatsLTLIBRARIES \
++ clean-generic clean-libtool ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+- distclean-recursive distclean-tags distdir dvi dvi-am html \
+- html-am info info-am install install-am install-data \
+- install-data-am install-exec install-exec-am \
+- install-formatsLTLIBRARIES install-info install-info-am \
+- install-man install-opensyncheaderHEADERS install-strip \
+- installcheck installcheck-am installdirs installdirs-am \
+- maintainer-clean maintainer-clean-generic \
+- maintainer-clean-recursive mostlyclean mostlyclean-compile \
+- mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+- uninstall-formatsLTLIBRARIES uninstall-info-am \
+- uninstall-opensyncheaderHEADERS
++ 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-formatsLTLIBRARIES install-html install-html-am \
++ install-info install-info-am install-man \
++ install-opensyncheaderHEADERS 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-formatsLTLIBRARIES uninstall-opensyncheaderHEADERS
+
+ # 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/formats/vformats-xml/Makefile.in opensync-0.22/formats/vformats-xml/Makefile.in
+--- libopensync-0.22/formats/vformats-xml/Makefile.in 2007-03-27 14:22:04.000000000 +0200
++++ opensync-0.22/formats/vformats-xml/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 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.
+@@ -15,15 +15,11 @@
+ @SET_MAKE@
+
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ../..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -62,35 +58,57 @@
+ libopensync_xml_la_DEPENDENCIES =
+ am_libopensync_xml_la_OBJECTS = xml-support.lo
+ libopensync_xml_la_OBJECTS = $(am_libopensync_xml_la_OBJECTS)
++libopensync_xml_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(libopensync_xml_la_LDFLAGS) $(LDFLAGS) -o $@
+ xml_evolution_la_DEPENDENCIES = libopensync-xml.la
+ am_xml_evolution_la_OBJECTS = xml-evolution.lo vformat.lo
+ xml_evolution_la_OBJECTS = $(am_xml_evolution_la_OBJECTS)
++xml_evolution_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(xml_evolution_la_LDFLAGS) $(LDFLAGS) -o $@
+ xml_kde_la_DEPENDENCIES = libopensync-xml.la
+ am_xml_kde_la_OBJECTS = xml-kde.lo vformat.lo
+ xml_kde_la_OBJECTS = $(am_xml_kde_la_OBJECTS)
++xml_kde_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(xml_kde_la_LDFLAGS) $(LDFLAGS) -o $@
+ xml_vcal_la_DEPENDENCIES = libopensync-xml.la
+ am_xml_vcal_la_OBJECTS = xml-vcal.lo vformat.lo vcalical.lo
+ xml_vcal_la_OBJECTS = $(am_xml_vcal_la_OBJECTS)
++xml_vcal_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(xml_vcal_la_LDFLAGS) $(LDFLAGS) -o $@
+ xml_vcard_la_DEPENDENCIES = libopensync-xml.la
+ am_xml_vcard_la_OBJECTS = xml-vcard.lo vformat.lo
+ xml_vcard_la_OBJECTS = $(am_xml_vcard_la_OBJECTS)
++xml_vcard_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(xml_vcard_la_LDFLAGS) $(LDFLAGS) -o $@
+ xml_vnote_la_DEPENDENCIES = libopensync-xml.la
+ am_xml_vnote_la_OBJECTS = xml-vnote.lo vformat.lo
+ xml_vnote_la_OBJECTS = $(am_xml_vnote_la_OBJECTS)
++xml_vnote_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(xml_vnote_la_LDFLAGS) $(LDFLAGS) -o $@
+ xmldoc_la_DEPENDENCIES = libopensync-xml.la
+ am_xmldoc_la_OBJECTS = xmldoc.lo
+ xmldoc_la_OBJECTS = $(am_xmldoc_la_OBJECTS)
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++xmldoc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(xmldoc_la_LDFLAGS) $(LDFLAGS) -o $@
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(libopensync_xml_la_SOURCES) $(xml_evolution_la_SOURCES) \
+ $(xml_kde_la_SOURCES) $(xml_vcal_la_SOURCES) \
+ $(xml_vcard_la_SOURCES) $(xml_vnote_la_SOURCES) \
+@@ -105,8 +123,6 @@
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -114,8 +130,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -130,18 +144,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -149,8 +158,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -162,6 +170,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -190,6 +200,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -202,15 +213,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -222,6 +233,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -253,8 +265,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+ formatsdir = @OPENSYNC_FORMATSDIR@
+ opensyncheaderdir = @OPENSYNC_HEADERDIR@
+@@ -326,7 +341,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-formatsLTLIBRARIES: $(formats_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(formatsdir)" || $(mkdir_p) "$(DESTDIR)$(formatsdir)"
++ test -z "$(formatsdir)" || $(MKDIR_P) "$(DESTDIR)$(formatsdir)"
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -337,7 +352,7 @@
+
+ uninstall-formatsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(formats_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(formatsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(formatsdir)/$$p"; \
+@@ -353,7 +368,7 @@
+ done
+ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -364,7 +379,7 @@
+
+ uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+@@ -379,19 +394,19 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ libopensync-xml.la: $(libopensync_xml_la_OBJECTS) $(libopensync_xml_la_DEPENDENCIES)
+- $(LINK) -rpath $(libdir) $(libopensync_xml_la_LDFLAGS) $(libopensync_xml_la_OBJECTS) $(libopensync_xml_la_LIBADD) $(LIBS)
++ $(libopensync_xml_la_LINK) -rpath $(libdir) $(libopensync_xml_la_OBJECTS) $(libopensync_xml_la_LIBADD) $(LIBS)
+ xml-evolution.la: $(xml_evolution_la_OBJECTS) $(xml_evolution_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(xml_evolution_la_LDFLAGS) $(xml_evolution_la_OBJECTS) $(xml_evolution_la_LIBADD) $(LIBS)
++ $(xml_evolution_la_LINK) -rpath $(formatsdir) $(xml_evolution_la_OBJECTS) $(xml_evolution_la_LIBADD) $(LIBS)
+ xml-kde.la: $(xml_kde_la_OBJECTS) $(xml_kde_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(xml_kde_la_LDFLAGS) $(xml_kde_la_OBJECTS) $(xml_kde_la_LIBADD) $(LIBS)
++ $(xml_kde_la_LINK) -rpath $(formatsdir) $(xml_kde_la_OBJECTS) $(xml_kde_la_LIBADD) $(LIBS)
+ xml-vcal.la: $(xml_vcal_la_OBJECTS) $(xml_vcal_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(xml_vcal_la_LDFLAGS) $(xml_vcal_la_OBJECTS) $(xml_vcal_la_LIBADD) $(LIBS)
++ $(xml_vcal_la_LINK) -rpath $(formatsdir) $(xml_vcal_la_OBJECTS) $(xml_vcal_la_LIBADD) $(LIBS)
+ xml-vcard.la: $(xml_vcard_la_OBJECTS) $(xml_vcard_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(xml_vcard_la_LDFLAGS) $(xml_vcard_la_OBJECTS) $(xml_vcard_la_LIBADD) $(LIBS)
++ $(xml_vcard_la_LINK) -rpath $(formatsdir) $(xml_vcard_la_OBJECTS) $(xml_vcard_la_LIBADD) $(LIBS)
+ xml-vnote.la: $(xml_vnote_la_OBJECTS) $(xml_vnote_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(xml_vnote_la_LDFLAGS) $(xml_vnote_la_OBJECTS) $(xml_vnote_la_LIBADD) $(LIBS)
++ $(xml_vnote_la_LINK) -rpath $(formatsdir) $(xml_vnote_la_OBJECTS) $(xml_vnote_la_LIBADD) $(LIBS)
+ xmldoc.la: $(xmldoc_la_OBJECTS) $(xmldoc_la_DEPENDENCIES)
+- $(LINK) -rpath $(formatsdir) $(xmldoc_la_LDFLAGS) $(xmldoc_la_OBJECTS) $(xmldoc_la_LIBADD) $(LIBS)
++ $(xmldoc_la_LINK) -rpath $(formatsdir) $(xmldoc_la_OBJECTS) $(xmldoc_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -410,22 +425,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmldoc.Plo@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -435,13 +450,9 @@
+
+ clean-libtool:
+ -rm -rf .libs _libs
+-
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+ install-opensyncheaderHEADERS: $(opensyncheader_HEADERS)
+ @$(NORMAL_INSTALL)
+- test -z "$(opensyncheaderdir)" || $(mkdir_p) "$(DESTDIR)$(opensyncheaderdir)"
++ test -z "$(opensyncheaderdir)" || $(MKDIR_P) "$(DESTDIR)$(opensyncheaderdir)"
+ @list='$(opensyncheader_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+@@ -506,22 +517,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -537,7 +547,7 @@
+ all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+ installdirs:
+ for dir in "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(opensyncheaderdir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-am
+ install-exec: install-exec-am
+@@ -572,7 +582,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-am
+
+@@ -587,12 +597,20 @@
+ install-data-am: install-formatsLTLIBRARIES \
+ install-opensyncheaderHEADERS
+
++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
+@@ -613,24 +631,27 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-formatsLTLIBRARIES uninstall-info-am \
+- uninstall-libLTLIBRARIES uninstall-opensyncheaderHEADERS
++uninstall-am: uninstall-formatsLTLIBRARIES uninstall-libLTLIBRARIES \
++ uninstall-opensyncheaderHEADERS
++
++.MAKE: install-am install-strip
+
+ .PHONY: CTAGS GTAGS all all-am check check-am clean \
+ clean-formatsLTLIBRARIES 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-exec install-exec-am \
+- install-formatsLTLIBRARIES install-info install-info-am \
++ install-data install-data-am install-dvi install-dvi-am \
++ install-exec install-exec-am install-formatsLTLIBRARIES \
++ install-html install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man \
+- install-opensyncheaderHEADERS install-strip installcheck \
++ install-opensyncheaderHEADERS 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-formatsLTLIBRARIES \
+- uninstall-info-am uninstall-libLTLIBRARIES \
+- uninstall-opensyncheaderHEADERS
++ uninstall-libLTLIBRARIES uninstall-opensyncheaderHEADERS
+
+ # 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/formats/vformats-xml/vformat.c opensync-0.22/formats/vformats-xml/vformat.c
+--- libopensync-0.22/formats/vformats-xml/vformat.c 2007-03-27 13:49:27.000000000 +0200
++++ opensync-0.22/formats/vformats-xml/vformat.c 2013-04-28 02:38:27.000000000 +0200
+@@ -571,6 +571,11 @@
+ osync_trace(TRACE_INTERNAL, "invalid character found in parameter spec: \"%i\" String so far: %s", lp[0], str->str);
+ g_string_assign (str, "");
+ _skip_until (&lp, ":;");
++ if (*lp == '\r') {
++ osync_trace(TRACE_INTERNAL, "string ended unexpectedly with \\r, skipping it");
++ break;
++ }
++
+ }
+ }
+
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/Makefile.in opensync-0.22/Makefile.in
+--- libopensync-0.22/Makefile.in 2007-03-27 14:22:09.000000000 +0200
++++ opensync-0.22/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,15 +14,11 @@
+
+ @SET_MAKE@
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = .
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -36,6 +32,7 @@
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
++subdir = .
+ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Doxyfile.in \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/config.h.in $(srcdir)/opensync-1.0-uninstalled.pc.in \
+@@ -44,14 +41,13 @@
+ $(srcdir)/osengine-1.0.pc.in $(top_srcdir)/configure AUTHORS \
+ COPYING ChangeLog INSTALL NEWS TODO config.guess config.sub \
+ depcomp install-sh ltmain.sh missing py-compile
+-subdir = .
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+- configure.lineno configure.status.lineno
++ configure.lineno config.status.lineno
+ mkinstalldirs = $(install_sh) -d
+ CONFIG_HEADER = config.h
+ CONFIG_CLEAN_FILES = opensync-1.0.pc opensync-1.0-uninstalled.pc \
+@@ -60,10 +56,11 @@
+ DIST_SOURCES =
+ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+- install-exec-recursive install-info-recursive \
+- install-recursive installcheck-recursive installdirs-recursive \
+- pdf-recursive ps-recursive uninstall-info-recursive \
+- uninstall-recursive
++ 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/||"`;; \
+@@ -73,6 +70,8 @@
+ 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)
+@@ -88,8 +87,6 @@
+ distuninstallcheck_listfiles = find . -type f -print
+ distcleancheck_listfiles = find . -type f -print
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -97,8 +94,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -113,18 +108,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -132,8 +122,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -145,6 +134,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -173,6 +164,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -185,15 +177,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -205,6 +197,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -236,8 +229,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ SUBDIRS = opensync osengine formats tests tools wrapper osplugin
+ @BUILD_ENGINE_TRUE@OSENGINE_PC = osengine-1.0.pc
+ pkgconfigdir = ${libdir}/pkgconfig
+@@ -296,7 +292,7 @@
+ config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+- $(MAKE) stamp-h1; \
++ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+@@ -328,10 +324,9 @@
+
+ distclean-libtool:
+ -rm -f libtool
+-uninstall-info-am:
+ install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+- test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
++ 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) \
+@@ -378,8 +373,7 @@
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+-mostlyclean-recursive clean-recursive distclean-recursive \
+-maintainer-clean-recursive:
++$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+@@ -481,24 +475,22 @@
+
+ distdir: $(DISTFILES)
+ $(am__remove_distdir)
+- mkdir $(distdir)
+- $(mkdir_p) $(distdir)/. $(distdir)/misc
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ 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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -512,7 +504,7 @@
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+- || $(mkdir_p) "$(distdir)/$$subdir" \
++ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+@@ -520,6 +512,8 @@
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
++ am__remove_distdir=: \
++ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+@@ -530,7 +524,7 @@
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
++ ! -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
+@@ -605,7 +599,7 @@
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
++ 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 \
+@@ -630,7 +624,7 @@
+ installdirs: installdirs-recursive
+ installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-recursive
+ install-exec: install-exec-recursive
+@@ -679,12 +673,20 @@
+
+ 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
+@@ -705,25 +707,26 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
++uninstall-am: uninstall-pkgconfigDATA
+
+-uninstall-info: uninstall-info-recursive
++.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
++ install-strip
+
+-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+- check-am clean clean-generic clean-libtool clean-recursive \
+- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+- dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
+- distclean-generic distclean-hdr distclean-libtool \
+- distclean-recursive distclean-tags distcleancheck distdir \
+- distuninstallcheck dvi dvi-am html html-am info info-am \
+- install install-am install-data install-data-am install-exec \
+- install-exec-am install-info install-info-am install-man \
+- install-pkgconfigDATA install-strip installcheck \
+- installcheck-am installdirs installdirs-am maintainer-clean \
+- maintainer-clean-generic maintainer-clean-recursive \
+- mostlyclean mostlyclean-generic mostlyclean-libtool \
+- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+- uninstall uninstall-am uninstall-info-am \
++.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-hook 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
+
+
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/opensync/Makefile.in opensync-0.22/opensync/Makefile.in
+--- libopensync-0.22/opensync/Makefile.in 2007-03-27 14:22:04.000000000 +0200
++++ opensync-0.22/opensync/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 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.
+@@ -15,15 +15,11 @@
+ @SET_MAKE@
+
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -68,17 +64,21 @@
+ opensync_filter.lo opensync_queue.lo opensync_message.lo \
+ opensync_serializer.lo
+ libopensync_la_OBJECTS = $(am_libopensync_la_OBJECTS)
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++libopensync_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(libopensync_la_LDFLAGS) $(LDFLAGS) -o $@
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(libopensync_la_SOURCES)
+ DIST_SOURCES = $(libopensync_la_SOURCES)
+ opensyncincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+@@ -87,8 +87,6 @@
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -96,8 +94,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -112,18 +108,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -131,8 +122,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -144,6 +134,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -172,6 +164,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -184,15 +177,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -204,6 +197,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -235,8 +229,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+ INCLUDES = @PACKAGE_CFLAGS@
+ lib_LTLIBRARIES = libopensync.la
+@@ -347,7 +344,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -358,7 +355,7 @@
+
+ uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+@@ -373,7 +370,7 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ libopensync.la: $(libopensync_la_OBJECTS) $(libopensync_la_DEPENDENCIES)
+- $(LINK) -rpath $(libdir) $(libopensync_la_LDFLAGS) $(libopensync_la_OBJECTS) $(libopensync_la_LIBADD) $(LIBS)
++ $(libopensync_la_LINK) -rpath $(libdir) $(libopensync_la_OBJECTS) $(libopensync_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -404,22 +401,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_xml.Plo@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -429,13 +426,9 @@
+
+ clean-libtool:
+ -rm -rf .libs _libs
+-
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+ install-opensyncincludeHEADERS: $(opensyncinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+- test -z "$(opensyncincludedir)" || $(mkdir_p) "$(DESTDIR)$(opensyncincludedir)"
++ test -z "$(opensyncincludedir)" || $(MKDIR_P) "$(DESTDIR)$(opensyncincludedir)"
+ @list='$(opensyncinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+@@ -500,22 +493,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -531,7 +523,7 @@
+ all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+ installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(opensyncincludedir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-am
+ install-exec: install-exec-am
+@@ -567,7 +559,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-am
+
+@@ -581,12 +573,20 @@
+
+ install-data-am: install-opensyncincludeHEADERS
+
++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
+@@ -607,22 +607,26 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
++uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-opensyncincludeHEADERS
+
++.MAKE: install-am install-strip
++
+ .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-exec \
+- install-exec-am install-info install-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-man \
+- install-opensyncincludeHEADERS install-strip installcheck \
++ install-opensyncincludeHEADERS 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-info-am \
+- uninstall-libLTLIBRARIES uninstall-opensyncincludeHEADERS
++ tags uninstall uninstall-am uninstall-libLTLIBRARIES \
++ uninstall-opensyncincludeHEADERS
+
+ # 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/opensync/opensync_debug.c opensync-0.22/opensync/opensync_debug.c
+--- libopensync-0.22/opensync/opensync_debug.c 2007-03-27 13:49:18.000000000 +0200
++++ opensync-0.22/opensync/opensync_debug.c 2013-04-28 02:38:27.000000000 +0200
+@@ -56,8 +56,15 @@
+ char *buffer = NULL;
+
+ const char *trace = g_getenv("OSYNC_TRACE");
+- const char *sensitive = g_getenv("OSYNC_PRIVACY");
+-
++ char *sensitive = (char*)g_getenv("OSYNC_PRIVACY");
++
++ if (sensitive) {
++ if (!strncmp(sensitive, "0", 1))
++ sensitive = NULL;
++ } else {
++ // set to sensitive by default
++ sensitive = "1";
++ }
+
+ if (!trace)
+ return;
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/opensync/opensync_user.c opensync-0.22/opensync/opensync_user.c
+--- libopensync-0.22/opensync/opensync_user.c 2007-03-27 13:49:18.000000000 +0200
++++ opensync-0.22/opensync/opensync_user.c 2013-04-28 02:38:27.000000000 +0200
+@@ -49,7 +49,7 @@
+ user->homedir = g_get_home_dir();
+ user->username = g_get_user_name();
+
+- user->confdir = g_strdup_printf("%s/.opensync", user->homedir);
++ user->confdir = g_strdup_printf("%s/.opensync-0.22", user->homedir);
+
+ osync_trace(TRACE_INTERNAL, "Detected User:\nUID: %i\nGID: %i\nHome: %s\nOSyncDir: %s", user->uid, user->gid, user->homedir, user->confdir);
+
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/osengine/Makefile.am opensync-0.22/osengine/Makefile.am
+--- libopensync-0.22/osengine/Makefile.am 2007-03-27 13:49:26.000000000 +0200
++++ opensync-0.22/osengine/Makefile.am 2013-04-28 02:38:27.000000000 +0200
+@@ -43,5 +43,5 @@
+ *.bbg \
+ *.da
+
+-libosengine_la_LDFLAGS = $(PACKAGE_LIBS) -R $(libdir) @GCOV_LDFLAGS@
++libosengine_la_LDFLAGS = $(PACKAGE_LIBS) @GCOV_LDFLAGS@
+ libosengine_la_LIBADD = $(top_builddir)/opensync/libopensync.la
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/osengine/Makefile.in opensync-0.22/osengine/Makefile.in
+--- libopensync-0.22/osengine/Makefile.in 2007-03-27 14:22:05.000000000 +0200
++++ opensync-0.22/osengine/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 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.
+@@ -15,15 +15,11 @@
+ @SET_MAKE@
+
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -63,18 +59,22 @@
+ osengine_status.lo osengine_debug.lo osengine_mapping.lo \
+ osengine_mapcmds.lo osengine_deciders.lo osengine_flags.lo
+ libosengine_la_OBJECTS = $(am_libosengine_la_OBJECTS)
++libosengine_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(libosengine_la_LDFLAGS) $(LDFLAGS) -o $@
+ @BUILD_ENGINE_TRUE@am_libosengine_la_rpath = -rpath $(libdir)
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(libosengine_la_SOURCES)
+ DIST_SOURCES = $(libosengine_la_SOURCES)
+ am__osengineinclude_HEADERS_DIST = engine.h osengine_mapping.h \
+@@ -85,8 +85,6 @@
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -94,8 +92,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -110,18 +106,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -129,8 +120,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -142,6 +132,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -170,6 +162,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -182,15 +175,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -202,6 +195,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -233,8 +227,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ AM_CFLAGS = -Werror -Wall @GCOV_CFLAGS@ @XML_CFLAGS@
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@
+ @BUILD_ENGINE_TRUE@lib_LTLIBRARIES = libosengine.la
+@@ -308,7 +305,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -319,7 +316,7 @@
+
+ uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+@@ -334,7 +331,7 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ libosengine.la: $(libosengine_la_OBJECTS) $(libosengine_la_DEPENDENCIES)
+- $(LINK) $(am_libosengine_la_rpath) $(libosengine_la_LDFLAGS) $(libosengine_la_OBJECTS) $(libosengine_la_LIBADD) $(LIBS)
++ $(libosengine_la_LINK) $(am_libosengine_la_rpath) $(libosengine_la_OBJECTS) $(libosengine_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -352,22 +349,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_status.Plo@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -377,13 +374,9 @@
+
+ clean-libtool:
+ -rm -rf .libs _libs
+-
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+ install-osengineincludeHEADERS: $(osengineinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+- test -z "$(osengineincludedir)" || $(mkdir_p) "$(DESTDIR)$(osengineincludedir)"
++ test -z "$(osengineincludedir)" || $(MKDIR_P) "$(DESTDIR)$(osengineincludedir)"
+ @list='$(osengineinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+@@ -448,22 +441,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -479,7 +471,7 @@
+ all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+ installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(osengineincludedir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-am
+ install-exec: install-exec-am
+@@ -515,7 +507,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-am
+
+@@ -529,12 +521,20 @@
+
+ install-data-am: install-osengineincludeHEADERS
+
++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
+@@ -555,22 +555,26 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
++uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-osengineincludeHEADERS
+
++.MAKE: install-am install-strip
++
+ .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-exec \
+- install-exec-am install-info install-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-man \
+- install-osengineincludeHEADERS install-strip installcheck \
++ install-osengineincludeHEADERS 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-info-am \
+- uninstall-libLTLIBRARIES uninstall-osengineincludeHEADERS
++ tags uninstall uninstall-am uninstall-libLTLIBRARIES \
++ uninstall-osengineincludeHEADERS
+
+ # 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/osplugin/Makefile.am opensync-0.22/osplugin/Makefile.am
+--- libopensync-0.22/osplugin/Makefile.am 2007-03-27 13:49:19.000000000 +0200
++++ opensync-0.22/osplugin/Makefile.am 2013-04-28 02:38:27.000000000 +0200
+@@ -9,7 +9,7 @@
+ ospluginincludedir = @OPENSYNC_HEADERDIR@
+
+ osplugin_SOURCES = osplugin.c
+-osplugin_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
++osplugin_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ @GCOV_LDFLAGS@
+ osplugin_LDADD = $(top_builddir)/opensync/libopensync.la
+
+ CLEANFILES = \
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/osplugin/Makefile.in opensync-0.22/osplugin/Makefile.in
+--- libopensync-0.22/osplugin/Makefile.in 2007-03-27 14:22:06.000000000 +0200
++++ opensync-0.22/osplugin/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,15 +14,11 @@
+
+ @SET_MAKE@
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -53,25 +49,27 @@
+ am_osplugin_OBJECTS = osplugin.$(OBJEXT)
+ osplugin_OBJECTS = $(am_osplugin_OBJECTS)
+ osplugin_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++osplugin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(osplugin_LDFLAGS) \
++ $(LDFLAGS) -o $@
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(osplugin_SOURCES)
+ DIST_SOURCES = $(osplugin_SOURCES)
+ ETAGS = etags
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -79,8 +77,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -95,18 +91,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -114,8 +105,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -127,6 +117,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -155,6 +147,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -167,15 +160,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -187,6 +180,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -218,8 +212,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine -I$(top_srcdir)/opensync
+ ospluginincludedir = @OPENSYNC_HEADERDIR@
+@@ -266,7 +263,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+- test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
++ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+@@ -294,7 +291,7 @@
+ done
+ osplugin$(EXEEXT): $(osplugin_OBJECTS) $(osplugin_DEPENDENCIES)
+ @rm -f osplugin$(EXEEXT)
+- $(LINK) $(osplugin_LDFLAGS) $(osplugin_OBJECTS) $(osplugin_LDADD) $(LIBS)
++ $(osplugin_LINK) $(osplugin_OBJECTS) $(osplugin_LDADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -305,22 +302,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osplugin.Po@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -331,10 +328,6 @@
+ clean-libtool:
+ -rm -rf .libs _libs
+
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+-
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+@@ -384,22 +377,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -415,7 +407,7 @@
+ all-am: Makefile $(PROGRAMS)
+ installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-am
+ install-exec: install-exec-am
+@@ -451,7 +443,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-am
+
+@@ -465,12 +457,20 @@
+
+ install-data-am:
+
++install-dvi: install-dvi-am
++
+ install-exec-am: install-libexecPROGRAMS
+
++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
+@@ -491,20 +491,23 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-info-am uninstall-libexecPROGRAMS
++uninstall-am: uninstall-libexecPROGRAMS
++
++.MAKE: install-am install-strip
+
+ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libexecPROGRAMS clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+- install install-am install-data install-data-am install-exec \
+- install-exec-am install-info install-info-am \
+- install-libexecPROGRAMS install-man install-strip installcheck \
++ 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-libexecPROGRAMS 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-info-am \
+- uninstall-libexecPROGRAMS
++ tags uninstall uninstall-am uninstall-libexecPROGRAMS
+
+ # 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/tests/Makefile.am opensync-0.22/tests/Makefile.am
+--- libopensync-0.22/tests/Makefile.am 2007-03-27 13:49:26.000000000 +0200
++++ opensync-0.22/tests/Makefile.am 2013-04-28 02:38:27.000000000 +0200
+@@ -25,82 +25,82 @@
+ error_INCLUDES = @CHECK_CFLAGS@
+ error_SOURCES = check_error.c
+ error_LIBS = @CHECK_LIBS@
+-error_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++error_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck @GCOV_LDFLAGS@
+
+ ipc_INCLUDES = @CHECK_CFLAGS@
+ ipc_SOURCES = check_ipc.c support.c
+ ipc_LIBS = @CHECK_LIBS@
+-ipc_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++ipc_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ member_INCLUDES = @CHECK_CFLAGS@
+ member_SOURCES = check_member.c
+ member_LIBS = @CHECK_LIBS@
+-member_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++member_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck @GCOV_LDFLAGS@
+
+ group_INCLUDES = @CHECK_CFLAGS@
+ group_SOURCES = check_group.c support.c
+ group_LIBS = @CHECK_LIBS@
+-group_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++group_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ plugin_INCLUDES = @CHECK_CFLAGS@
+ plugin_SOURCES = check_plugins.c support.c
+ plugin_LIBS = @CHECK_LIBS@
+-plugin_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++plugin_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ locks_INCLUDES = @CHECK_CFLAGS@
+ locks_SOURCES = check_lock.c support.c
+ locks_LIBS = @CHECK_LIBS@
+-locks_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++locks_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ env_INCLUDES = @CHECK_CFLAGS@
+ env_SOURCES = check_env.c support.c
+ env_LIBS = @CHECK_LIBS@
+-env_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++env_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ user_INCLUDES = @CHECK_CFLAGS@
+ user_SOURCES = check_user.c
+ user_LIBS = @CHECK_LIBS@
+-user_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++user_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck @GCOV_LDFLAGS@
+
+ conv_INCLUDES = @CHECK_CFLAGS@
+ conv_SOURCES = check_conv.c support.c
+ conv_LIBS = @CHECK_LIBS@
+-conv_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++conv_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ sync_INCLUDES = @CHECK_CFLAGS@
+ sync_SOURCES = check_sync.c support.c
+ sync_LIBS = @CHECK_LIBS@
+-sync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++sync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ filter_INCLUDES = @CHECK_CFLAGS@
+ filter_SOURCES = check_filter.c support.c
+ filter_LIBS = @CHECK_LIBS@
+-filter_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++filter_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ multisync_INCLUDES = @CHECK_CFLAGS@
+ multisync_SOURCES = check_multisync.c support.c
+ multisync_LIBS = @CHECK_LIBS@
+-multisync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++multisync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ vcard_INCLUDES = @CHECK_CFLAGS@
+ vcard_SOURCES = check_vcard.c support.c
+ vcard_LIBS = @CHECK_LIBS@
+-vcard_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++vcard_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ vcal_INCLUDES = @CHECK_CFLAGS@
+ vcal_SOURCES = check_vcal.c support.c
+ vcal_LIBS = @CHECK_LIBS@
+-vcal_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++vcal_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ vnote_INCLUDES = @CHECK_CFLAGS@
+ vnote_SOURCES = check_vnote.c support.c
+ vnote_LIBS = @CHECK_LIBS@
+-vnote_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++vnote_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ errorcodes_INCLUDES = @CHECK_CFLAGS@
+ errorcodes_SOURCES = check_codes.c support.c
+ errorcodes_LIBS = @CHECK_LIBS@
+-errorcodes_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
++errorcodes_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck @GCOV_LDFLAGS@
+
+ CLEANFILES = \
+ *.bb \
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/tests/Makefile.in opensync-0.22/tests/Makefile.in
+--- libopensync-0.22/tests/Makefile.in 2007-03-27 14:22:06.000000000 +0200
++++ opensync-0.22/tests/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,15 +14,11 @@
+
+ @SET_MAKE@
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -36,6 +32,13 @@
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
++@ENABLE_TESTS_TRUE@TESTS = error$(EXEEXT) ipc$(EXEEXT) user$(EXEEXT) \
++@ENABLE_TESTS_TRUE@ member$(EXEEXT) group$(EXEEXT) \
++@ENABLE_TESTS_TRUE@ plugin$(EXEEXT) locks$(EXEEXT) env$(EXEEXT) \
++@ENABLE_TESTS_TRUE@ conv$(EXEEXT) sync$(EXEEXT) filter$(EXEEXT) \
++@ENABLE_TESTS_TRUE@ multisync$(EXEEXT) vcard$(EXEEXT) \
++@ENABLE_TESTS_TRUE@ vcal$(EXEEXT) vnote$(EXEEXT) \
++@ENABLE_TESTS_TRUE@ errorcodes$(EXEEXT) $(PROFTEST)
+ @ENABLE_TESTS_TRUE@noinst_PROGRAMS = error$(EXEEXT) ipc$(EXEEXT) \
+ @ENABLE_TESTS_TRUE@ user$(EXEEXT) member$(EXEEXT) \
+ @ENABLE_TESTS_TRUE@ group$(EXEEXT) plugin$(EXEEXT) \
+@@ -58,62 +61,111 @@
+ am_conv_OBJECTS = check_conv.$(OBJEXT) support.$(OBJEXT)
+ conv_OBJECTS = $(am_conv_OBJECTS)
+ conv_LDADD = $(LDADD)
++conv_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(conv_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_env_OBJECTS = check_env.$(OBJEXT) support.$(OBJEXT)
+ env_OBJECTS = $(am_env_OBJECTS)
+ env_LDADD = $(LDADD)
++env_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(env_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_error_OBJECTS = check_error.$(OBJEXT)
+ error_OBJECTS = $(am_error_OBJECTS)
+ error_LDADD = $(LDADD)
++error_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(error_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_errorcodes_OBJECTS = check_codes.$(OBJEXT) support.$(OBJEXT)
+ errorcodes_OBJECTS = $(am_errorcodes_OBJECTS)
+ errorcodes_LDADD = $(LDADD)
++errorcodes_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(errorcodes_LDFLAGS) $(LDFLAGS) -o $@
+ am_filter_OBJECTS = check_filter.$(OBJEXT) support.$(OBJEXT)
+ filter_OBJECTS = $(am_filter_OBJECTS)
+ filter_LDADD = $(LDADD)
++filter_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(filter_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_group_OBJECTS = check_group.$(OBJEXT) support.$(OBJEXT)
+ group_OBJECTS = $(am_group_OBJECTS)
+ group_LDADD = $(LDADD)
++group_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(group_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_ipc_OBJECTS = check_ipc.$(OBJEXT) support.$(OBJEXT)
+ ipc_OBJECTS = $(am_ipc_OBJECTS)
+ ipc_LDADD = $(LDADD)
++ipc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ipc_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_locks_OBJECTS = check_lock.$(OBJEXT) support.$(OBJEXT)
+ locks_OBJECTS = $(am_locks_OBJECTS)
+ locks_LDADD = $(LDADD)
++locks_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(locks_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_member_OBJECTS = check_member.$(OBJEXT)
+ member_OBJECTS = $(am_member_OBJECTS)
+ member_LDADD = $(LDADD)
++member_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(member_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_multisync_OBJECTS = check_multisync.$(OBJEXT) support.$(OBJEXT)
+ multisync_OBJECTS = $(am_multisync_OBJECTS)
+ multisync_LDADD = $(LDADD)
++multisync_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(multisync_LDFLAGS) $(LDFLAGS) -o $@
+ am_plugin_OBJECTS = check_plugins.$(OBJEXT) support.$(OBJEXT)
+ plugin_OBJECTS = $(am_plugin_OBJECTS)
+ plugin_LDADD = $(LDADD)
++plugin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(plugin_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_sync_OBJECTS = check_sync.$(OBJEXT) support.$(OBJEXT)
+ sync_OBJECTS = $(am_sync_OBJECTS)
+ sync_LDADD = $(LDADD)
++sync_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(sync_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_user_OBJECTS = check_user.$(OBJEXT)
+ user_OBJECTS = $(am_user_OBJECTS)
+ user_LDADD = $(LDADD)
++user_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(user_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_vcal_OBJECTS = check_vcal.$(OBJEXT) support.$(OBJEXT)
+ vcal_OBJECTS = $(am_vcal_OBJECTS)
+ vcal_LDADD = $(LDADD)
++vcal_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(vcal_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_vcard_OBJECTS = check_vcard.$(OBJEXT) support.$(OBJEXT)
+ vcard_OBJECTS = $(am_vcard_OBJECTS)
+ vcard_LDADD = $(LDADD)
++vcard_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(vcard_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ am_vnote_OBJECTS = check_vnote.$(OBJEXT) support.$(OBJEXT)
+ vnote_OBJECTS = $(am_vnote_OBJECTS)
+ vnote_LDADD = $(LDADD)
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++vnote_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(vnote_LDFLAGS) \
++ $(LDFLAGS) -o $@
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(conv_SOURCES) $(env_SOURCES) $(error_SOURCES) \
+ $(errorcodes_SOURCES) $(filter_SOURCES) $(group_SOURCES) \
+ $(ipc_SOURCES) $(locks_SOURCES) $(member_SOURCES) \
+@@ -128,17 +180,18 @@
+ $(vnote_SOURCES)
+ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+- install-exec-recursive install-info-recursive \
+- install-recursive installcheck-recursive installdirs-recursive \
+- pdf-recursive ps-recursive uninstall-info-recursive \
+- uninstall-recursive
++ 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@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -146,8 +199,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -162,18 +213,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -181,8 +227,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -194,6 +239,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -222,6 +269,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -234,15 +282,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -254,6 +302,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -285,8 +334,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ SUBDIRS = mock-plugin
+ AM_CFLAGS = @XML_CFLAGS@ -Wall -Werror @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ -I$(top_srcdir)/osengine
+@@ -295,8 +347,6 @@
+ support.h
+
+ @ENABLE_PROF_TRUE@PROFTEST = coverage.sh
+-@ENABLE_TESTS_FALSE@TESTS =
+-@ENABLE_TESTS_TRUE@TESTS = error ipc user member group plugin locks env conv sync filter multisync vcard vcal vnote errorcodes $(PROFTEST)
+ error_INCLUDES = @CHECK_CFLAGS@
+ error_SOURCES = check_error.c
+ error_LIBS = @CHECK_LIBS@
+@@ -408,52 +458,52 @@
+ done
+ conv$(EXEEXT): $(conv_OBJECTS) $(conv_DEPENDENCIES)
+ @rm -f conv$(EXEEXT)
+- $(LINK) $(conv_LDFLAGS) $(conv_OBJECTS) $(conv_LDADD) $(LIBS)
++ $(conv_LINK) $(conv_OBJECTS) $(conv_LDADD) $(LIBS)
+ env$(EXEEXT): $(env_OBJECTS) $(env_DEPENDENCIES)
+ @rm -f env$(EXEEXT)
+- $(LINK) $(env_LDFLAGS) $(env_OBJECTS) $(env_LDADD) $(LIBS)
++ $(env_LINK) $(env_OBJECTS) $(env_LDADD) $(LIBS)
+ error$(EXEEXT): $(error_OBJECTS) $(error_DEPENDENCIES)
+ @rm -f error$(EXEEXT)
+- $(LINK) $(error_LDFLAGS) $(error_OBJECTS) $(error_LDADD) $(LIBS)
++ $(error_LINK) $(error_OBJECTS) $(error_LDADD) $(LIBS)
+ errorcodes$(EXEEXT): $(errorcodes_OBJECTS) $(errorcodes_DEPENDENCIES)
+ @rm -f errorcodes$(EXEEXT)
+- $(LINK) $(errorcodes_LDFLAGS) $(errorcodes_OBJECTS) $(errorcodes_LDADD) $(LIBS)
++ $(errorcodes_LINK) $(errorcodes_OBJECTS) $(errorcodes_LDADD) $(LIBS)
+ filter$(EXEEXT): $(filter_OBJECTS) $(filter_DEPENDENCIES)
+ @rm -f filter$(EXEEXT)
+- $(LINK) $(filter_LDFLAGS) $(filter_OBJECTS) $(filter_LDADD) $(LIBS)
++ $(filter_LINK) $(filter_OBJECTS) $(filter_LDADD) $(LIBS)
+ group$(EXEEXT): $(group_OBJECTS) $(group_DEPENDENCIES)
+ @rm -f group$(EXEEXT)
+- $(LINK) $(group_LDFLAGS) $(group_OBJECTS) $(group_LDADD) $(LIBS)
++ $(group_LINK) $(group_OBJECTS) $(group_LDADD) $(LIBS)
+ ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES)
+ @rm -f ipc$(EXEEXT)
+- $(LINK) $(ipc_LDFLAGS) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS)
++ $(ipc_LINK) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS)
+ locks$(EXEEXT): $(locks_OBJECTS) $(locks_DEPENDENCIES)
+ @rm -f locks$(EXEEXT)
+- $(LINK) $(locks_LDFLAGS) $(locks_OBJECTS) $(locks_LDADD) $(LIBS)
++ $(locks_LINK) $(locks_OBJECTS) $(locks_LDADD) $(LIBS)
+ member$(EXEEXT): $(member_OBJECTS) $(member_DEPENDENCIES)
+ @rm -f member$(EXEEXT)
+- $(LINK) $(member_LDFLAGS) $(member_OBJECTS) $(member_LDADD) $(LIBS)
++ $(member_LINK) $(member_OBJECTS) $(member_LDADD) $(LIBS)
+ multisync$(EXEEXT): $(multisync_OBJECTS) $(multisync_DEPENDENCIES)
+ @rm -f multisync$(EXEEXT)
+- $(LINK) $(multisync_LDFLAGS) $(multisync_OBJECTS) $(multisync_LDADD) $(LIBS)
++ $(multisync_LINK) $(multisync_OBJECTS) $(multisync_LDADD) $(LIBS)
+ plugin$(EXEEXT): $(plugin_OBJECTS) $(plugin_DEPENDENCIES)
+ @rm -f plugin$(EXEEXT)
+- $(LINK) $(plugin_LDFLAGS) $(plugin_OBJECTS) $(plugin_LDADD) $(LIBS)
++ $(plugin_LINK) $(plugin_OBJECTS) $(plugin_LDADD) $(LIBS)
+ sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES)
+ @rm -f sync$(EXEEXT)
+- $(LINK) $(sync_LDFLAGS) $(sync_OBJECTS) $(sync_LDADD) $(LIBS)
++ $(sync_LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS)
+ user$(EXEEXT): $(user_OBJECTS) $(user_DEPENDENCIES)
+ @rm -f user$(EXEEXT)
+- $(LINK) $(user_LDFLAGS) $(user_OBJECTS) $(user_LDADD) $(LIBS)
++ $(user_LINK) $(user_OBJECTS) $(user_LDADD) $(LIBS)
+ vcal$(EXEEXT): $(vcal_OBJECTS) $(vcal_DEPENDENCIES)
+ @rm -f vcal$(EXEEXT)
+- $(LINK) $(vcal_LDFLAGS) $(vcal_OBJECTS) $(vcal_LDADD) $(LIBS)
++ $(vcal_LINK) $(vcal_OBJECTS) $(vcal_LDADD) $(LIBS)
+ vcard$(EXEEXT): $(vcard_OBJECTS) $(vcard_DEPENDENCIES)
+ @rm -f vcard$(EXEEXT)
+- $(LINK) $(vcard_LDFLAGS) $(vcard_OBJECTS) $(vcard_LDADD) $(LIBS)
++ $(vcard_LINK) $(vcard_OBJECTS) $(vcard_LDADD) $(LIBS)
+ vnote$(EXEEXT): $(vnote_OBJECTS) $(vnote_DEPENDENCIES)
+ @rm -f vnote$(EXEEXT)
+- $(LINK) $(vnote_LDFLAGS) $(vnote_OBJECTS) $(vnote_LDADD) $(LIBS)
++ $(vnote_LINK) $(vnote_OBJECTS) $(vnote_LDADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -480,22 +530,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -506,10 +556,6 @@
+ clean-libtool:
+ -rm -rf .libs _libs
+
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+-
+ # This directory's subdirectories are mostly independent; you can cd
+ # into them and run `make' without going through this Makefile.
+ # To change the values of `make' variables: instead of editing Makefiles,
+@@ -541,8 +587,7 @@
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+-mostlyclean-recursive clean-recursive distclean-recursive \
+-maintainer-clean-recursive:
++$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+@@ -643,9 +688,9 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ check-TESTS: $(TESTS)
+- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
++ @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
+ srcdir=$(srcdir); export srcdir; \
+- list='$(TESTS)'; \
++ list=' $(TESTS) '; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+@@ -654,7 +699,7 @@
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+- *" $$tst "*) \
++ *$$ws$$tst$$ws*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+@@ -666,7 +711,7 @@
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+- *" $$tst "*) \
++ *$$ws$$tst$$ws*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+@@ -716,22 +761,21 @@
+ else :; fi
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -745,7 +789,7 @@
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+- || $(mkdir_p) "$(distdir)/$$subdir" \
++ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+@@ -753,6 +797,8 @@
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
++ am__remove_distdir=: \
++ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+@@ -795,7 +841,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-recursive
+
+@@ -809,12 +855,20 @@
+
+ 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
+@@ -835,24 +889,25 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-info-am
++uninstall-am:
+
+-uninstall-info: uninstall-info-recursive
++.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
++ install-strip
+
+-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \
+- check-am clean clean-generic clean-libtool \
+- clean-noinstPROGRAMS clean-recursive ctags ctags-recursive \
++.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
++ all all-am check check-TESTS check-am clean clean-generic \
++ clean-libtool clean-noinstPROGRAMS ctags ctags-recursive \
+ distclean distclean-compile distclean-generic \
+- distclean-libtool distclean-recursive distclean-tags distdir \
+- dvi dvi-am html html-am info info-am install install-am \
+- install-data install-data-am install-exec install-exec-am \
+- install-info install-info-am install-man install-strip \
+- installcheck installcheck-am installdirs installdirs-am \
+- maintainer-clean maintainer-clean-generic \
+- maintainer-clean-recursive mostlyclean mostlyclean-compile \
+- mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+- uninstall-info-am
++ 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-compile \
++ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
++ tags tags-recursive uninstall uninstall-am
+
+
+ clean:
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/tests/mock-plugin/Makefile.in opensync-0.22/tests/mock-plugin/Makefile.in
+--- libopensync-0.22/tests/mock-plugin/Makefile.in 2007-03-27 14:22:07.000000000 +0200
++++ opensync-0.22/tests/mock-plugin/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,15 +14,11 @@
+
+ @SET_MAKE@
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ../..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -59,30 +55,35 @@
+ mock_sync_la_DEPENDENCIES =
+ am_mock_sync_la_OBJECTS = mock_sync.lo
+ mock_sync_la_OBJECTS = $(am_mock_sync_la_OBJECTS)
++mock_sync_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(mock_sync_la_LDFLAGS) $(LDFLAGS) -o $@
+ @ENABLE_TESTS_TRUE@am_mock_sync_la_rpath = -rpath $(pluginsdir)
+ mockformat_la_DEPENDENCIES =
+ am_mockformat_la_OBJECTS = mock_format.lo
+ mockformat_la_OBJECTS = $(am_mockformat_la_OBJECTS)
++mockformat_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(mockformat_la_LDFLAGS) $(LDFLAGS) -o $@
+ @ENABLE_TESTS_TRUE@am_mockformat_la_rpath = -rpath $(formatsdir)
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(mock_sync_la_SOURCES) $(mockformat_la_SOURCES)
+ DIST_SOURCES = $(mock_sync_la_SOURCES) $(mockformat_la_SOURCES)
+ ETAGS = etags
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -90,8 +91,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -106,18 +105,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -125,8 +119,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -138,6 +131,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -166,6 +161,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -178,15 +174,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -198,6 +194,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -229,8 +226,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+ AM_CFLAGS = -Wall -Werror @XML_CFLAGS@ @GCOV_CFLAGS@
+ AM_LDFLAGS = -rpath @libdir@
+@@ -280,7 +280,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-formatsLTLIBRARIES: $(formats_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(formatsdir)" || $(mkdir_p) "$(DESTDIR)$(formatsdir)"
++ test -z "$(formatsdir)" || $(MKDIR_P) "$(DESTDIR)$(formatsdir)"
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -291,7 +291,7 @@
+
+ uninstall-formatsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(formats_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(formatsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(formatsdir)/$$p"; \
+@@ -307,7 +307,7 @@
+ done
+ install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(pluginsdir)" || $(mkdir_p) "$(DESTDIR)$(pluginsdir)"
++ test -z "$(pluginsdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginsdir)"
+ @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -318,7 +318,7 @@
+
+ uninstall-pluginsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pluginsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pluginsdir)/$$p"; \
+@@ -333,9 +333,9 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ mock_sync.la: $(mock_sync_la_OBJECTS) $(mock_sync_la_DEPENDENCIES)
+- $(LINK) $(am_mock_sync_la_rpath) $(mock_sync_la_LDFLAGS) $(mock_sync_la_OBJECTS) $(mock_sync_la_LIBADD) $(LIBS)
++ $(mock_sync_la_LINK) $(am_mock_sync_la_rpath) $(mock_sync_la_OBJECTS) $(mock_sync_la_LIBADD) $(LIBS)
+ mockformat.la: $(mockformat_la_OBJECTS) $(mockformat_la_DEPENDENCIES)
+- $(LINK) $(am_mockformat_la_rpath) $(mockformat_la_LDFLAGS) $(mockformat_la_OBJECTS) $(mockformat_la_LIBADD) $(LIBS)
++ $(mockformat_la_LINK) $(am_mockformat_la_rpath) $(mockformat_la_OBJECTS) $(mockformat_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -347,22 +347,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mock_sync.Plo@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -373,10 +373,6 @@
+ clean-libtool:
+ -rm -rf .libs _libs
+
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+-
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+@@ -426,22 +422,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -457,7 +452,7 @@
+ all-am: Makefile $(LTLIBRARIES)
+ installdirs:
+ for dir in "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(pluginsdir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-am
+ install-exec: install-exec-am
+@@ -492,7 +487,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-am
+
+@@ -506,12 +501,20 @@
+
+ install-data-am: install-formatsLTLIBRARIES install-pluginsLTLIBRARIES
+
++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
+@@ -532,22 +535,26 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-formatsLTLIBRARIES uninstall-info-am \
++uninstall-am: uninstall-formatsLTLIBRARIES \
+ uninstall-pluginsLTLIBRARIES
+
++.MAKE: install-am install-strip
++
+ .PHONY: CTAGS GTAGS all all-am check check-am clean \
+ clean-formatsLTLIBRARIES clean-generic clean-libtool \
+ clean-pluginsLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+- install-data install-data-am install-exec install-exec-am \
+- install-formatsLTLIBRARIES install-info install-info-am \
+- install-man install-pluginsLTLIBRARIES 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-formatsLTLIBRARIES \
+- uninstall-info-am uninstall-pluginsLTLIBRARIES
++ install-data install-data-am install-dvi install-dvi-am \
++ install-exec install-exec-am install-formatsLTLIBRARIES \
++ install-html install-html-am install-info install-info-am \
++ install-man install-pdf install-pdf-am \
++ install-pluginsLTLIBRARIES 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-formatsLTLIBRARIES uninstall-pluginsLTLIBRARIES
+
+ # 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/tools/Makefile.am opensync-0.22/tools/Makefile.am
+--- libopensync-0.22/tools/Makefile.am 2007-03-27 13:49:19.000000000 +0200
++++ opensync-0.22/tools/Makefile.am 2013-04-28 02:38:27.000000000 +0200
+@@ -9,23 +9,23 @@
+ endif
+
+ osyncdump_SOURCES = osyncdump.c
+-osyncdump_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
++osyncdump_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ @GCOV_LDFLAGS@
+ osyncdump_LDADD = $(top_builddir)/opensync/libopensync.la
+
+ osyncstress_SOURCES = osyncstress.c
+-osyncstress_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
++osyncstress_LDFLAGS = @PACKAGE_LIBS@ @GCOV_LDFLAGS@
+ osyncstress_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
+
+ osyncplugin_SOURCES = osyncplugin.c
+-osyncplugin_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
++osyncplugin_LDFLAGS = @PACKAGE_LIBS@ @GCOV_LDFLAGS@
+ osyncplugin_LDADD = $(top_builddir)/opensync/libopensync.la
+
+ osynctest_SOURCES = osynctest.c
+-osynctest_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
++osynctest_LDFLAGS = @PACKAGE_LIBS@ @GCOV_LDFLAGS@
+ osynctest_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
+
+ osyncbinary_SOURCES = osyncbinary.c
+-osyncbinary_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir)
++osyncbinary_LDFLAGS = @PACKAGE_LIBS@
+ osyncbinary_LDADD = $(top_builddir)/opensync/libopensync.la
+
+ CLEANFILES = \
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/tools/Makefile.in opensync-0.22/tools/Makefile.in
+--- libopensync-0.22/tools/Makefile.in 2007-03-27 14:22:07.000000000 +0200
++++ opensync-0.22/tools/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,15 +14,11 @@
+
+ @SET_MAKE@
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -55,31 +51,47 @@
+ am_osyncbinary_OBJECTS = osyncbinary.$(OBJEXT)
+ osyncbinary_OBJECTS = $(am_osyncbinary_OBJECTS)
+ osyncbinary_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
++osyncbinary_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(osyncbinary_LDFLAGS) $(LDFLAGS) -o $@
+ am_osyncdump_OBJECTS = osyncdump.$(OBJEXT)
+ osyncdump_OBJECTS = $(am_osyncdump_OBJECTS)
+ osyncdump_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
++osyncdump_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(osyncdump_LDFLAGS) $(LDFLAGS) -o $@
+ am_osyncplugin_OBJECTS = osyncplugin.$(OBJEXT)
+ osyncplugin_OBJECTS = $(am_osyncplugin_OBJECTS)
+ osyncplugin_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
++osyncplugin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(osyncplugin_LDFLAGS) $(LDFLAGS) -o $@
+ am_osyncstress_OBJECTS = osyncstress.$(OBJEXT)
+ osyncstress_OBJECTS = $(am_osyncstress_OBJECTS)
+ osyncstress_DEPENDENCIES = $(top_builddir)/osengine/libosengine.la \
+ $(top_builddir)/opensync/libopensync.la
++osyncstress_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(osyncstress_LDFLAGS) $(LDFLAGS) -o $@
+ am_osynctest_OBJECTS = osynctest.$(OBJEXT)
+ osynctest_OBJECTS = $(am_osynctest_OBJECTS)
+ osynctest_DEPENDENCIES = $(top_builddir)/osengine/libosengine.la \
+ $(top_builddir)/opensync/libopensync.la
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++osynctest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(osynctest_LDFLAGS) $(LDFLAGS) -o $@
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(osyncbinary_SOURCES) $(osyncdump_SOURCES) \
+ $(osyncplugin_SOURCES) $(osyncstress_SOURCES) \
+ $(osynctest_SOURCES)
+@@ -90,8 +102,6 @@
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -99,8 +109,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -115,18 +123,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -134,8 +137,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -147,6 +149,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -175,6 +179,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -187,15 +192,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -207,6 +212,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -238,8 +244,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ AM_CFLAGS = -Wall -Werror @GCOV_CFLAGS@
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine
+ osyncdump_SOURCES = osyncdump.c
+@@ -297,7 +306,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
++ 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 \
+@@ -325,19 +334,19 @@
+ done
+ osyncbinary$(EXEEXT): $(osyncbinary_OBJECTS) $(osyncbinary_DEPENDENCIES)
+ @rm -f osyncbinary$(EXEEXT)
+- $(LINK) $(osyncbinary_LDFLAGS) $(osyncbinary_OBJECTS) $(osyncbinary_LDADD) $(LIBS)
++ $(osyncbinary_LINK) $(osyncbinary_OBJECTS) $(osyncbinary_LDADD) $(LIBS)
+ osyncdump$(EXEEXT): $(osyncdump_OBJECTS) $(osyncdump_DEPENDENCIES)
+ @rm -f osyncdump$(EXEEXT)
+- $(LINK) $(osyncdump_LDFLAGS) $(osyncdump_OBJECTS) $(osyncdump_LDADD) $(LIBS)
++ $(osyncdump_LINK) $(osyncdump_OBJECTS) $(osyncdump_LDADD) $(LIBS)
+ osyncplugin$(EXEEXT): $(osyncplugin_OBJECTS) $(osyncplugin_DEPENDENCIES)
+ @rm -f osyncplugin$(EXEEXT)
+- $(LINK) $(osyncplugin_LDFLAGS) $(osyncplugin_OBJECTS) $(osyncplugin_LDADD) $(LIBS)
++ $(osyncplugin_LINK) $(osyncplugin_OBJECTS) $(osyncplugin_LDADD) $(LIBS)
+ osyncstress$(EXEEXT): $(osyncstress_OBJECTS) $(osyncstress_DEPENDENCIES)
+ @rm -f osyncstress$(EXEEXT)
+- $(LINK) $(osyncstress_LDFLAGS) $(osyncstress_OBJECTS) $(osyncstress_LDADD) $(LIBS)
++ $(osyncstress_LINK) $(osyncstress_OBJECTS) $(osyncstress_LDADD) $(LIBS)
+ osynctest$(EXEEXT): $(osynctest_OBJECTS) $(osynctest_DEPENDENCIES)
+ @rm -f osynctest$(EXEEXT)
+- $(LINK) $(osynctest_LDFLAGS) $(osynctest_OBJECTS) $(osynctest_LDADD) $(LIBS)
++ $(osynctest_LINK) $(osynctest_OBJECTS) $(osynctest_LDADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -352,22 +361,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osynctest.Po@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -378,10 +387,6 @@
+ clean-libtool:
+ -rm -rf .libs _libs
+
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+-
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+@@ -431,22 +436,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -462,7 +466,7 @@
+ all-am: Makefile $(PROGRAMS)
+ installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-am
+ install-exec: install-exec-am
+@@ -497,7 +501,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-am
+
+@@ -511,12 +515,20 @@
+
+ install-data-am:
+
++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
+@@ -537,19 +549,23 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
++uninstall-am: uninstall-binPROGRAMS
++
++.MAKE: install-am install-strip
+
+ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic 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-binPROGRAMS install-data install-data-am install-exec \
+- install-exec-am install-info install-info-am install-man \
++ install-binPROGRAMS 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 \
+- uninstall-binPROGRAMS uninstall-info-am
++ uninstall-binPROGRAMS
+
+ # 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.
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/valgrind.supp opensync-0.22/valgrind.supp
+--- libopensync-0.22/valgrind.supp 1970-01-01 01:00:00.000000000 +0100
++++ opensync-0.22/valgrind.supp 2013-04-28 02:38:27.000000000 +0200
+@@ -0,0 +1,339 @@
++{
++ supp1
++ Memcheck:Addr4
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ fun:_dl_open
++ obj:*
++ obj:*
++ fun:__libc_dlopen_mode
++ fun:__nss_lookup_function
++ obj:*
++ fun:_nss_compat_getpwnam_r
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ supp4
++ Memcheck:Addr4
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ fun:_dl_open
++ obj:*
++ obj:*
++ fun:__libc_dlopen_mode
++ fun:__nss_lookup_function
++ obj:*
++ fun:__nss_passwd_lookup
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ supp5
++ Memcheck:Addr4
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ fun:_dl_open
++ obj:*
++ obj:*
++ fun:__libc_dlopen_mode
++ fun:__nss_lookup_function
++ obj:*
++ fun:__nss_passwd_lookup
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ supp2
++ Memcheck:Addr4
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ obj:*
++ fun:_dl_open
++ obj:*
++ obj:*
++ fun:__libc_dlopen_mode
++ fun:__nss_lookup_function
++ obj:*
++ fun:_nss_compat_getpwnam_r
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ supp3
++ Memcheck:Cond
++ obj:*
++ obj:*
++ obj:*
++ fun:_dl_open
++ obj:*
++ obj:*
++ fun:__libc_dlopen_mode
++ fun:__nss_lookup_function
++ obj:*
++ fun:__nss_passwd_lookup
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ supp6
++ Memcheck:Cond
++ obj:/lib/ld-2.3.6.so
++ obj:/lib/ld-2.3.6.so
++ obj:/lib/ld-2.3.6.so
++ obj:/lib/ld-2.3.6.so
++ obj:/lib/ld-2.3.6.so
++}
++
++{
++ supp7
++ Memcheck:Leak
++ fun:malloc
++ fun:emalloc
++ fun:suite_create
++}
++
++{
++ supp7.1
++ Memcheck:Leak
++ fun:*
++ fun:*
++ fun:*
++ fun:suite_create
++}
++
++{
++ test2
++ Memcheck:Leak
++ fun:*
++ fun:*
++ obj:*
++ obj:*
++ fun:g_type_init_with_debug_flags
++ fun:g_type_init
++ fun:*
++}
++
++{
++ test3
++ Memcheck:Leak
++ fun:realloc
++ fun:g_realloc
++ obj:*
++ fun:g_array_set_size
++ fun:*
++ fun:*
++ obj:*
++ fun:*
++ fun:g_thread_init
++}
++
++{
++ test4
++ Memcheck:Leak
++ fun:*
++ fun:*
++ fun:*
++ fun:*
++ fun:g_thread_init
++}
++
++{
++ test5
++ Memcheck:Leak
++ fun:*
++ fun:*
++ fun:*
++ fun:*
++ fun:*
++ fun:*
++ fun:g_thread_init
++}
++
++{
++ supp9
++ Memcheck:Leak
++ fun:malloc
++ obj:*
++ fun:__nss_database_lookup
++ obj:*
++ obj:*
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ test5.1
++ Memcheck:Leak
++ fun:memalign
++ fun:*
++ obj:*
++ fun:*
++ fun:*
++ fun:*
++ fun:*
++ fun:g_get_filename_charsets
++ obj:*
++ fun:*
++ fun:g_thread_init
++}
++
++{
++ test6
++ Memcheck:Leak
++ fun:memalign
++ fun:posix_memalign
++ obj:*
++ fun:g_slice_alloc
++ fun:g_array_sized_new
++ fun:g_array_new
++ fun:g_static_private_set
++ obj:*
++ fun:g_main_context_dispatch
++}
++
++
++{
++ test8
++ Memcheck:Leak
++ fun:*
++ fun:*
++ fun:*
++ fun:*
++ fun:create_case
++}
++
++{
++ test9
++ Memcheck:Leak
++ fun:*
++ obj:*
++ fun:*
++ fun:*
++ obj:*
++ fun:g_thread_create_full
++}
++
++{
++ test10
++ Memcheck:Leak
++ fun:malloc
++ fun:realloc
++ fun:g_realloc
++ obj:*
++ fun:g_ptr_array_add
++ fun:g_main_context_check
++}
++
++{
++ test11
++ Memcheck:Leak
++ fun:*
++ fun:*
++ fun:*
++ fun:setup_pipe
++}
++
++{
++ tmp1
++ Memcheck:Leak
++ fun:malloc
++ fun:__nss_lookup_function
++ obj:*
++ obj:*
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ tmp2
++ Memcheck:Leak
++ fun:malloc
++ fun:tsearch
++ fun:__nss_lookup_function
++ obj:*
++ obj:*
++ fun:getpwnam_r
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ tmp3
++ Memcheck:Leak
++ fun:malloc
++ fun:g_malloc
++ fun:g_strdup
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ tmp4
++ Memcheck:Leak
++ fun:calloc
++ fun:g_malloc0
++ fun:g_slice_alloc
++ fun:g_slice_alloc0
++ fun:g_slist_prepend
++ fun:g_strsplit
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ tmp5
++ Memcheck:Leak
++ fun:calloc
++ fun:g_malloc0
++ obj:*
++ fun:g_slice_alloc
++ fun:g_slice_alloc0
++ fun:g_slist_prepend
++ fun:g_strsplit
++ obj:*
++ fun:g_get_tmp_dir
++}
++
++{
++ tmp6
++ Memcheck:Leak
++ fun:memalign
++ fun:posix_memalign
++ obj:*
++ fun:g_slice_alloc
++ fun:g_slice_alloc0
++ fun:g_slist_prepend
++ fun:g_strsplit
++ obj:*
++ fun:g_get_tmp_dir
++}
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/wrapper/Makefile.am opensync-0.22/wrapper/Makefile.am
+--- libopensync-0.22/wrapper/Makefile.am 2007-03-27 13:49:09.000000000 +0200
++++ opensync-0.22/wrapper/Makefile.am 2013-04-28 02:38:27.000000000 +0200
+@@ -22,5 +22,5 @@
+ endif
+
+ nodist__opensync_la_SOURCES = opensync_wrap.c
+-_opensync_la_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ $(PYTHON_LDFLAGS) -R $(libdir) -module -avoid-version
++_opensync_la_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -module -avoid-version
+ _opensync_la_LIBADD = $(top_builddir)/opensync/libopensync.la
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/wrapper/Makefile.in opensync-0.22/wrapper/Makefile.in
+--- libopensync-0.22/wrapper/Makefile.in 2007-03-27 14:22:08.000000000 +0200
++++ opensync-0.22/wrapper/Makefile.in 2013-04-28 02:38:27.000000000 +0200
+@@ -1,8 +1,8 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++# Makefile.in generated by automake 1.10 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This Makefile.in is free software; the Free Software Foundation
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+@@ -14,15 +14,11 @@
+
+ @SET_MAKE@
+
+-srcdir = @srcdir@
+-top_srcdir = @top_srcdir@
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+-top_builddir = ..
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+-INSTALL = @INSTALL@
+ install_sh_DATA = $(install_sh) -c -m 644
+ install_sh_PROGRAM = $(install_sh) -c
+ install_sh_SCRIPT = $(install_sh) -c
+@@ -58,18 +54,22 @@
+ _opensync_la_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+ nodist__opensync_la_OBJECTS = opensync_wrap.lo
+ _opensync_la_OBJECTS = $(nodist__opensync_la_OBJECTS)
++_opensync_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++ $(_opensync_la_LDFLAGS) $(LDFLAGS) -o $@
+ @HAVE_PYTHON_TRUE@am__opensync_la_rpath = -rpath $(osbindingsdir)
+-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
++DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+- $(AM_CFLAGS) $(CFLAGS)
++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 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+- $(AM_LDFLAGS) $(LDFLAGS) -o $@
++LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
++ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
++ $(LDFLAGS) -o $@
+ SOURCES = $(nodist__opensync_la_SOURCES)
+ DIST_SOURCES =
+ nodist_osPYTHON_INSTALL = $(INSTALL_DATA)
+@@ -78,8 +78,6 @@
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+-AMDEP_FALSE = @AMDEP_FALSE@
+-AMDEP_TRUE = @AMDEP_TRUE@
+ AMTAR = @AMTAR@
+ AR = @AR@
+ AUTOCONF = @AUTOCONF@
+@@ -87,8 +85,6 @@
+ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ BUILD_ENGINE = @BUILD_ENGINE@
+-BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+-BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+ CFLAGS = @CFLAGS@
+@@ -103,18 +99,13 @@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
++DSYMUTIL = @DSYMUTIL@
+ ECHO = @ECHO@
+ ECHO_C = @ECHO_C@
+ ECHO_N = @ECHO_N@
+ ECHO_T = @ECHO_T@
+ EGREP = @EGREP@
+ ENABLE_DEBUG = @ENABLE_DEBUG@
+-ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+-ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+-ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+-ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+-ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+-ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ ENABLE_TRACE = @ENABLE_TRACE@
+ EXEEXT = @EXEEXT@
+ F77 = @F77@
+@@ -122,8 +113,7 @@
+ GCOV_CFLAGS = @GCOV_CFLAGS@
+ GCOV_LDFLAGS = @GCOV_LDFLAGS@
+ GREP = @GREP@
+-HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+-HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
++INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -135,6 +125,8 @@
+ LN_S = @LN_S@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
++MKDIR_P = @MKDIR_P@
++NMEDIT = @NMEDIT@
+ OBJEXT = @OBJEXT@
+ OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+ OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+@@ -163,6 +155,7 @@
+ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+ PYTHON_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
++SED = @SED@
+ SET_MAKE = @SET_MAKE@
+ SHELL = @SHELL@
+ STRIP = @STRIP@
+@@ -175,15 +168,15 @@
+ XML_LIBS = @XML_LIBS@
+ YACC = @YACC@
+ YFLAGS = @YFLAGS@
++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@
+ ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ am__include = @am__include@
+ am__leading_dot = @am__leading_dot@
+ am__quote = @am__quote@
+@@ -195,6 +188,7 @@
+ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
++builddir = @builddir@
+ datadir = @datadir@
+ datarootdir = @datarootdir@
+ docdir = @docdir@
+@@ -226,8 +220,11 @@
+ pythondir = @pythondir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+ AM_CFLAGS = -Werror
+ INCLUDES = @PACKAGE_CFLAGS@ $(PYTHON_INCLUDES) -I$(top_srcdir) -I$(top_srcdir)/opensync @XML_CFLAGS@
+ EXTRA_DIST = opensync.i
+@@ -278,7 +275,7 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+ install-osbindingsLTLIBRARIES: $(osbindings_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+- test -z "$(osbindingsdir)" || $(mkdir_p) "$(DESTDIR)$(osbindingsdir)"
++ test -z "$(osbindingsdir)" || $(MKDIR_P) "$(DESTDIR)$(osbindingsdir)"
+ @list='$(osbindings_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+@@ -289,7 +286,7 @@
+
+ uninstall-osbindingsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+- @set -x; list='$(osbindings_LTLIBRARIES)'; for p in $$list; do \
++ @list='$(osbindings_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(osbindingsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(osbindingsdir)/$$p"; \
+@@ -304,7 +301,7 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ _opensync.la: $(_opensync_la_OBJECTS) $(_opensync_la_DEPENDENCIES)
+- $(LINK) $(am__opensync_la_rpath) $(_opensync_la_LDFLAGS) $(_opensync_la_OBJECTS) $(_opensync_la_LIBADD) $(LIBS)
++ $(_opensync_la_LINK) $(am__opensync_la_rpath) $(_opensync_la_OBJECTS) $(_opensync_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+@@ -315,22 +312,22 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_wrap.Plo@am__quote@
+
+ .c.o:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+ .c.obj:
+-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ .c.lo:
+-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
++@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
++@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@@ -340,13 +337,9 @@
+
+ clean-libtool:
+ -rm -rf .libs _libs
+-
+-distclean-libtool:
+- -rm -f libtool
+-uninstall-info-am:
+ install-nodist_osPYTHON: $(nodist_os_PYTHON)
+ @$(NORMAL_INSTALL)
+- test -z "$(osdir)" || $(mkdir_p) "$(DESTDIR)$(osdir)"
++ test -z "$(osdir)" || $(MKDIR_P) "$(DESTDIR)$(osdir)"
+ @list='$(nodist_os_PYTHON)'; dlist=''; for p in $$list; do\
+ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
+ if test -f $$b$$p; then \
+@@ -422,22 +415,21 @@
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+ distdir: $(DISTFILES)
+- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+- list='$(DISTFILES)'; for file in $$list; do \
+- case $$file in \
+- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+- esac; \
++ @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; \
+- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+- dir="/$$dir"; \
+- $(mkdir_p) "$(distdir)$$dir"; \
+- else \
+- dir=''; \
+- fi; \
+ if test -d $$d/$$file; then \
++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+@@ -453,7 +445,7 @@
+ all-am: Makefile $(LTLIBRARIES)
+ installdirs:
+ for dir in "$(DESTDIR)$(osbindingsdir)" "$(DESTDIR)$(osdir)"; do \
+- test -z "$$dir" || $(mkdir_p) "$$dir"; \
++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+ install: install-am
+ install-exec: install-exec-am
+@@ -489,7 +481,7 @@
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+- distclean-libtool distclean-tags
++ distclean-tags
+
+ dvi: dvi-am
+
+@@ -503,12 +495,20 @@
+
+ install-data-am: install-nodist_osPYTHON install-osbindingsLTLIBRARIES
+
++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
+@@ -529,22 +529,25 @@
+
+ ps-am:
+
+-uninstall-am: uninstall-info-am uninstall-nodist_osPYTHON \
++uninstall-am: uninstall-nodist_osPYTHON \
+ uninstall-osbindingsLTLIBRARIES
+
++.MAKE: install-am install-strip
++
+ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-osbindingsLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+- install install-am install-data install-data-am install-exec \
+- install-exec-am install-info install-info-am install-man \
++ 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-nodist_osPYTHON install-osbindingsLTLIBRARIES \
++ 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-info-am uninstall-nodist_osPYTHON \
+- uninstall-osbindingsLTLIBRARIES
++ uninstall-nodist_osPYTHON uninstall-osbindingsLTLIBRARIES
+
+
+ opensync_wrap.c: $(srcdir)/opensync.i
+diff -ru --unidirectional-new-file --exclude debian libopensync-0.22/wrapper/opensync.i opensync-0.22/wrapper/opensync.i
+--- libopensync-0.22/wrapper/opensync.i 2007-03-27 13:49:09.000000000 +0200
++++ opensync-0.22/wrapper/opensync.i 2013-04-28 02:38:27.000000000 +0200
+@@ -82,7 +82,7 @@
+ %extend OSyncChange {
+ OSyncChange(PyObject *obj=NULL) {
+ OSyncChange *change = NULL;
+- if (obj)
++ if ((obj) && (obj != Py_None))
+ change = (OSyncChange *)PyCObject_AsVoidPtr(obj);
+ else
+ change = osync_change_new();
diff --git a/debian/opensync/opensync-0.22/debian/patches/001-fix-crappy-test-swig-version.diff b/debian/opensync/opensync-0.22/debian/patches/001-fix-crappy-test-swig-version.diff
new file mode 100644
index 00000000..d3b063f8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/patches/001-fix-crappy-test-swig-version.diff
@@ -0,0 +1,40 @@
+diff -ru a/acinclude.m4 b/acinclude.m4
+--- a/acinclude.m4 2012-05-22 18:04:38.857619515 +0200
++++ b/acinclude.m4 2012-05-22 17:41:53.000000000 +0200
+@@ -1008,15 +1008,28 @@
+ 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'
++ [swig_version_ok=0]
++ if test $available_major -gt $required_major; then
++ [swig_version_ok=1]
+ else
+- AC_MSG_NOTICE([SWIG executable is '$SWIG'])
+- SWIG_LIB=`$SWIG -swiglib`
+- AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
++ if test $available_major -eq $required_major; then
++ if test $available_minor -gt $required_minor; then
++ [swig_version_ok=1]
++ else
++ if test $available_minor -eq $required_minor \
++ -a $available_patch -ge $required_patch; then
++ [swig_version_ok=1]
++ fi
++ fi
++ fi
++ fi
++ if test $swig_version_ok; then
++ AC_MSG_NOTICE([SWIG executable is '$SWIG'])
++ SWIG_LIB=`$SWIG -swiglib`
++ AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
++ else
++ 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'
+ fi
+ else
+ AC_MSG_WARN([cannot determine SWIG version])
diff --git a/debian/opensync/opensync-0.22/debian/patches/002-remove-unused-variables.diff b/debian/opensync/opensync-0.22/debian/patches/002-remove-unused-variables.diff
new file mode 100644
index 00000000..311b1050
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/patches/002-remove-unused-variables.diff
@@ -0,0 +1,34 @@
+diff -ru a/opensync/opensync_time.c b/opensync/opensync_time.c
+--- a/opensync/opensync_time.c 2012-05-22 18:04:38.857619515 +0200
++++ b/opensync/opensync_time.c 2012-05-22 04:45:20.000000000 +0200
+@@ -889,16 +889,13 @@
+ osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, vtime, tzid);
+
+ int year;
+- char *newyear = NULL;
+- time_t newyear_t, timestamp;
++ time_t timestamp;
+ struct tm *std_changetime, *dst_changetime;
+ time_t dstStamp, stdStamp;
+ xmlNode *current = NULL;
+
+ sscanf(vtime, "%4d%*2d%*2dT%*2d%*d%*2d%*c", &year);
+
+- newyear = g_strdup_printf("%4d0101T000000", year);
+- newyear_t = osync_time_vtime2unix(newyear, 0);
+ timestamp = osync_time_vtime2unix(vtime, 0);
+
+ /* Handle XML Timezone field */
+diff -ru a/tools/osynctest.c b/tools/osynctest.c
+--- a/tools/osynctest.c 2012-05-22 18:04:38.857619515 +0200
++++ b/tools/osynctest.c 2012-05-22 17:48:48.000000000 +0200
+@@ -81,8 +81,7 @@
+ double _second() /* note that some compilers like AIX xlf do not require the trailing '_' */
+ {
+ struct timeval tp;
+- int rtn;
+- rtn=gettimeofday(&tp, NULL);
++ gettimeofday(&tp, NULL);
+
+ return ((double)tp.tv_sec+(1.e-6)*tp.tv_usec);
+ }
diff --git a/debian/opensync/opensync-0.22/debian/patches/003-not-take-deprecated-as-error.diff b/debian/opensync/opensync-0.22/debian/patches/003-not-take-deprecated-as-error.diff
new file mode 100644
index 00000000..658a860a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/patches/003-not-take-deprecated-as-error.diff
@@ -0,0 +1,222 @@
+diff -ru a/formats/Makefile.am b/formats/Makefile.am
+--- a/formats/Makefile.am 2012-10-18 02:25:46.000000000 +0200
++++ b/formats/Makefile.am 2012-10-18 02:30:35.000000000 +0200
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
++AM_CFLAGS = -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+
+ formatsdir=@OPENSYNC_FORMATSDIR@
+ opensyncheaderdir=@OPENSYNC_HEADERDIR@
+diff -ru a/formats/Makefile.in b/formats/Makefile.in
+--- a/formats/Makefile.in 2012-10-18 02:25:46.000000000 +0200
++++ b/formats/Makefile.in 2012-10-18 02:30:39.000000000 +0200
+@@ -270,7 +270,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
++AM_CFLAGS = -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+ formatsdir = @OPENSYNC_FORMATSDIR@
+ opensyncheaderdir = @OPENSYNC_HEADERDIR@
+ opensyncheader_HEADERS = file.h
+diff -ru a/formats/vformats-xml/Makefile.am b/formats/vformats-xml/Makefile.am
+--- a/formats/vformats-xml/Makefile.am 2012-10-18 02:25:46.000000000 +0200
++++ b/formats/vformats-xml/Makefile.am 2012-10-18 02:30:41.000000000 +0200
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
++AM_CFLAGS = -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+
+ formatsdir=@OPENSYNC_FORMATSDIR@
+ opensyncheaderdir=@OPENSYNC_HEADERDIR@
+diff -ru a/formats/vformats-xml/Makefile.in b/formats/vformats-xml/Makefile.in
+--- a/formats/vformats-xml/Makefile.in 2012-10-18 02:25:46.000000000 +0200
++++ b/formats/vformats-xml/Makefile.in 2012-10-18 02:30:44.000000000 +0200
+@@ -270,7 +270,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
++AM_CFLAGS = -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+ formatsdir = @OPENSYNC_FORMATSDIR@
+ opensyncheaderdir = @OPENSYNC_HEADERDIR@
+ EXTRA_DIST = \
+diff -ru a/opensync/Makefile.am b/opensync/Makefile.am
+--- a/opensync/Makefile.am 2012-10-18 02:25:46.000000000 +0200
++++ b/opensync/Makefile.am 2012-10-18 02:31:07.000000000 +0200
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
++AM_CFLAGS = -Wall @XML_CFLAGS@ @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+
+ INCLUDES = @PACKAGE_CFLAGS@
+
+diff -ru a/opensync/Makefile.in b/opensync/Makefile.in
+--- a/opensync/Makefile.in 2012-10-18 02:25:46.000000000 +0200
++++ b/opensync/Makefile.in 2012-10-18 02:31:07.000000000 +0200
+@@ -234,7 +234,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
++AM_CFLAGS = -Wall @XML_CFLAGS@ @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+ INCLUDES = @PACKAGE_CFLAGS@
+ lib_LTLIBRARIES = libopensync.la
+ opensyncincludedir = @OPENSYNC_HEADERDIR@
+diff -ru a/osengine/Makefile.am b/osengine/Makefile.am
+--- a/osengine/Makefile.am 2012-10-18 02:25:46.000000000 +0200
++++ b/osengine/Makefile.am 2012-10-18 02:31:07.000000000 +0200
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-AM_CFLAGS = -Werror -Wall @GCOV_CFLAGS@ @XML_CFLAGS@
++AM_CFLAGS = -Wall @GCOV_CFLAGS@ @XML_CFLAGS@
+
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@
+
+diff -ru a/osengine/Makefile.in b/osengine/Makefile.in
+--- a/osengine/Makefile.in 2012-10-18 02:25:46.000000000 +0200
++++ b/osengine/Makefile.in 2012-10-18 02:31:07.000000000 +0200
+@@ -232,7 +232,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Werror -Wall @GCOV_CFLAGS@ @XML_CFLAGS@
++AM_CFLAGS = -Wall @GCOV_CFLAGS@ @XML_CFLAGS@
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@
+ @BUILD_ENGINE_TRUE@lib_LTLIBRARIES = libosengine.la
+ @BUILD_ENGINE_TRUE@osengineincludedir = @OPENSYNC_ENGINEHEADERDIR@
+diff -ru a/osplugin/Makefile.am b/osplugin/Makefile.am
+--- a/osplugin/Makefile.am 2012-10-18 02:25:46.000000000 +0200
++++ b/osplugin/Makefile.am 2012-10-18 02:31:07.000000000 +0200
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
++AM_CFLAGS = -Wall @XML_CFLAGS@ @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine -I$(top_srcdir)/opensync
+
+diff -ru a/osplugin/Makefile.in b/osplugin/Makefile.in
+--- a/osplugin/Makefile.in 2012-10-18 02:25:46.000000000 +0200
++++ b/osplugin/Makefile.in 2012-10-18 02:31:07.000000000 +0200
+@@ -217,7 +217,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
++AM_CFLAGS = -Wall @XML_CFLAGS@ @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine -I$(top_srcdir)/opensync
+ ospluginincludedir = @OPENSYNC_HEADERDIR@
+ osplugin_SOURCES = osplugin.c
+diff -ru a/tests/Makefile.am b/tests/Makefile.am
+--- a/tests/Makefile.am 2012-10-18 01:30:12.000000000 +0200
++++ b/tests/Makefile.am 2012-10-18 02:31:45.000000000 +0200
+@@ -2,7 +2,7 @@
+
+ SUBDIRS = mock-plugin
+
+-AM_CFLAGS = @XML_CFLAGS@ -Wall -Werror @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
++AM_CFLAGS = @XML_CFLAGS@ -Wall @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
+
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ -I$(top_srcdir)/osengine
+
+diff -ru a/tests/Makefile.in b/tests/Makefile.in
+--- a/tests/Makefile.in 2012-10-18 01:30:12.000000000 +0200
++++ b/tests/Makefile.in 2012-10-18 02:31:38.000000000 +0200
+@@ -340,7 +340,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ SUBDIRS = mock-plugin
+-AM_CFLAGS = @XML_CFLAGS@ -Wall -Werror @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
++AM_CFLAGS = @XML_CFLAGS@ -Wall @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ -I$(top_srcdir)/osengine
+ EXTRA_DIST = \
+ data \
+diff -ru a/tests/mock-plugin/Makefile.am b/tests/mock-plugin/Makefile.am
+--- a/tests/mock-plugin/Makefile.am 2012-10-18 01:30:12.000000000 +0200
++++ b/tests/mock-plugin/Makefile.am 2012-10-18 02:31:53.000000000 +0200
+@@ -1,6 +1,6 @@
+ INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+
+-AM_CFLAGS = -Wall -Werror @XML_CFLAGS@ @GCOV_CFLAGS@
++AM_CFLAGS = -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+ AM_LDFLAGS = -rpath @libdir@
+
+ EXTRA_DIST = mock_sync.h Makefile.in
+diff -ru a/tests/mock-plugin/Makefile.in b/tests/mock-plugin/Makefile.in
+--- a/tests/mock-plugin/Makefile.in 2012-10-18 01:30:12.000000000 +0200
++++ b/tests/mock-plugin/Makefile.in 2012-10-18 02:31:50.000000000 +0200
+@@ -232,7 +232,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+-AM_CFLAGS = -Wall -Werror @XML_CFLAGS@ @GCOV_CFLAGS@
++AM_CFLAGS = -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+ AM_LDFLAGS = -rpath @libdir@
+ EXTRA_DIST = mock_sync.h Makefile.in
+ @ENABLE_TESTS_TRUE@formatsdir = @OPENSYNC_FORMATSDIR@
+diff -ru a/tools/Makefile.am b/tools/Makefile.am
+--- a/tools/Makefile.am 2012-10-18 02:25:46.000000000 +0200
++++ b/tools/Makefile.am 2012-10-18 02:31:07.000000000 +0200
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-AM_CFLAGS = -Wall -Werror @GCOV_CFLAGS@
++AM_CFLAGS = -Wall @GCOV_CFLAGS@
+
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine
+
+diff -ru a/tools/Makefile.in b/tools/Makefile.in
+--- a/tools/Makefile.in 2012-10-18 02:25:46.000000000 +0200
++++ b/tools/Makefile.in 2012-10-18 02:31:07.000000000 +0200
+@@ -249,7 +249,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Wall -Werror @GCOV_CFLAGS@
++AM_CFLAGS = -Wall @GCOV_CFLAGS@
+ INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine
+ osyncdump_SOURCES = osyncdump.c
+ osyncdump_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+diff -ru a/wrapper/Makefile.am b/wrapper/Makefile.am
+--- a/wrapper/Makefile.am 2012-10-18 02:25:46.000000000 +0200
++++ b/wrapper/Makefile.am 2012-10-18 02:31:07.000000000 +0200
+@@ -1,10 +1,10 @@
+
+-AM_CFLAGS = -Werror
++AM_CFLAGS = -Wall
+
+ INCLUDES= @PACKAGE_CFLAGS@ $(PYTHON_INCLUDES) -I$(top_srcdir) -I$(top_srcdir)/opensync @XML_CFLAGS@
+
+ opensync_wrap.c: $(srcdir)/opensync.i
+- $(SWIG) -Werror -python -modern -I$(top_srcdir)/opensync $(PYTHON_INCLUDES) -o opensync_wrap.c $(srcdir)/opensync.i
++ $(SWIG) -Wall -python -modern -I$(top_srcdir)/opensync $(PYTHON_INCLUDES) -o opensync_wrap.c $(srcdir)/opensync.i
+
+ EXTRA_DIST = opensync.i
+
+diff -ru a/wrapper/Makefile.in b/wrapper/Makefile.in
+--- a/wrapper/Makefile.in 2012-10-18 02:25:46.000000000 +0200
++++ b/wrapper/Makefile.in 2012-10-18 02:31:07.000000000 +0200
+@@ -225,7 +225,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Werror
++AM_CFLAGS = -Wall
+ INCLUDES = @PACKAGE_CFLAGS@ $(PYTHON_INCLUDES) -I$(top_srcdir) -I$(top_srcdir)/opensync @XML_CFLAGS@
+ EXTRA_DIST = opensync.i
+ CLEANFILES = \
+@@ -551,7 +551,7 @@
+
+
+ opensync_wrap.c: $(srcdir)/opensync.i
+- $(SWIG) -Werror -python -modern -I$(top_srcdir)/opensync $(PYTHON_INCLUDES) -o opensync_wrap.c $(srcdir)/opensync.i
++ $(SWIG) -Wall -python -modern -I$(top_srcdir)/opensync $(PYTHON_INCLUDES) -o opensync_wrap.c $(srcdir)/opensync.i
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/debian/patches/series b/debian/opensync/opensync-0.22/debian/patches/series
new file mode 100644
index 00000000..f3f594b6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/patches/series
@@ -0,0 +1,4 @@
+000-debian.diff
+001-fix-crappy-test-swig-version.diff
+002-remove-unused-variables.diff
+003-not-take-deprecated-as-error.diff
diff --git a/debian/opensync/opensync-0.22/debian/pycompat b/debian/opensync/opensync-0.22/debian/pycompat
new file mode 100644
index 00000000..0cfbf088
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/pycompat
@@ -0,0 +1 @@
+2
diff --git a/debian/opensync/opensync-0.22/debian/python-opensync.install b/debian/opensync/opensync-0.22/debian/python-opensync.install
new file mode 100644
index 00000000..607c0659
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/python-opensync.install
@@ -0,0 +1 @@
+usr/lib/python*
diff --git a/debian/opensync/opensync-0.22/debian/pyversions b/debian/opensync/opensync-0.22/debian/pyversions
new file mode 100644
index 00000000..8b253bc3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/pyversions
@@ -0,0 +1 @@
+2.4-
diff --git a/debian/opensync/opensync-0.22/debian/rules b/debian/opensync/opensync-0.22/debian/rules
new file mode 100755
index 00000000..66544454
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/rules
@@ -0,0 +1,163 @@
+#!/usr/bin/make -f
+# Based on the multi2 sample debian/rules file:
+# ---
+# Sample debian/rules that uses debhelper.
+# This file is public domain software, originally written by Joey Hess.
+#
+# This version is for a multibinary package. It also allows you to build any
+# of the binary packages independantly, via binary-<package> targets.
+# ---
+
+#include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
+ && echo xz || echo bzip2)
+DEB_PYTHON_SYSTEM = $(if $(wildcard /usr/bin/dh_pysupport),pysupport)
+DH_PYTHON2 = $(if $(wildcard /usr/bin/dh_python2),dh_python2,dh_pysupport)
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+CROSS= --build $(DEB_BUILD_GNU_TYPE)
+endif
+
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+export CFLAGS
+
+SRC := $(CURDIR)
+BUILD := $(CURDIR)/build
+TARGET := $(CURDIR)/debian/tmp
+
+PYVERS := $(shell pyversions -vs)
+
+configure: debian/rules
+ dh_testdir
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+ autoreconf -i
+
+debian/configure-stamp: $(PYVERS:%=debian/configure-python%-stamp)
+ touch $@
+
+debian/configure-python%-stamp:
+ dh_testdir
+ chmod u+x configure
+ chmod u+x py-compile
+ [ -d $(BUILD)-python$* ] || mkdir $(BUILD)-python$*
+ cd $(BUILD)-python$* && PYTHON=/usr/bin/python$* CFLAGS="$(CFLAGS)" $(SRC)/configure $(CROSS) \
+ --prefix=/usr \
+ --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
+ --enable-static --enable-python=$* --libexecdir=\$${prefix}/lib/opensync \
+ --enable-tracing
+ touch $@
+
+build: configure debian/build-stamp
+
+debian/build-stamp: debian/configure-stamp $(PYVERS:%=debian/build-python%-stamp)
+ touch $@
+
+debian/build-python%-stamp:
+ dh_testdir
+ $(MAKE) -C $(BUILD)-python$*
+ # FIXME invoke this once upstream decide on the right fix.
+ #$(MAKE) -C $(BUILD)-python$* check
+ touch $@
+
+clean::
+ dh_testdir
+ dh_testroot
+ rm -f debian/configure*stamp debian/build*stamp
+ rm -rf build-*
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ rm -f config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ rm -f config.guess
+endif
+ dh_clean
+
+install: DH_OPTIONS=
+install: debian/build-stamp install-common $(PYVERS:%=install-python%)
+install-common:
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+install-python%:
+ $(MAKE) -C $(BUILD)-python$* install DESTDIR=$(TARGET)
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installcatalogs
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installman
+# dh_installcron
+# dh_installinfo
+ dh_install --sourcedir=$(TARGET) --fail-missing
+ dh_strip --dbg-package=libopensync0-dbg
+ dh_link
+ dh_compress
+ dh_fixperms
+# dh_perl
+ ${DH_PYTHON2}
+ # Don't ship .a and .la files in python module
+ find "debian/python-opensync/usr/lib" -name '*.a' -exec rm '{}' ';'
+ find "debian/python-opensync/usr/lib" -name '*.la' -exec rm '{}' ';'
+ dh_makeshlibs -Xformats -V
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb $(DEB_DH_BUILDDEB_ARGS)
+
+# Build architecture independant packages using the common target.
+binary-indep: build install
+# (Uncomment this next line if you have such packages.)
+# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: build install
+ $(MAKE) -f $(SRC)/debian/rules DH_OPTIONS=-a binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+ make -f $(SRC)/debian/rules binary-common DH_OPTIONS=-p$*
+
+binary: binary-indep binary-arch
+.PHONY: build configure clean binary-indep binary-arch binary-common binary install install-common
diff --git a/debian/opensync/opensync-0.22/debian/source/format b/debian/opensync/opensync-0.22/debian/source/format
new file mode 100644
index 00000000..163aaf8d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/opensync/opensync-0.22/debian/source/options b/debian/opensync/opensync-0.22/debian/source/options
new file mode 100644
index 00000000..d71748bb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/debian/source/options
@@ -0,0 +1,3 @@
+# Use xz instead of gzip
+compression = "xz"
+compression-level = 9
diff --git a/debian/opensync/opensync-0.22/depcomp b/debian/opensync/opensync-0.22/depcomp
new file mode 100755
index 00000000..04701da5
--- /dev/null
+++ b/debian/opensync/opensync-0.22/depcomp
@@ -0,0 +1,530 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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@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@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.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ 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.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+ stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
+ # 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$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"
+ ;;
+
+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 mecanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -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:
diff --git a/debian/opensync/opensync-0.22/formats/Makefile.am b/debian/opensync/opensync-0.22/formats/Makefile.am
new file mode 100755
index 00000000..0dc325e3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/Makefile.am
@@ -0,0 +1,38 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+
+formatsdir=@OPENSYNC_FORMATSDIR@
+opensyncheaderdir=@OPENSYNC_HEADERDIR@
+
+opensyncheader_HEADERS = file.h
+
+INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+
+formats_LTLIBRARIES = data.la event.la todo.la contact.la note.la file.la
+
+data_la_SOURCES = data.c
+data_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+data_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+event_la_SOURCES = event.c
+event_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+event_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+note_la_SOURCES = note.c
+note_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+note_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+todo_la_SOURCES = todo.c
+todo_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+todo_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+contact_la_SOURCES = contact.c
+contact_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+contact_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+file_la_SOURCES = file.c
+file_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+file_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+SUBDIRS = vformats-xml
diff --git a/debian/opensync/opensync-0.22/formats/Makefile.in b/debian/opensync/opensync-0.22/formats/Makefile.in
new file mode 100644
index 00000000..4882a8c6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/Makefile.in
@@ -0,0 +1,697 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = formats
+DIST_COMMON = $(opensyncheader_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+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)$(formatsdir)" \
+ "$(DESTDIR)$(opensyncheaderdir)"
+formatsLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(formats_LTLIBRARIES)
+contact_la_DEPENDENCIES =
+am_contact_la_OBJECTS = contact.lo
+contact_la_OBJECTS = $(am_contact_la_OBJECTS)
+data_la_DEPENDENCIES =
+am_data_la_OBJECTS = data.lo
+data_la_OBJECTS = $(am_data_la_OBJECTS)
+event_la_DEPENDENCIES =
+am_event_la_OBJECTS = event.lo
+event_la_OBJECTS = $(am_event_la_OBJECTS)
+file_la_DEPENDENCIES =
+am_file_la_OBJECTS = file.lo
+file_la_OBJECTS = $(am_file_la_OBJECTS)
+note_la_DEPENDENCIES =
+am_note_la_OBJECTS = note.lo
+note_la_OBJECTS = $(am_note_la_OBJECTS)
+todo_la_DEPENDENCIES =
+am_todo_la_OBJECTS = todo.lo
+todo_la_OBJECTS = $(am_todo_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(contact_la_SOURCES) $(data_la_SOURCES) $(event_la_SOURCES) \
+ $(file_la_SOURCES) $(note_la_SOURCES) $(todo_la_SOURCES)
+DIST_SOURCES = $(contact_la_SOURCES) $(data_la_SOURCES) \
+ $(event_la_SOURCES) $(file_la_SOURCES) $(note_la_SOURCES) \
+ $(todo_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+opensyncheaderHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(opensyncheader_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+formatsdir = @OPENSYNC_FORMATSDIR@
+opensyncheaderdir = @OPENSYNC_HEADERDIR@
+opensyncheader_HEADERS = file.h
+INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+formats_LTLIBRARIES = data.la event.la todo.la contact.la note.la file.la
+data_la_SOURCES = data.c
+data_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+data_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+event_la_SOURCES = event.c
+event_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+event_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+note_la_SOURCES = note.c
+note_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+note_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+todo_la_SOURCES = todo.c
+todo_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+todo_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+contact_la_SOURCES = contact.c
+contact_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+contact_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+file_la_SOURCES = file.c
+file_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+file_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+SUBDIRS = vformats-xml
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign formats/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign formats/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-formatsLTLIBRARIES: $(formats_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(formatsdir)" || $(mkdir_p) "$(DESTDIR)$(formatsdir)"
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(formatsdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(formatsdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-formatsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(formatsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(formatsdir)/$$p"; \
+ done
+
+clean-formatsLTLIBRARIES:
+ -test -z "$(formats_LTLIBRARIES)" || rm -f $(formats_LTLIBRARIES)
+ @list='$(formats_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
+contact.la: $(contact_la_OBJECTS) $(contact_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(contact_la_LDFLAGS) $(contact_la_OBJECTS) $(contact_la_LIBADD) $(LIBS)
+data.la: $(data_la_OBJECTS) $(data_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(data_la_LDFLAGS) $(data_la_OBJECTS) $(data_la_LIBADD) $(LIBS)
+event.la: $(event_la_OBJECTS) $(event_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(event_la_LDFLAGS) $(event_la_OBJECTS) $(event_la_LIBADD) $(LIBS)
+file.la: $(file_la_OBJECTS) $(file_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(file_la_LDFLAGS) $(file_la_OBJECTS) $(file_la_LIBADD) $(LIBS)
+note.la: $(note_la_OBJECTS) $(note_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(note_la_LDFLAGS) $(note_la_OBJECTS) $(note_la_LIBADD) $(LIBS)
+todo.la: $(todo_la_OBJECTS) $(todo_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(todo_la_LDFLAGS) $(todo_la_OBJECTS) $(todo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contact.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/note.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/todo.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-opensyncheaderHEADERS: $(opensyncheader_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(opensyncheaderdir)" || $(mkdir_p) "$(DESTDIR)$(opensyncheaderdir)"
+ @list='$(opensyncheader_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(opensyncheaderHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(opensyncheaderdir)/$$f'"; \
+ $(opensyncheaderHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(opensyncheaderdir)/$$f"; \
+ done
+
+uninstall-opensyncheaderHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(opensyncheader_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(opensyncheaderdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(opensyncheaderdir)/$$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"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @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; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(opensyncheaderdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-formatsLTLIBRARIES clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-formatsLTLIBRARIES \
+ install-opensyncheaderHEADERS
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-formatsLTLIBRARIES uninstall-info-am \
+ uninstall-opensyncheaderHEADERS
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-formatsLTLIBRARIES clean-generic clean-libtool \
+ clean-recursive ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am \
+ install-formatsLTLIBRARIES install-info install-info-am \
+ install-man install-opensyncheaderHEADERS install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-formatsLTLIBRARIES uninstall-info-am \
+ uninstall-opensyncheaderHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/formats/contact.c b/debian/opensync/opensync-0.22/formats/contact.c
new file mode 100644
index 00000000..ee549d20
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/contact.c
@@ -0,0 +1,102 @@
+/*
+ * contact - A plugin for contact objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync/opensync.h>
+#include <glib.h>
+#include <opensync/opensync_support.h>
+#include <string.h>
+#include <stdio.h>
+
+static OSyncConvCmpResult compare_vcard(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ int leftinpsize = osync_change_get_datasize(leftchange);
+ char *leftinput = osync_change_get_data(leftchange);
+ int rightinpsize = osync_change_get_datasize(rightchange);
+ char *rightinput = osync_change_get_data(rightchange);
+
+ if (leftinpsize == rightinpsize) {
+ if (!memcmp(leftinput, rightinput, leftinpsize))
+ return CONV_DATA_SAME;
+ }
+
+ //Get the name of the contact and compare
+ //If the same, return SIMILAR
+
+ return CONV_DATA_MISMATCH;
+}
+
+static osync_bool detect_plain_as_vcard21(OSyncFormatEnv *env, const char *data, int size)
+{
+ osync_debug("VCARD21", 3, "start: %s", __func__);
+
+ if (!data)
+ return FALSE;
+
+ return osync_pattern_match("*BEGIN:VCARD*VERSION:2.1*", data, size);
+}
+
+static osync_bool detect_plain_as_vcard30(OSyncFormatEnv *env, const char *data, int size)
+{
+ osync_debug("VCARD30", 3, "start: %s", __func__);
+
+ if (!data)
+ return FALSE;
+
+ return osync_pattern_match("*BEGIN:VCARD*VERSION:3.0*", data, size);
+}
+
+static void create_vcard21(OSyncChange *change)
+{
+ char *vcard = g_strdup_printf("BEGIN:VCARD\r\nVERSION:2.1\r\nN:%s;%s;;;\r\nEND:VCARD\r\n", osync_rand_str(10), osync_rand_str(10));
+ osync_change_set_data(change, vcard, strlen(vcard) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+
+static void create_vcard30(OSyncChange *change)
+{
+ char *vcard = g_strdup_printf("BEGIN:VCARD\r\nVERSION:3.0\r\nN:%s;%s;;;\r\nEND:VCARD\r\n", osync_rand_str(10), osync_rand_str(10));
+ osync_change_set_data(change, vcard, strlen(vcard) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+
+static OSyncFilterAction vcard_categories_filter(OSyncChange *change, char *config)
+{
+ //Check what categories are supported here.
+ return OSYNC_FILTER_IGNORE;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "contact");
+
+ osync_env_register_objformat(env, "contact", "vcard21");
+ osync_env_format_set_compare_func(env, "vcard21", compare_vcard);
+ osync_env_format_set_create_func(env, "vcard21", create_vcard21);
+ osync_env_register_detector(env, "plain", "vcard21", detect_plain_as_vcard21);
+ osync_env_register_filter_function(env, "vcard_categories_filter", "contact", "vcard21", vcard_categories_filter);
+
+ osync_env_register_objformat(env, "contact", "vcard30");
+ osync_env_format_set_compare_func(env, "vcard30", compare_vcard);
+ osync_env_format_set_create_func(env, "vcard30", create_vcard30);
+ osync_env_register_detector(env, "plain", "vcard30", detect_plain_as_vcard30);
+ osync_env_register_filter_function(env, "vcard_categories_filter", "contact", "vcard30", vcard_categories_filter);
+}
diff --git a/debian/opensync/opensync-0.22/formats/data.c b/debian/opensync/opensync-0.22/formats/data.c
new file mode 100644
index 00000000..95ef60b0
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/data.c
@@ -0,0 +1,77 @@
+/*
+ * data - A plugin for data objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync/opensync.h>
+#include <string.h>
+#include <stdlib.h>
+#include <glib.h>
+
+/** @defgroup data_plain data/plain format
+ *
+ * Definition: pointer to a malloc()ed block of data, or a NULL
+ * pointer.
+ */
+
+/** data/plain comparison function
+ *
+ * The comparison function is a memcpy() on the data.
+ *
+ * @ingroup data_plain
+ */
+static OSyncConvCmpResult compare_plain(OSyncChange *a, OSyncChange *b)
+{
+ const char *d1 = osync_change_get_data(a);
+ const char *d2 = osync_change_get_data(b);
+ size_t s1 = osync_change_get_datasize(a);
+ size_t s2 = osync_change_get_datasize(b);
+
+ /* Consider empty block equal NULL pointers */
+ if (!s1) d1 = NULL;
+ if (!s2) d2 = NULL;
+
+ if (d1 && d2) {
+ int r = memcmp(d1, d2, s1 < s2 ? s1 : s2);
+ if (!r && s1 == s2)
+ return CONV_DATA_SAME;
+ else
+ return CONV_DATA_MISMATCH;
+ } else if (!d1 && !d2)
+ return CONV_DATA_SAME;
+ else
+ return CONV_DATA_MISMATCH;
+}
+
+static osync_bool copy_plain(const char *input, int inpsize, char **output, int *outpsize)
+{
+ char *r = g_malloc0(inpsize);
+
+ memcpy(r, input, inpsize);
+ *output = r;
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "data");
+ osync_env_register_objformat(env, "data", "plain");
+ osync_env_format_set_compare_func(env, "plain", compare_plain);
+ osync_env_format_set_copy_func(env, "plain", copy_plain);
+}
diff --git a/debian/opensync/opensync-0.22/formats/event.c b/debian/opensync/opensync-0.22/formats/event.c
new file mode 100644
index 00000000..e98db6e0
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/event.c
@@ -0,0 +1,86 @@
+/*
+ * event - A plugin for event objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync/opensync.h>
+#include <glib.h>
+#include <opensync/opensync_support.h>
+#include <string.h>
+
+/** @defgroup event_vevent event/vevent data format
+ *
+ * The vevent data should be a malloc()ed block of data. See
+ * osync_env_format_set_malloced().
+ *
+ * It can be treated as a plain block of data. See
+ * osync_env_format_set_like().
+ */
+
+static OSyncConvCmpResult compare_vevent(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ /*FIXME: Implement me */
+ return CONV_DATA_MISMATCH;
+}
+
+static osync_bool detect_plain_as_vevent10(OSyncFormatEnv *env, const char *data, int size)
+{
+ osync_debug("VCAL", 3, "start: %s", __func__);
+
+ return osync_pattern_match("*BEGIN:VCALENDAR*VERSION:1.0*BEGIN:VEVENT*", data, size);
+}
+
+static osync_bool detect_plain_as_vevent20(OSyncFormatEnv *env, const char *data, int size)
+{
+ osync_debug("VCAL", 3, "start: %s", __func__);
+
+ return osync_pattern_match("*BEGIN:VCALENDAR*VERSION:2.0*BEGIN:VEVENT*", data, size);
+}
+
+static void create_event10(OSyncChange *change)
+{
+ char *vevent = g_strdup_printf("BEGIN:VCALENDAR\r\nPRODID:-//OpenSync//NONSGML OpenSync TestGenerator//EN\r\nVERSION:1.0\r\nBEGIN:VEVENT\r\nDTSTART:20050307T124500Z\r\nDTEND:20050307T130000Z\r\nSEQUENCE:0\r\nSUMMARY:%s\r\nEND:VEVENT\r\nEND:VCALENDAR", osync_rand_str(20));
+
+ osync_change_set_data(change, vevent, strlen(vevent) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(8));
+}
+
+static void create_event20(OSyncChange *change)
+{
+ char *vevent = g_strdup_printf("BEGIN:VCALENDAR\r\nPRODID:-//OpenSync//NONSGML OpenSync TestGenerator//EN\r\nVERSION:2.0\r\nBEGIN:VEVENT\r\nDTSTART:20050307T124500Z\r\nDTEND:20050307T130000Z\r\nSEQUENCE:0\r\nSUMMARY:%s\r\nEND:VEVENT\r\nEND:VCALENDAR", osync_rand_str(20));
+
+ osync_change_set_data(change, vevent, strlen(vevent) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(8));
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "event");
+
+ osync_env_register_objformat(env, "event", "vevent10");
+ osync_env_format_set_compare_func(env, "vevent10", compare_vevent);
+ osync_env_format_set_create_func(env, "vevent10", create_event10);
+ osync_env_register_detector(env, "plain", "vevent10", detect_plain_as_vevent10);
+
+ osync_env_register_objformat(env, "event", "vevent20");
+ osync_env_format_set_compare_func(env, "vevent20", compare_vevent);
+ osync_env_format_set_create_func(env, "vevent20", create_event20);
+ osync_env_register_detector(env, "plain", "vevent20", detect_plain_as_vevent20);
+}
diff --git a/debian/opensync/opensync-0.22/formats/file.c b/debian/opensync/opensync-0.22/formats/file.c
new file mode 100644
index 00000000..5742eb2d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/file.c
@@ -0,0 +1,303 @@
+/*
+ * opensync - A plugin for file objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync/opensync.h>
+
+#include "file.h"
+#include <string.h>
+#include <glib.h>
+
+static OSyncConvCmpResult compare_file(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, leftchange, rightchange);
+
+ fileFormat *leftfile = (fileFormat *)osync_change_get_data(leftchange);
+ fileFormat *rightfile = (fileFormat *)osync_change_get_data(rightchange);
+
+ osync_bool data_same = FALSE;
+ osync_bool path_same = FALSE;
+
+ if (!strcmp(osync_change_get_uid(leftchange), osync_change_get_uid(rightchange)))
+ path_same = TRUE;
+
+ osync_trace(TRACE_INTERNAL, "%i %i", leftfile->size, rightfile->size);
+
+ if (leftfile->size == rightfile->size) {
+ if (leftfile->data == rightfile->data) {
+ data_same = TRUE;
+ } else {
+ if (!memcmp(leftfile->data, rightfile->data, leftfile->size))
+ data_same = TRUE;
+ }
+ }
+
+ if (data_same && path_same) {
+ osync_trace(TRACE_EXIT, "%s: Same", __func__);
+ return CONV_DATA_SAME;
+ }
+ if (path_same) {
+ osync_trace(TRACE_EXIT, "%s: Similar", __func__);
+ return CONV_DATA_SIMILAR;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: Mismatch", __func__);
+ return CONV_DATA_MISMATCH;
+}
+
+#ifdef STRESS_TEST
+static void create_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+ fileFormat *file_info = g_malloc0(sizeof(fileFormat));
+ int file_size = g_random_int_range(0, 1000);
+ osync_change_set_data(change, (char *)file_info, sizeof(fileFormat), TRUE);
+
+ file_info->data = g_malloc0(file_size * 105 * sizeof(char));
+ file_info->size = file_size * 100 * sizeof(char);
+
+ char *datap = file_info->data;
+ FILE *fd = fopen("/dev/urandom", "r");
+ if (fd) {
+ for (; file_size > 5; file_size--) {
+ fread(datap, 100, 1, fd);
+ datap += 100 * sizeof(char);
+ }
+ }
+ fclose(fd);
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+#endif
+
+static osync_bool conv_file_to_plain(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, user_data, input, inpsize, output, outpsize, free_input, error);
+ g_assert(inpsize == sizeof(fileFormat));
+ fileFormat *file = (fileFormat *)input;
+
+ *free_input = FALSE;
+ *output = file->data;
+ *outpsize = file->size;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+static osync_bool conv_plain_to_file(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, user_data, input, inpsize, output, outpsize, free_input, error);
+ fileFormat *file = osync_try_malloc0(sizeof(fileFormat), error);
+ if (!file)
+ goto error;
+
+ file->data = input;
+ file->size = inpsize;
+
+ *free_input = FALSE;
+ *output = (char *)file;
+ *outpsize = sizeof(*file);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+static osync_bool marshall_file(const char *input, int inpsize, char **output, int *outpsize, OSyncError **error)
+{
+ /* The marshall block will be a fileFormat struct, followed by the file data
+ *
+ * the 'data' field on fileFormat will be set to NULL
+ */
+
+ /* Get our input file struct */
+ g_assert(inpsize == sizeof(fileFormat));
+ fileFormat *file = (fileFormat*)input;
+
+ /* Allocate our block */
+ int osize = sizeof(fileFormat) + file->size;
+ char *out = osync_try_malloc0(osize, error);
+ if (!out)
+ goto error;
+
+
+ /* Get the pointers to the output data: */
+ /* fileFormat struct in the beginning */
+ fileFormat *outfile = (fileFormat*)out;
+ /* file data immediately after outfile */
+ char *outdata = ((char*)outfile) + sizeof(fileFormat);
+
+ /* Copy the data: */
+ /* file struct */
+ memcpy(outfile, file, sizeof(fileFormat));
+ outfile->data = NULL;
+
+ /* file data */
+ if (file->size > 0)
+ memcpy(outdata, file->data, file->size);
+
+ *output = out;
+ *outpsize = osize;
+ return TRUE;
+
+error:
+ return FALSE;
+}
+
+static osync_bool demarshall_file(const char *input, int inpsize, char **output, int *outpsize, OSyncError **error)
+{
+ /* Get file struct */
+ g_assert(inpsize >= sizeof(fileFormat));
+ fileFormat *file = (fileFormat*)input;
+
+ /* get file data */
+ g_assert(inpsize == sizeof(fileFormat) + file->size);
+ const char *filedata = input + sizeof(fileFormat);
+
+ fileFormat *newfile = osync_try_malloc0(sizeof(fileFormat), error);
+ if (!newfile)
+ goto error;
+
+ memcpy(newfile, file, sizeof(fileFormat));
+
+ if (file->size > 0) {
+ newfile->data = osync_try_malloc0(file->size, error);
+ if (!newfile->data)
+ goto error_free_file;
+
+ memcpy(newfile->data, filedata, file->size);
+ } else
+ newfile->data = NULL;
+
+ *output = (char*)newfile;
+ *outpsize = sizeof(fileFormat);
+ return TRUE;
+
+error_free_file:
+ g_free(newfile);
+error:
+ return FALSE;
+}
+
+static void destroy_file(char *input, size_t inpsize)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i)", __func__, input, inpsize);
+ g_assert(inpsize == sizeof(fileFormat));
+ fileFormat *file = (fileFormat *)input;
+
+ g_free(file->data);
+ g_free(file);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void duplicate_file(OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, change);
+
+ char *newuid = g_strdup_printf ("%s-dupe", osync_change_get_uid(change));
+ osync_change_set_uid(change, newuid);
+ g_free(newuid);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static osync_bool copy_file(const char *input, int inpsize, char **output, int *outpsize)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %p, %p)", __func__, input, inpsize, output, outpsize);
+
+ fileFormat *oldfile = (fileFormat *)input;
+ fileFormat *newfile = g_malloc0(sizeof(fileFormat));
+
+ newfile->groupid = oldfile->groupid;
+ newfile->mode = oldfile->mode;
+ newfile->userid = oldfile->userid;
+ newfile->size = oldfile->size;
+ newfile->last_mod = oldfile->last_mod;
+
+ if (oldfile->size) {
+ newfile->data = g_malloc0(oldfile->size);
+ memcpy(newfile->data, oldfile->data, oldfile->size);
+ }
+
+ *output = (char *)newfile;
+ *outpsize = inpsize;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+static void create_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ fileFormat *newfile = g_malloc0(sizeof(fileFormat));
+
+ char *data = osync_rand_str(g_random_int_range(1, 100));
+ newfile->data = data;
+ newfile->size = strlen(data) + 1;
+
+ osync_change_set_data(change, (char *)newfile, sizeof(newfile), TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+
+static time_t revision_file(OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, change, error);
+
+ fileFormat *filechange = (fileFormat *)osync_change_get_data(change);
+ time_t lastmod = filechange->last_mod;
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, lastmod);
+ return lastmod;
+}
+
+static char *print_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+ fileFormat *file = (fileFormat *)osync_change_get_data(change);
+
+ char *printable = g_strdup_printf ("File: %s\nSize: %i", osync_change_get_uid(change), file ? file->size : 0);
+ return printable;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "data");
+ osync_env_register_objformat(env, "data", "file");
+ osync_env_format_set_compare_func(env, "file", compare_file);
+ osync_env_format_set_duplicate_func(env, "file", duplicate_file);
+ osync_env_format_set_destroy_func(env, "file", destroy_file);
+ osync_env_format_set_print_func(env, "file", print_file);
+ osync_env_format_set_copy_func(env, "file", copy_file);
+ osync_env_format_set_create_func(env, "file", create_file);
+ osync_env_format_set_revision_func(env, "file", revision_file);
+
+ osync_env_format_set_marshall_func(env, "file", marshall_file);
+ osync_env_format_set_demarshall_func(env, "file", demarshall_file);
+
+#ifdef STRESS_TEST
+ osync_env_format_set_create_func(env, "file", create_file);
+#endif
+ osync_env_register_converter(env, CONVERTER_DECAP, "file", "plain", conv_file_to_plain);
+ osync_env_register_converter(env, CONVERTER_ENCAP, "plain", "file", conv_plain_to_file);
+}
diff --git a/debian/opensync/opensync-0.22/formats/file.h b/debian/opensync/opensync-0.22/formats/file.h
new file mode 100644
index 00000000..7f608fc8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/file.h
@@ -0,0 +1,43 @@
+/*
+ * opensync - A file format for opensync
+ * Copyright (C) 2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ *
+ */
+
+#ifndef _FILE_H
+#define _FILE_H
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+typedef struct fileFormat {
+ /** The mode of this file. See man fstat for explanation */
+ mode_t mode;
+ /** The id of the user (owner) of this file */
+ uid_t userid;
+ /** The id of the owning group of this file */
+ gid_t groupid;
+ /** Time of the last modification */
+ time_t last_mod;
+ /** The file contents */
+ char *data;
+ /** The size of the file contents (without trailing /0) */
+ int size;
+} fileFormat;
+
+#endif //_FILE_H
diff --git a/debian/opensync/opensync-0.22/formats/note.c b/debian/opensync/opensync-0.22/formats/note.c
new file mode 100644
index 00000000..4a164374
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/note.c
@@ -0,0 +1,41 @@
+#include <opensync/opensync.h>
+#include <glib.h>
+#include <opensync/opensync_support.h>
+#include <stdio.h>
+#include <string.h>
+
+static osync_bool detect_plain_as_vnote(OSyncFormatEnv *env, const char *data, int size)
+{
+ osync_debug("VNOTE11", 3, "start: %s", __func__);
+
+ if (!data)
+ return FALSE;
+
+ return osync_pattern_match("*BEGIN:VNOTE*VERSION:1.1*", data, size);
+}
+
+static OSyncConvCmpResult compare_vnote(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ return CONV_DATA_MISMATCH;
+}
+
+static void create_vnote11(OSyncChange *change)
+{
+ char *vnote = g_strdup_printf("BEGIN:VNOTE\r\nVERSION:1.1\r\nBODY:%s\r\nSUMMARY:%s\r\nEND:VNOTE", osync_rand_str(20), osync_rand_str(6));
+
+ osync_change_set_data(change, vnote, strlen(vnote) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(8));
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "note");
+ osync_env_register_objformat(env, "note", "vnote11");
+ osync_env_register_detector(env, "plain", "vnote11", detect_plain_as_vnote);
+ osync_env_format_set_create_func(env, "vnote11", create_vnote11);
+ osync_env_format_set_compare_func(env, "vnote11", compare_vnote);
+
+ osync_env_register_objtype(env, "note");
+ osync_env_register_objformat(env, "note", "memo");
+}
diff --git a/debian/opensync/opensync-0.22/formats/todo.c b/debian/opensync/opensync-0.22/formats/todo.c
new file mode 100644
index 00000000..f59d84b8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/todo.c
@@ -0,0 +1,76 @@
+/*
+ * todo - A plugin for todo objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync/opensync.h"
+#include <glib.h>
+#include <opensync/opensync_support.h>
+#include <string.h>
+
+static OSyncConvCmpResult compare_vtodo(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ return CONV_DATA_MISMATCH;
+}
+
+static osync_bool detect_plain_as_vtodo10(OSyncFormatEnv *env, const char *data, int size)
+{
+ osync_debug("VCAL", 3, "start: %s", __func__);
+
+ return osync_pattern_match("*BEGIN:VCALENDAR*VERSION:1.0*BEGIN:VTODO*", data, size);
+}
+
+static osync_bool detect_plain_as_vtodo20(OSyncFormatEnv *env, const char *data, int size)
+{
+ osync_debug("VCAL", 3, "start: %s", __func__);
+
+ return osync_pattern_match("*BEGIN:VCALENDAR*VERSION:2.0*BEGIN:VTODO*", data, size);
+}
+
+static void create_todo10(OSyncChange *change)
+{
+ char *vtodo = g_strdup_printf("BEGIN:VCALENDAR\r\nPRODID:-//OpenSync//NONSGML OpenSync TestGenerator//EN\r\nVERSION:1.0\r\nBEGIN:VTODO\r\nSUMMARY:%s\r\nEND:VTODO\r\nEND:VCALENDAR", osync_rand_str(20));
+
+ osync_change_set_data(change, vtodo, strlen(vtodo) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+
+static void create_todo20(OSyncChange *change)
+{
+ char *vtodo = g_strdup_printf("BEGIN:VCALENDAR\r\nPRODID:-//OpenSync//NONSGML OpenSync TestGenerator//EN\r\nVERSION:2.0\r\nBEGIN:VTODO\r\nSUMMARY:%s\r\nEND:VTODO\r\nEND:VCALENDAR", osync_rand_str(20));
+
+ osync_change_set_data(change, vtodo, strlen(vtodo) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "todo");
+
+ osync_env_register_objformat(env, "todo", "vtodo10");
+ osync_env_format_set_compare_func(env, "vtodo10", compare_vtodo);
+ osync_env_format_set_create_func(env, "vtodo10", create_todo10);
+ osync_env_register_detector(env, "plain", "vtodo10", detect_plain_as_vtodo10);
+
+ osync_env_register_objformat(env, "todo", "vtodo20");
+ osync_env_format_set_compare_func(env, "vtodo20", compare_vtodo);
+ osync_env_format_set_create_func(env, "vtodo20", create_todo20);
+ osync_env_register_detector(env, "plain", "vtodo20", detect_plain_as_vtodo20);
+}
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/Makefile.am b/debian/opensync/opensync-0.22/formats/vformats-xml/Makefile.am
new file mode 100755
index 00000000..39dbf385
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/Makefile.am
@@ -0,0 +1,50 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+
+formatsdir=@OPENSYNC_FORMATSDIR@
+opensyncheaderdir=@OPENSYNC_HEADERDIR@
+
+EXTRA_DIST = \
+ vformat.h \
+ xml-support.h \
+ vcalical.h \
+ xml-vcard.h \
+ xml-vcal.h \
+ xml-vnote.h
+
+opensyncheader_HEADERS = xml-support.h opensync-xml-contact.h
+
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@
+
+formats_LTLIBRARIES = xml-vcard.la xml-vcal.la xml-evolution.la xml-vnote.la xml-kde.la xmldoc.la
+
+lib_LTLIBRARIES = libopensync-xml.la
+
+xml_vcard_la_SOURCES = xml-vcard.c vformat.c
+xml_vcard_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_vcard_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+
+xml_vcal_la_SOURCES = xml-vcal.c vformat.c vcalical.c
+xml_vcal_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_vcal_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+
+xml_vnote_la_SOURCES = xml-vnote.c vformat.c
+xml_vnote_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_vnote_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+
+xml_evolution_la_SOURCES = xml-evolution.c vformat.c
+xml_evolution_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_evolution_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+
+xml_kde_la_SOURCES = xml-kde.c vformat.c
+xml_kde_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_kde_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+
+xmldoc_la_SOURCES = xmldoc.c
+xmldoc_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xmldoc_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+
+libopensync_xml_la_SOURCES = xml-support.c
+libopensync_xml_la_LDFLAGS = @GCOV_LDFLAGS@
+libopensync_xml_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/Makefile.in b/debian/opensync/opensync-0.22/formats/vformats-xml/Makefile.in
new file mode 100644
index 00000000..7ebdba9c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/Makefile.in
@@ -0,0 +1,637 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = formats/vformats-xml
+DIST_COMMON = $(opensyncheader_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+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)$(formatsdir)" "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(opensyncheaderdir)"
+formatsLTLIBRARIES_INSTALL = $(INSTALL)
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(formats_LTLIBRARIES) $(lib_LTLIBRARIES)
+libopensync_xml_la_DEPENDENCIES =
+am_libopensync_xml_la_OBJECTS = xml-support.lo
+libopensync_xml_la_OBJECTS = $(am_libopensync_xml_la_OBJECTS)
+xml_evolution_la_DEPENDENCIES = libopensync-xml.la
+am_xml_evolution_la_OBJECTS = xml-evolution.lo vformat.lo
+xml_evolution_la_OBJECTS = $(am_xml_evolution_la_OBJECTS)
+xml_kde_la_DEPENDENCIES = libopensync-xml.la
+am_xml_kde_la_OBJECTS = xml-kde.lo vformat.lo
+xml_kde_la_OBJECTS = $(am_xml_kde_la_OBJECTS)
+xml_vcal_la_DEPENDENCIES = libopensync-xml.la
+am_xml_vcal_la_OBJECTS = xml-vcal.lo vformat.lo vcalical.lo
+xml_vcal_la_OBJECTS = $(am_xml_vcal_la_OBJECTS)
+xml_vcard_la_DEPENDENCIES = libopensync-xml.la
+am_xml_vcard_la_OBJECTS = xml-vcard.lo vformat.lo
+xml_vcard_la_OBJECTS = $(am_xml_vcard_la_OBJECTS)
+xml_vnote_la_DEPENDENCIES = libopensync-xml.la
+am_xml_vnote_la_OBJECTS = xml-vnote.lo vformat.lo
+xml_vnote_la_OBJECTS = $(am_xml_vnote_la_OBJECTS)
+xmldoc_la_DEPENDENCIES = libopensync-xml.la
+am_xmldoc_la_OBJECTS = xmldoc.lo
+xmldoc_la_OBJECTS = $(am_xmldoc_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libopensync_xml_la_SOURCES) $(xml_evolution_la_SOURCES) \
+ $(xml_kde_la_SOURCES) $(xml_vcal_la_SOURCES) \
+ $(xml_vcard_la_SOURCES) $(xml_vnote_la_SOURCES) \
+ $(xmldoc_la_SOURCES)
+DIST_SOURCES = $(libopensync_xml_la_SOURCES) \
+ $(xml_evolution_la_SOURCES) $(xml_kde_la_SOURCES) \
+ $(xml_vcal_la_SOURCES) $(xml_vcard_la_SOURCES) \
+ $(xml_vnote_la_SOURCES) $(xmldoc_la_SOURCES)
+opensyncheaderHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(opensyncheader_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = -Werror -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\" -Wall @XML_CFLAGS@ @GCOV_CFLAGS@
+formatsdir = @OPENSYNC_FORMATSDIR@
+opensyncheaderdir = @OPENSYNC_HEADERDIR@
+EXTRA_DIST = \
+ vformat.h \
+ xml-support.h \
+ vcalical.h \
+ xml-vcard.h \
+ xml-vcal.h \
+ xml-vnote.h
+
+opensyncheader_HEADERS = xml-support.h opensync-xml-contact.h
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@
+formats_LTLIBRARIES = xml-vcard.la xml-vcal.la xml-evolution.la xml-vnote.la xml-kde.la xmldoc.la
+lib_LTLIBRARIES = libopensync-xml.la
+xml_vcard_la_SOURCES = xml-vcard.c vformat.c
+xml_vcard_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_vcard_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+xml_vcal_la_SOURCES = xml-vcal.c vformat.c vcalical.c
+xml_vcal_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_vcal_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+xml_vnote_la_SOURCES = xml-vnote.c vformat.c
+xml_vnote_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_vnote_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+xml_evolution_la_SOURCES = xml-evolution.c vformat.c
+xml_evolution_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_evolution_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+xml_kde_la_SOURCES = xml-kde.c vformat.c
+xml_kde_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xml_kde_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+xmldoc_la_SOURCES = xmldoc.c
+xmldoc_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+xmldoc_la_LIBADD = @PACKAGE_LIBS@ @LIBS@ libopensync-xml.la
+libopensync_xml_la_SOURCES = xml-support.c
+libopensync_xml_la_LDFLAGS = @GCOV_LDFLAGS@
+libopensync_xml_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign formats/vformats-xml/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign formats/vformats-xml/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-formatsLTLIBRARIES: $(formats_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(formatsdir)" || $(mkdir_p) "$(DESTDIR)$(formatsdir)"
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(formatsdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(formatsdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-formatsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(formatsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(formatsdir)/$$p"; \
+ done
+
+clean-formatsLTLIBRARIES:
+ -test -z "$(formats_LTLIBRARIES)" || rm -f $(formats_LTLIBRARIES)
+ @list='$(formats_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
+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) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --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
+libopensync-xml.la: $(libopensync_xml_la_OBJECTS) $(libopensync_xml_la_DEPENDENCIES)
+ $(LINK) -rpath $(libdir) $(libopensync_xml_la_LDFLAGS) $(libopensync_xml_la_OBJECTS) $(libopensync_xml_la_LIBADD) $(LIBS)
+xml-evolution.la: $(xml_evolution_la_OBJECTS) $(xml_evolution_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(xml_evolution_la_LDFLAGS) $(xml_evolution_la_OBJECTS) $(xml_evolution_la_LIBADD) $(LIBS)
+xml-kde.la: $(xml_kde_la_OBJECTS) $(xml_kde_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(xml_kde_la_LDFLAGS) $(xml_kde_la_OBJECTS) $(xml_kde_la_LIBADD) $(LIBS)
+xml-vcal.la: $(xml_vcal_la_OBJECTS) $(xml_vcal_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(xml_vcal_la_LDFLAGS) $(xml_vcal_la_OBJECTS) $(xml_vcal_la_LIBADD) $(LIBS)
+xml-vcard.la: $(xml_vcard_la_OBJECTS) $(xml_vcard_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(xml_vcard_la_LDFLAGS) $(xml_vcard_la_OBJECTS) $(xml_vcard_la_LIBADD) $(LIBS)
+xml-vnote.la: $(xml_vnote_la_OBJECTS) $(xml_vnote_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(xml_vnote_la_LDFLAGS) $(xml_vnote_la_OBJECTS) $(xml_vnote_la_LIBADD) $(LIBS)
+xmldoc.la: $(xmldoc_la_OBJECTS) $(xmldoc_la_DEPENDENCIES)
+ $(LINK) -rpath $(formatsdir) $(xmldoc_la_LDFLAGS) $(xmldoc_la_OBJECTS) $(xmldoc_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcalical.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vformat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-evolution.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-kde.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-support.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-vcal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-vcard.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml-vnote.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmldoc.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-opensyncheaderHEADERS: $(opensyncheader_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(opensyncheaderdir)" || $(mkdir_p) "$(DESTDIR)$(opensyncheaderdir)"
+ @list='$(opensyncheader_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(opensyncheaderHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(opensyncheaderdir)/$$f'"; \
+ $(opensyncheaderHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(opensyncheaderdir)/$$f"; \
+ done
+
+uninstall-opensyncheaderHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(opensyncheader_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(opensyncheaderdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(opensyncheaderdir)/$$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; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(opensyncheaderdir)"; 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-formatsLTLIBRARIES 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-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-formatsLTLIBRARIES \
+ install-opensyncheaderHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-formatsLTLIBRARIES uninstall-info-am \
+ uninstall-libLTLIBRARIES uninstall-opensyncheaderHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
+ clean-formatsLTLIBRARIES 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-exec install-exec-am \
+ install-formatsLTLIBRARIES install-info install-info-am \
+ install-libLTLIBRARIES install-man \
+ install-opensyncheaderHEADERS 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-formatsLTLIBRARIES \
+ uninstall-info-am uninstall-libLTLIBRARIES \
+ uninstall-opensyncheaderHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/opensync-xml-contact.h b/debian/opensync/opensync-0.22/formats/vformats-xml/opensync-xml-contact.h
new file mode 100644
index 00000000..292310a2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/opensync-xml-contact.h
@@ -0,0 +1,91 @@
+#ifndef HAVE_OPENSYNC_XML_CONTACT_H
+#define HAVE_OPENSYNC_XML_CONTACT_H
+
+/*
+ * Use the constants in this header if you are going to convert
+ * between "xml-contact" and another format.
+ *
+ * See xml-vcard.c for an example.
+ */
+
+
+/* What this is */
+#define XML_CONTACT_ROOT "contact"
+
+/* Parameters */
+#define XML_CONTACT_TYPE "Type"
+
+/* Values for XML_CONTACT_TYPE */
+#define XML_CONTACT_BULLETIN_BOARD "BBS"
+#define XML_CONTACT_CAR "Car"
+#define XML_CONTACT_CELLULAR "Cell"
+#define XML_CONTACT_DOMESTIC "Domestic"
+#define XML_CONTACT_FAX "Fax"
+#define XML_CONTACT_HOME "Home"
+#define XML_CONTACT_INTERNATIONAL "International"
+#define XML_CONTACT_INTERNET "Internet"
+#define XML_CONTACT_ISDN "ISDN"
+#define XML_CONTACT_MESSAGE "Msg"
+#define XML_CONTACT_MODEM "Modem"
+#define XML_CONTACT_PAGER "Pager"
+#define XML_CONTACT_PARCEL "Parcel"
+#define XML_CONTACT_PGP "PGP"
+#define XML_CONTACT_POSTAL "Postal"
+#define XML_CONTACT_PREF "Pref"
+#define XML_CONTACT_VIDEO "Video"
+#define XML_CONTACT_VOICE "Voice"
+#define XML_CONTACT_WORK "Work"
+#define XML_CONTACT_X509 "X509"
+
+/* Lots of properties */
+#define XML_CONTACT_ADDITIONAL "Additional"
+#define XML_CONTACT_ADDRESS "Address"
+#define XML_CONTACT_ADDRESS_LABEL "AddressLabel"
+#define XML_CONTACT_BIRTHDAY "Birthday"
+#define XML_CONTACT_CATEGORIES "Categories"
+#define XML_CONTACT_CITY "City"
+#define XML_CONTACT_CLASS "Class"
+#define XML_CONTACT_COUNTRY "Country"
+#define XML_CONTACT_EMAIL "EMail"
+#define XML_CONTACT_EXTENDED_ADDRESS "ExtendedAddress"
+#define XML_CONTACT_FILE_AS "FileAs"
+#define XML_CONTACT_FIRST_NAME "FirstName"
+#define XML_CONTACT_FULL_NAME "FullName"
+#define XML_CONTACT_KEY "Key"
+#define XML_CONTACT_LAST_NAME "LastName"
+#define XML_CONTACT_LOCATION "Location"
+#define XML_CONTACT_LOGO "Logo"
+#define XML_CONTACT_MAILER "Mailer"
+#define XML_CONTACT_NAME "Name"
+#define XML_CONTACT_NICKNAME "Nickname"
+#define XML_CONTACT_NOTE "Note"
+#define XML_CONTACT_ORGANIZATION "Organization"
+#define XML_CONTACT_PHOTO "Photo"
+#define XML_CONTACT_POSTAL_BOX "PostalBox"
+#define XML_CONTACT_POSTAL_CODE "PostalCode"
+#define XML_CONTACT_PREFIX "Prefix"
+#define XML_CONTACT_REGION "Region"
+#define XML_CONTACT_REVISION "Revision"
+#define XML_CONTACT_ROLE "Role"
+#define XML_CONTACT_SOUND "Sound"
+#define XML_CONTACT_STREET "Street"
+#define XML_CONTACT_SUFFIX "Suffix"
+#define XML_CONTACT_TELEPHONE "Telephone"
+#define XML_CONTACT_TIMEZONE "Timezone"
+#define XML_CONTACT_TITLE "Title"
+#define XML_CONTACT_UID "Uid"
+#define XML_CONTACT_UNIT "Unit"
+#define XML_CONTACT_URL "Url"
+#define XML_CONTACT_WANTS_HTML "WantsHtml"
+
+#define XML_CONTACT_CONTENT "Content"
+
+/* Unknown parameter */
+#define XML_CONTACT_UNKNOWN_PARAM "UnknownParam"
+#define XML_CONTACT_PARAMETER_NAME "ParamName"
+
+/* Unknown node */
+#define XML_CONTACT_UNKNOWN_NODE "UnknownNode"
+#define XML_CONTACT_NODE_NAME "NodeName"
+
+#endif
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.c b/debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.c
new file mode 100644
index 00000000..54a05946
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.c
@@ -0,0 +1,472 @@
+/*
+ * vcalical - An vcal/ical converter
+ * Copyright (C) 2006 Daniel Gollub <dgollub@suse.de>
+ * Copyright (C) 2006 Christopher Stender <cstender@suse.de>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+#include "vformat.h"
+#include "xml-vcal.h"
+#include <glib.h>
+
+
+/* ical 2 vcal */
+#define ATTR_COUNT (sizeof(rrule_attr)/sizeof(rrule_attr[0]))
+#define PARAM_COUNT (sizeof(rrule_param)/sizeof(rrule_param[0]))
+
+enum {
+ FIELD_FREQ,
+ FIELD_INTERVAL,
+ FIELD_FREQMOD,
+ FIELD_FREQMOD2,
+ FIELD_COUNTUNTIL,
+ NUM_OF_FIELDS
+};
+
+enum {
+ TYPE_ATTR,
+ TYPE_PARAM
+};
+
+struct _rrule_attr {
+ const char *ical;
+ const char *vcal;
+ int field;
+} rrule_attr[] = {
+ { "BYDAY", " ", FIELD_FREQMOD },
+ { "BYMONTH", " ", FIELD_FREQMOD },
+ { "BYMONTHDAY", " ", FIELD_FREQMOD },
+ { "BYYEARDAY", " ", FIELD_FREQMOD },
+ { "COUNT", " #", FIELD_COUNTUNTIL },
+ { "FREQ", "", FIELD_FREQ },
+ { "INTERVAL", "", FIELD_INTERVAL },
+ { "UNTIL", " ", FIELD_COUNTUNTIL }
+};
+
+struct _rrule_param {
+ const char *ical;
+ const char *vcal;
+} rrule_param[] = {
+ { "DAILY", "D" },
+ { "MONTHLY", "M" },
+ { "WEEKLY", "W" },
+ { "YEARLY", "YM" }
+};
+
+static int comp_attr(const void *m1, const void *m2) {
+ struct _rrule_attr *mi1 = (struct _rrule_attr *) m1;
+ struct _rrule_attr *mi2 = (struct _rrule_attr *) m2;
+ return strcmp(mi1->ical, mi2->ical);
+}
+static int comp_param(const void *m1, const void *m2) {
+ struct _rrule_param *mi1 = (struct _rrule_param *) m1;
+ struct _rrule_param *mi2 = (struct _rrule_param *) m2;
+ return strcmp(mi1->ical, mi2->ical);
+}
+
+struct _rrule_attr *_parse_rrule_attr(const char *ical) {
+
+ struct _rrule_attr key, *res;
+ key.ical = ical;
+
+ res = bsearch(&key, rrule_attr, ATTR_COUNT, sizeof(struct _rrule_attr), comp_attr);
+
+ if (!res)
+ return NULL;
+
+ return res;
+}
+
+const char *_parse_rrule_param(const char *ical) {
+
+ struct _rrule_param key, *res;
+ const char *ret = NULL;
+
+ key.ical = ical;
+
+ res = bsearch(&key, rrule_param, PARAM_COUNT, sizeof(struct _rrule_param), comp_param);
+
+ if (!res)
+ ret = ical;
+ else
+ ret = res->vcal;
+
+ return ret;
+}
+
+char *_blank_field(char *field) {
+ if (field)
+ g_free(field);
+
+ return g_strdup("");
+}
+
+
+
+char *_adapt_param(const char *param) {
+
+ int i, len;
+ GString *ret = g_string_new("");
+
+ len = strlen(param);
+
+ for (i=0; i < len; i++) {
+ switch(param[i]) {
+ // evil sperators like ','
+ case ',':
+ ret = g_string_append_c(ret, ' ');
+ break;
+ default:
+ ret = g_string_append_c(ret,param[i]);
+ }
+ }
+
+ return g_string_free(ret, FALSE);
+}
+
+void _vcal_hook(char **icalattrs, char **vcalattrs, char **icalparams, char **vcalparams) {
+
+ if (!strcmp(icalparams[FIELD_FREQ], "MONTHLY")) {
+ // Workround for RRULE:MP1 1+ SU 20071003T193000
+ if(!strcmp(icalattrs[FIELD_FREQMOD], "BYDAY")) {
+ char sign = '+';
+ char wday[3];
+ int nthday;
+
+ g_free(vcalparams[FIELD_FREQ]);
+ vcalparams[FIELD_FREQ] = g_strdup("MP");
+
+ g_free(vcalparams[FIELD_FREQMOD]);
+
+ if (strlen(icalparams[FIELD_FREQMOD]) > 3)
+ sscanf(icalparams[FIELD_FREQMOD], "%c%d%c%c", &sign, &nthday, &wday[0], &wday[1]);
+ else
+ sscanf(icalparams[FIELD_FREQMOD], "%d%c%c", &nthday, &wday[0], &wday[1]);
+
+ wday[2] = '\0';
+
+ vcalparams[FIELD_FREQMOD] = g_strdup_printf("%d%c %s", nthday, sign, wday);
+
+ // Workaround for RRULE:MD1 .......
+// } else if (!strcmp(icalattrs[FIELD_FREQMOD], "BYMONTHDAY")) {
+ } else {
+ g_free(vcalparams[FIELD_FREQ]);
+ vcalparams[FIELD_FREQ] = g_strdup("MD");
+ }
+ }
+
+ if (!strcmp(icalparams[FIELD_FREQ], "YEARLY") && icalparams[FIELD_FREQMOD]) {
+ if (!strcmp(icalattrs[FIELD_FREQMOD], "BYYEARDAY")) {
+ g_free(vcalparams[FIELD_FREQ]);
+ vcalparams[FIELD_FREQ] = g_strdup("YD");
+ } else if ((!strcmp(icalattrs[FIELD_FREQMOD], "BYMONTH") && !strcmp(icalattrs[FIELD_FREQMOD2], "BYMONTHDAY"))
+ || (!strcmp(icalattrs[FIELD_FREQMOD2], "BYMONTH") && !strcmp(icalattrs[FIELD_FREQMOD], "BYMONTHDAY"))) {
+
+ g_free(vcalparams[FIELD_FREQ]);
+ vcalparams[FIELD_FREQ] = g_strdup("YM");
+
+ vcalattrs[FIELD_FREQMOD] = _blank_field(vcalattrs[FIELD_FREQMOD]);
+ vcalattrs[FIELD_FREQMOD2] = _blank_field(vcalattrs[FIELD_FREQMOD2]);
+ vcalparams[FIELD_FREQMOD] = _blank_field(vcalparams[FIELD_FREQMOD]);
+ vcalparams[FIELD_FREQMOD2] = _blank_field(vcalparams[FIELD_FREQMOD2]);
+ }
+ }
+
+ // Set INTERVAL to 1 if nothing is set and BYMONTHDAY is not used
+ if (icalparams[FIELD_INTERVAL] == NULL) {
+ vcalparams[FIELD_INTERVAL] = g_strdup("1");
+ }
+}
+
+char *conv_ical2vcal_rrule(const char *ical) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, ical);
+
+ int i;
+ const char *pos, *prev;
+ size_t len;
+ char *icalattrs[NUM_OF_FIELDS] = { NULL };
+ char *vcalattrs[NUM_OF_FIELDS] = { NULL };
+ char *icalparams[NUM_OF_FIELDS] = { NULL };
+ char *vcalparams[NUM_OF_FIELDS] = { NULL };
+ struct _rrule_attr *field_attr;
+ const char *tmp = NULL;
+
+ GString *vcal10 = g_string_new("");
+
+ pos = prev = ical;
+
+ // FREQ=WEEKLY;INTERVAL=1;BYDAY=TU,FR;UNTIL=20060901T182200Z
+ // W1 TU FR 20060901T182200Z
+ // *FREQ**INTERVAL* *FREQ-MOD* *COUNT/UNTIL*
+
+ while ((pos = strstr(pos, "="))) {
+
+ GString *attr = g_string_new("");
+ GString *param = g_string_new("");
+
+ len = pos - prev;
+
+ // not equal is required ... ignoring =
+ for (i=0; i < len; i++)
+ attr = g_string_append_c(attr, prev[i]);
+
+ pos++;
+ prev = pos;
+
+ pos = strstr(pos, ";");
+ if (pos == NULL)
+ pos = ical + strlen(ical);
+
+ len = pos - prev;
+ for (i=0; i < len; i++)
+ param = g_string_append_c(param, prev[i]);
+
+ field_attr = _parse_rrule_attr(attr->str);
+ if (field_attr == NULL)
+ goto next;
+
+ if (icalattrs[field_attr->field] && field_attr->field == FIELD_FREQMOD)
+ field_attr->field += 1;
+
+ vcalattrs[field_attr->field] = g_strdup(field_attr->vcal);
+ icalattrs[field_attr->field] = g_strdup(attr->str);
+
+ tmp = _parse_rrule_param(param->str);
+ if (tmp)
+ vcalparams[field_attr->field] = _adapt_param(tmp);
+ else
+ vcalparams[field_attr->field] = g_strdup("");
+ icalparams[field_attr->field] = g_strdup(param->str);
+
+ g_string_free(attr, TRUE);
+ g_string_free(param, TRUE);
+next:
+
+ prev = pos + 1;
+
+ }
+
+ for (i=0; i < NUM_OF_FIELDS; i++) {
+ if (!vcalparams[i])
+ vcalparams[i] = g_strdup("");
+ if (!vcalattrs[i])
+ vcalattrs[i] = g_strdup("");
+ if (!vcalparams[i])
+ vcalparams[i] = g_strdup("");
+ if (!icalattrs[i])
+ icalattrs[i] = g_strdup("");
+ }
+
+ _vcal_hook(icalattrs, vcalattrs, icalparams, vcalparams);
+
+ for (i=0; i < NUM_OF_FIELDS; i++) {
+ // If no end is set append #0 - recurrence for ever
+ if (i == FIELD_COUNTUNTIL && strlen(vcalparams[i]) == 0)
+ vcalparams[i] = g_strdup(" #0");
+
+ if (vcalattrs[i]) {
+ vcal10 = g_string_append(vcal10, vcalattrs[i]);
+// printf("(%i) \"%s\"\n", i, vcalattrs[i]);
+ g_free(vcalattrs[i]);
+ }
+
+ if (vcalparams[i]) {
+ vcal10 = g_string_append(vcal10, vcalparams[i]);
+// printf("(#%i) \"%s\"\n", i, vcalparams[i]);
+ g_free(vcalparams[i]);
+ }
+
+ if (icalattrs[i])
+ g_free(icalattrs[i]);
+
+ if (icalparams[i])
+ g_free(icalparams[i]);
+
+ }
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, vcal10->str);
+ return g_string_free(vcal10, FALSE);
+}
+
+/* vcal 2 ical */
+GList *conv_vcal2ical_rrule(const char *vcal) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, vcal);
+
+ gchar** blocks = g_strsplit(vcal, " ", 256);
+ int offset = 0;
+
+ int frequency_state = 0;
+ char *frequency = NULL;
+ char *frequency_block = NULL;
+
+ int interval;
+
+ int duration_number = -1;
+ char *duration_block;
+
+ char* freq_mod = NULL;
+
+
+ /* count blocks */
+ int counter;
+ for(counter=0; blocks[counter]; counter++);
+
+ frequency_block = blocks[0];
+ duration_block = blocks[counter-1];
+
+
+ /* get frequency: only D(1), W(2), MP(3), MD(4), YD(5) and YM(6) is allowed */
+ switch (*frequency_block++) {
+ case 'D': frequency_state = 1; frequency = "DAILY"; break;
+ case 'W': frequency_state = 2; frequency = "WEEKLY"; break;
+ case 'M': frequency_state = 0;
+ switch (*frequency_block++) {
+ case 'P': frequency_state = 3; frequency = "MONTHLY"; break;
+ case 'D': frequency_state = 4; frequency = "MONTHLY"; break;
+ default:
+ osync_trace(TRACE_INTERNAL, "invalid frequency M<X>");
+ }
+ break;
+ case 'Y': frequency_state = 0;
+ switch (*frequency_block++) {
+ case 'D': frequency_state = 5; frequency = "YEARLY"; break;
+ case 'M': frequency_state = 6; frequency = "YEARLY"; break;
+ default:
+ osync_trace(TRACE_INTERNAL, "invalid frequency Y<X>");
+ }
+ break;
+ default:
+ osync_trace(TRACE_INTERNAL, "invalid or missing frequency");
+ }
+
+
+ /* get interval (integer) */
+ char* e;
+ interval = strtol(frequency_block, &e, 10);
+ if (e == frequency_block) {
+ osync_trace(TRACE_INTERNAL, "interval is missing.");
+ }
+ if (*e != 0) {
+ osync_trace(TRACE_INTERNAL, "interval is to long.");
+ }
+
+
+ /* get frequency modifier if there are more than two blocks */
+ if (counter > 2) {
+
+ GString *fm_buffer = g_string_new("");
+ int i;
+
+ /* for each modifier do... */
+ for(i=1; i < counter-1; i++) {
+
+ int count;
+ char sign;
+
+ if(fm_buffer->len > 0)
+ g_string_append(fm_buffer, ",");
+
+ /* check frequency modifier */
+ if (sscanf(blocks[i], "%d%c" , &count, &sign) == 2) {
+
+ /* we need to convert $COUNT- to -$COUNT -> RFC2445 */
+ if (sign == '-')
+ count = -count;
+
+ g_string_append_printf(fm_buffer, "%d", count);
+
+ if (i < counter-2 && !sscanf(blocks[i+1], "%d", &count)) {
+
+ g_string_append_printf(fm_buffer, " %s", blocks[i+1]);
+ i++;
+
+ }
+
+ } else {
+
+ /* e.g. Day or 'LD' (Last day) */
+ g_string_append(fm_buffer, blocks[i]);
+
+ }
+ }
+
+ freq_mod = fm_buffer->str;
+ g_string_free(fm_buffer, FALSE);
+ }
+
+ char *until = NULL;
+
+ /* get duration (number OR timestamp, but nothing is required) */
+ if (sscanf(duration_block, "#%d", &duration_number) < 1) {
+ if (!osync_time_isdate(duration_block)) {
+
+ /* Check if this duration_block is a localtime timestamp.
+ * If it is not UTC change the offset from 0 to the system UTC offset.
+ * vcal doesn't store any TZ information. This means the device have to be
+ * in the same Timezone as the host.
+ */
+ if (!osync_time_isutc(duration_block)) {
+ struct tm *ttm = osync_time_vtime2tm(duration_block);
+ offset = osync_time_timezone_diff(ttm);
+ g_free(ttm);
+ }
+
+ until = osync_time_vtime2utc(duration_block, offset);
+ } else {
+ until = g_strdup(duration_block);
+ }
+ }
+
+ g_strfreev(blocks);
+
+
+ /* generate new RRULE: D(1), W(2), MP(3), MD(4), YD(5) and YM(6) */
+ GList *new_rrule = NULL;
+
+ new_rrule = g_list_append(new_rrule, g_strdup_printf("FREQ=%s", frequency));
+ new_rrule = g_list_append(new_rrule, g_strdup_printf("INTERVAL=%d", interval));
+
+ if (duration_number > 0)
+ new_rrule = g_list_append(new_rrule, g_strdup_printf("COUNT=%d", duration_number));
+
+ if(freq_mod != NULL) {
+ switch(frequency_state) {
+ case 2: new_rrule = g_list_append(new_rrule, g_strdup_printf("BYDAY=%s", freq_mod)); break;
+ case 3: new_rrule = g_list_append(new_rrule, g_strdup_printf("BYDAY=%s", freq_mod)); break;
+ case 4: new_rrule = g_list_append(new_rrule, g_strdup_printf("BYMONTHDAY=%s", freq_mod)); break;
+ case 5: new_rrule = g_list_append(new_rrule, g_strdup_printf("BYYEARDAY=%s", freq_mod)); break;
+ case 6: new_rrule = g_list_append(new_rrule, g_strdup_printf("BYMONTH=%s", freq_mod)); break;
+ default:
+ break;
+ }
+ }
+
+ if (until != NULL) {
+ new_rrule = g_list_append(new_rrule, g_strdup_printf("UNTIL=%s", until));
+ g_free(until);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+
+ return new_rrule;
+}
+
+
+
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.h b/debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.h
new file mode 100644
index 00000000..7d87cb48
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/vcalical.h
@@ -0,0 +1,30 @@
+/*
+ * vcalical - An vcal/ical converter
+ * Copyright (C) 2006 Daniel Gollub <dgollub@suse.de>
+ * Copyright (C) 2006 Christopher Stender <cstender@suse.de>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+#include "vformat.h"
+#include "xml-vcal.h"
+#include <glib.h>
+
+char *conv_ical2vcal_rrule(const char *ical);
+GList *conv_vcal2ical_rrule(const char *vcal);
+GList *conv_vcal2ical_rrule(const char *vcal);
+
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/vformat.c b/debian/opensync/opensync-0.22/formats/vformats-xml/vformat.c
new file mode 100644
index 00000000..547eef74
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/vformat.c
@@ -0,0 +1,2005 @@
+/*
+ * Copyright (C) 2003 Ximian, Inc.
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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
+ *
+ * Author: Chris Toshok (toshok@ximian.com)
+ * Author: Armin Bauer (armin.bauer@opensync.org)
+ *
+ */
+
+#include "vformat.h"
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <iconv.h>
+#include <opensync/opensync.h>
+
+static size_t base64_encode_step(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save);
+static size_t base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save);
+size_t base64_decode_simple (char *data, size_t len);
+char *base64_encode_simple (const char *data, size_t len);
+
+size_t quoted_decode_simple (char *data, size_t len);
+char *quoted_encode_simple (const unsigned char *string, int len);
+
+
+/**
+ * _helper_is_base64 is helper function to check i a string is "b" or "base64"
+ * @param check_string string that should be compared with "b" or "base64"
+ * @return 0 if check_string is not base64 and 1 if it is
+ */
+static int _helper_is_base64(const char *check_string)
+{
+ if(!g_ascii_strcasecmp ((char *) check_string, "BASE64") ||
+ !g_ascii_strcasecmp ((char *) check_string, "b") )
+ return (1);
+ return (0);
+}
+
+time_t vformat_time_to_unix(const char *inptime)
+{
+ char *date = NULL;
+ char *time = NULL;
+ char *ftime = NULL;
+ if ((ftime = g_strrstr(inptime, "T"))) {
+
+ date = g_strndup(inptime, ftime - inptime);
+ if (ftime[3] == ':')
+ time = g_strndup(ftime + 1, 8);
+ else
+ time = g_strndup(ftime + 1, 6);
+ } else {
+ date = g_strdup(inptime);
+ }
+
+ struct tm btime;
+ memset(&btime, 0, sizeof(struct tm));
+
+ if (strlen(date) == 10) {
+ btime.tm_year = date[0] * 1000 + date[1] * 100 + date[2] * 10 + date[3] - '0' * 1111 - 1900;
+ btime.tm_mon = date[5] * 10 + date[6] - '0' * 11 - 1;
+ btime.tm_mday = date[8] * 10 + date[9] - '0' * 11;
+ } else {
+ btime.tm_year = date[0] * 1000 + date[1] * 100 + date[2] * 10 + date[3] - '0' * 1111- 1900;
+ btime.tm_mon = date[4] * 10 + date[5] - '0' * 11 - 1;
+ btime.tm_mday = date[6] * 10 + date[7] - '0' * 11;
+ }
+
+ if (time && strlen(time) == 8) {
+ //Time
+ btime.tm_hour = time[0] * 10 + time[1] - '0' * 11;
+ btime.tm_min = time[3] * 10 + time[4] - '0' * 11;
+ btime.tm_sec = time[6] * 10 + time[7] - '0' * 11;
+ } else if (time && strlen(time) == 6) {
+ btime.tm_hour = time[0] * 10 + time[1] - '0' * 11;
+ btime.tm_min = time[2] * 10 + time[3] - '0' * 11;
+ btime.tm_sec = time[4] * 10 + time[5] - '0' * 11;
+ }
+
+ time_t utime = mktime(&btime);
+ return utime;
+}
+
+static char *_fold_lines (char *buf)
+{
+ GString *str = g_string_new ("");
+ GString *line = g_string_new ("");
+ char *p = buf;
+ char *next, *next2, *q;
+ gboolean newline = TRUE;
+ gboolean quotedprintable = FALSE;
+
+ /*
+ * We're pretty liberal with line folding here. We handle
+ * lines folded with \r\n<WS>, \n\r<WS>, \n<WS>, =\r\n and =\n\r.
+ * We also turn single \r's and \n's not followed by <WS> into \r\n's.
+ */
+
+ while (*p) {
+
+ /* search new lines for quoted printable encoding */
+ if (newline) {
+ for (q=p; *q != '\n' && *q != '\0'; q++)
+ line = g_string_append_unichar (line, g_utf8_get_char (q));
+
+ if (strstr(line->str, "ENCODING=QUOTED-PRINTABLE"))
+ quotedprintable = TRUE;
+
+ g_string_free(line, TRUE);
+ line = g_string_new ("");
+
+ newline = FALSE;
+ }
+
+
+ if ((quotedprintable && *p == '=') || *p == '\r' || *p == '\n') {
+ next = g_utf8_next_char (p);
+ if (*next == '\n' || *next == '\r') {
+ next2 = g_utf8_next_char (next);
+ if (*next2 == '\n' || *next2 == '\r' || *next2 == ' ' || *next2 == '\t') {
+ p = g_utf8_next_char (next2);
+ }
+ else {
+ str = g_string_append (str, CRLF);
+ p = g_utf8_next_char (next);
+ newline = TRUE;
+ quotedprintable = FALSE;
+ }
+ }
+ else if (*p == '=') {
+ str = g_string_append_unichar (str, g_utf8_get_char (p));
+ p = g_utf8_next_char (p);
+ }
+ else if (*next == ' ' || *next == '\t') {
+ p = g_utf8_next_char (next);
+ }
+ else {
+ str = g_string_append (str, CRLF);
+ p = g_utf8_next_char (p);
+ newline = TRUE;
+ quotedprintable = FALSE;
+ }
+ }
+ else {
+ str = g_string_append_unichar (str, g_utf8_get_char (p));
+ p = g_utf8_next_char (p);
+ }
+ }
+
+ g_free (buf);
+ g_string_free(line, TRUE);
+
+ return g_string_free (str, FALSE);
+}
+
+/* skip forward until we hit the CRLF, or \0 */
+static void _skip_to_next_line (char **p)
+{
+ char *lp;
+ lp = *p;
+
+ while (*lp != '\r' && *lp != '\0')
+ lp = g_utf8_next_char (lp);
+
+ if (*lp == '\r') {
+ lp = g_utf8_next_char (lp); /* \n */
+ lp = g_utf8_next_char (lp); /* start of the next line */
+ }
+
+ *p = lp;
+}
+
+/* skip forward until we hit a character in @s, CRLF, or \0. leave *p
+ pointing at the character that causes us to stop */
+static void _skip_until (char **p, char *s)
+{
+ char *lp;
+
+ lp = *p;
+
+ while (*lp != '\r' && *lp != '\0') {
+ gboolean s_matches = FALSE;
+ char *ls;
+ for (ls = s; *ls; ls = g_utf8_next_char (ls)) {
+ if (g_utf8_get_char (ls) == g_utf8_get_char (lp)) {
+ s_matches = TRUE;
+ break;
+ }
+ }
+
+ if (s_matches)
+ break;
+ lp++;
+ }
+
+ *p = lp;
+}
+
+static void _read_attribute_value_add (VFormatAttribute *attr, GString *str, GString *charset)
+{
+ /* don't convert empty strings */
+ if (str->len == 0) {
+ vformat_attribute_add_value(attr, str->str);
+ return;
+ }
+
+ char *inbuf, *outbuf, *p;
+ size_t inbytesleft, outbytesleft;
+
+ inbuf = str->str;
+ p = outbuf = malloc(str->len*2);
+ inbytesleft = str->len;
+ outbytesleft = str->len*2;
+
+ iconv_t cd;
+
+ /* if a CHARSET was given, let's try to convert inbuf to UTF-8 */
+ if (charset) {
+
+ cd = iconv_open("UTF-8", charset->str);
+#ifdef SOLARIS
+ if (iconv(cd, (const char**)&inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) {
+#else
+ if (iconv(cd, &inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) {
+#endif
+ *p = 0;
+ vformat_attribute_add_value(attr, outbuf);
+
+ } else {
+
+ /* hmm, should not happen */
+ vformat_attribute_add_value(attr, str->str);
+
+ }
+
+ iconv_close(cd);
+
+ } else {
+
+ /* no CHARSET was given, if inbuf is already UTF-8 we add str->str */
+ if (g_utf8_validate (inbuf, -1, NULL)) {
+
+ vformat_attribute_add_value (attr, str->str);
+
+ } else {
+
+ /* because inbuf is not UTF-8, we think it is ISO-8859-1 */
+ cd = iconv_open("UTF-8", "ISO-8859-1");
+#ifdef SOLARIS
+ if (iconv(cd, (const char**)&inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) {
+#else
+ if (iconv(cd, &inbuf, &inbytesleft, &p, &outbytesleft) != (size_t)(-1)) {
+#endif
+ *p = 0;
+ vformat_attribute_add_value (attr, outbuf);
+
+ } else {
+
+ vformat_attribute_add_value (attr, str->str);
+
+ }
+
+ iconv_close(cd);
+
+ }
+
+ }
+
+ free(outbuf);
+
+}
+
+static void _read_attribute_value (VFormatAttribute *attr, char **p, int format_encoding, GString *charset)
+{
+ char *lp = *p;
+ GString *str;
+
+ /* read in the value */
+ str = g_string_new ("");
+ while (*lp != '\r' && *lp != '\0') {
+ if (*lp == '=' && format_encoding == VF_ENCODING_QP) {
+ char a, b, x1=0, x2=0;
+
+ if ((a = *(++lp)) == '\0') break;
+ if ((b = *(++lp)) == '\0') break;
+
+ if (isalnum(a)) {
+ if (isalnum(b)) {
+ /* e.g. ...N=C3=BCrnberg\r\n
+ * ^^^
+ */
+ x1=a;
+ x2=b;
+ }
+ else if (b == '=') {
+ /* e.g. ...N=C=\r\n
+ * ^^^
+ * 3=BCrnberg...
+ * ^
+ */
+ char *tmplp = lp;
+ if (*(++tmplp) == '\r' && *(++tmplp) == '\n' && isalnum(*(++tmplp))) {
+ x1 = a;
+ x2 = *tmplp;
+ lp = tmplp;
+ }
+ }
+ else {
+ /* append malformed input, and
+ continue parsing */
+ str = g_string_append_c(str, a);
+ str = g_string_append_c(str, b);
+ }
+ }
+ else if (a == '=') {
+ char *tmplp = lp;
+ char c, d, e;
+ c = *(++tmplp);
+ d = *(++tmplp);
+ e = *(++tmplp);
+ if (b == '\r' && c == '\n' && isalnum(d) && isalnum(e)) {
+ x1 = d;
+ x2 = e;
+ lp = tmplp;
+ }
+ else {
+ /* append malformed input, and
+ continue parsing */
+ str = g_string_append_c(str, a);
+ str = g_string_append_c(str, b);
+ }
+ }
+ else {
+ /* append malformed input, and
+ continue parsing */
+ str = g_string_append_c(str, a);
+ str = g_string_append_c(str, b);
+ }
+ if (x1 && x2) {
+ char c;
+
+ a = tolower (x1);
+ b = tolower (x2);
+
+ c = (((a>='a'?a-'a'+10:a-'0')&0x0f) << 4)
+ | ((b>='a'?b-'a'+10:b-'0')&0x0f);
+
+ str = g_string_append_c (str, c);
+ }
+ lp++;
+ x1 = x2 = 0;
+ }
+ else if (format_encoding == VF_ENCODING_BASE64) {
+ if((*lp != ' ') && (*lp != '\t') )
+ str = g_string_append_unichar (str, g_utf8_get_char (lp));
+ lp = g_utf8_next_char(lp);
+ }
+ else if (*lp == '\\') {
+ /* convert back to the non-escaped version of
+ the characters */
+ lp = g_utf8_next_char(lp);
+ if (*lp == '\0') {
+ str = g_string_append_c (str, '\\');
+ break;
+ }
+ switch (*lp) {
+ case 'n': str = g_string_append_c (str, '\n'); break;
+ case 'r': str = g_string_append_c (str, '\r'); break;
+ case ';': str = g_string_append_c (str, ';'); break;
+ case ',':
+ if (!strcmp (attr->name, "CATEGORIES")) {
+ //We need to handle categories here to work
+ //aroung a bug in evo2
+ _read_attribute_value_add (attr, str, charset);
+ g_string_assign (str, "");
+ } else
+ str = g_string_append_c (str, ',');
+ break;
+ case '\\': str = g_string_append_c (str, '\\'); break;
+ case '"': str = g_string_append_c (str, '"'); break;
+ /* \t is (incorrectly) used by kOrganizer, so handle it here */
+ case 't': str = g_string_append_c (str, '\t'); break;
+ default:
+ osync_trace(TRACE_INTERNAL, "invalid escape, passing it through. escaped char was %i", *lp);
+ str = g_string_append_c (str, '\\');
+ str = g_string_append_unichar (str, g_utf8_get_char(lp));
+ break;
+ }
+ lp = g_utf8_next_char(lp);
+ }
+ else if ((*lp == ';') ||
+ (*lp == ',' && !strcmp (attr->name, "CATEGORIES"))) {
+ _read_attribute_value_add (attr, str, charset);
+ g_string_assign (str, "");
+ lp = g_utf8_next_char(lp);
+ }
+ else {
+ str = g_string_append_unichar (str, g_utf8_get_char (lp));
+ lp = g_utf8_next_char(lp);
+ }
+ }
+ if (str) {
+ _read_attribute_value_add (attr, str, charset);
+ g_string_free (str, TRUE);
+ }
+
+ if (*lp == '\r') {
+ lp = g_utf8_next_char (lp); /* \n */
+ lp = g_utf8_next_char (lp); /* start of the next line */
+ }
+
+ *p = lp;
+}
+
+static void _read_attribute_params(VFormatAttribute *attr, char **p, int *format_encoding, GString **charset)
+{
+ char *lp = *p;
+ GString *str;
+ VFormatParam *param = NULL;
+ gboolean in_quote = FALSE;
+ str = g_string_new ("");
+
+ while (*lp != '\0') {
+ if (*lp == '"') {
+ in_quote = !in_quote;
+ lp = g_utf8_next_char (lp);
+ }
+ else if (in_quote || g_unichar_isalnum (g_utf8_get_char (lp)) || *lp == '-' || *lp == '_' || *lp == '/' || *lp == '.' || *lp == ' ') {
+ str = g_string_append_unichar (str, g_utf8_get_char (lp));
+ lp = g_utf8_next_char (lp);
+ }
+ /* accumulate until we hit the '=' or ';'. If we hit
+ * a '=' the string contains the parameter name. if
+ * we hit a ';' the string contains the parameter
+ * value and the name is either ENCODING (if value ==
+ * QUOTED-PRINTABLE) or TYPE (in any other case.)
+ */
+ else if (*lp == '=') {
+ if (str->len > 0) {
+ param = vformat_attribute_param_new (str->str);
+ g_string_assign (str, "");
+ lp = g_utf8_next_char (lp);
+ }
+ else {
+ _skip_until (&lp, ":;");
+ if (*lp == '\r') {
+ lp = g_utf8_next_char (lp); /* \n */
+ lp = g_utf8_next_char (lp); /* start of the next line */
+ break;
+ }
+ else if (*lp == ';')
+ lp = g_utf8_next_char (lp);
+ }
+ }
+ else if (*lp == ';' || *lp == ':' || *lp == ',') {
+ gboolean colon = (*lp == ':');
+ gboolean comma = (*lp == ',');
+
+ if (param) {
+ if (str->len > 0) {
+ vformat_attribute_param_add_value (param, str->str);
+ g_string_assign (str, "");
+ if (!colon)
+ lp = g_utf8_next_char (lp);
+ }
+ else {
+ /* we've got a parameter of the form:
+ * PARAM=(.*,)?[:;]
+ * so what we do depends on if there are already values
+ * for the parameter. If there are, we just finish
+ * this parameter and skip past the offending character
+ * (unless it's the ':'). If there aren't values, we free
+ * the parameter then skip past the character.
+ */
+ if (!param->values) {
+ vformat_attribute_param_free (param);
+ param = NULL;
+ if (!colon)
+ lp = g_utf8_next_char (lp);
+ }
+ }
+
+ if (param
+ && !g_ascii_strcasecmp (param->name, "encoding")) {
+ if (!g_ascii_strcasecmp (param->values->data, "quoted-printable")) {
+ *format_encoding = VF_ENCODING_QP;
+ vformat_attribute_param_free (param);
+ param = NULL;
+ } else if ( _helper_is_base64(param->values->data)) {
+ *format_encoding = VF_ENCODING_BASE64;
+// vformat_attribute_param_free (param);
+// param = NULL;
+ }
+ } else if (param && !g_ascii_strcasecmp(param->name, "charset")) {
+ *charset = g_string_new(param->values->data);
+ vformat_attribute_param_free (param);
+ param = NULL;
+ }
+ }
+ else {
+ if (str->len > 0) {
+ char *param_name;
+ if (!g_ascii_strcasecmp (str->str,
+ "quoted-printable")) {
+ param_name = "ENCODING";
+ *format_encoding = VF_ENCODING_QP;
+ }
+ /* apple's broken addressbook app outputs naked BASE64
+ parameters, which aren't even vcard 3.0 compliant. */
+ else if (!g_ascii_strcasecmp (str->str,
+ "base64")) {
+ param_name = "ENCODING";
+ g_string_assign (str, "b");
+ *format_encoding = VF_ENCODING_BASE64;
+ }
+ else {
+ param_name = "TYPE";
+ }
+
+ if (param_name) {
+ param = vformat_attribute_param_new (param_name);
+ vformat_attribute_param_add_value (param, str->str);
+ }
+ g_string_assign (str, "");
+ if (!colon)
+ lp = g_utf8_next_char (lp);
+ }
+ else {
+ /* we've got an attribute with a truly empty
+ attribute parameter. So it's of the form:
+
+ ATTR;[PARAM=value;]*;[PARAM=value;]*:
+
+ (note the extra ';')
+
+ the only thing to do here is, well.. nothing.
+ we skip over the character if it's not a colon,
+ and the rest is handled for us: We'll either
+ continue through the loop again if we hit a ';',
+ or we'll break out correct below if it was a ':' */
+ if (!colon)
+ lp = g_utf8_next_char (lp);
+ }
+ }
+ if (param && !comma) {
+ vformat_attribute_add_param (attr, param);
+ param = NULL;
+ }
+ if (colon)
+ break;
+ }
+ else {
+ osync_trace(TRACE_INTERNAL, "invalid character found in parameter spec: \"%i\" String so far: %s", lp[0], str->str);
+ g_string_assign (str, "");
+ _skip_until (&lp, ":;");
+ }
+ }
+
+ if (str)
+ g_string_free (str, TRUE);
+
+ *p = lp;
+}
+
+/* reads an entire attribute from the input buffer, leaving p pointing
+ at the start of the next line (past the \r\n) */
+static VFormatAttribute *_read_attribute (char **p)
+{
+ char *attr_group = NULL;
+ char *attr_name = NULL;
+ VFormatAttribute *attr = NULL;
+ GString *str, *charset = NULL;
+ char *lp = *p;
+
+ gboolean is_qp = FALSE;
+
+ /* first read in the group/name */
+ str = g_string_new ("");
+ while (*lp != '\r' && *lp != '\0') {
+ if (*lp == ':' || *lp == ';') {
+ if (str->len != 0) {
+ /* we've got a name, break out to the value/attribute parsing */
+ attr_name = g_string_free (str, FALSE);
+ break;
+ }
+ else {
+ /* a line of the form:
+ * (group.)?[:;]
+ *
+ * since we don't have an attribute
+ * name, skip to the end of the line
+ * and try again.
+ */
+ g_string_free (str, TRUE);
+ *p = lp;
+ _skip_to_next_line(p);
+ goto lose;
+ }
+ }
+ else if (*lp == '.') {
+ if (attr_group) {
+ osync_trace(TRACE_INTERNAL, "extra `.' in attribute specification. ignoring extra group `%s'",
+ str->str);
+ g_string_free (str, TRUE);
+ str = g_string_new ("");
+ }
+ if (str->len != 0) {
+ attr_group = g_string_free (str, FALSE);
+ str = g_string_new ("");
+ }
+ }
+ else if (g_unichar_isalnum (g_utf8_get_char (lp)) || *lp == '-' || *lp == '_' || *lp == '/') {
+ str = g_string_append_unichar (str, g_utf8_get_char (lp));
+ }
+ else {
+ osync_trace(TRACE_INTERNAL, "invalid character found in attribute group/name: \"%i\" String so far: %s", lp[0], str->str);
+ g_string_free (str, TRUE);
+ *p = lp;
+ _skip_to_next_line(p);
+ goto lose;
+ }
+
+ lp = g_utf8_next_char(lp);
+ }
+
+ if (!attr_name) {
+ _skip_to_next_line (p);
+ goto lose;
+ }
+
+ attr = vformat_attribute_new (attr_group, attr_name);
+ g_free (attr_group);
+ g_free (attr_name);
+
+ if (*lp == ';') {
+ /* skip past the ';' */
+ lp = g_utf8_next_char(lp);
+ _read_attribute_params (attr, &lp, &is_qp, &charset);
+ }
+ if (*lp == ':') {
+ /* skip past the ':' */
+ lp = g_utf8_next_char(lp);
+ _read_attribute_value (attr, &lp, is_qp, charset);
+ }
+
+ if (charset) g_string_free(charset, TRUE);
+ *p = lp;
+
+ if (!attr->values)
+ goto lose;
+
+ return attr;
+ lose:
+ if (attr)
+ vformat_attribute_free (attr);
+ return NULL;
+}
+
+/* we try to be as forgiving as we possibly can here - this isn't a
+ * validator. Almost nothing is considered a fatal error. We always
+ * try to return *something*.
+ */
+static void _parse(VFormat *evc, const char *str)
+{
+ char *buf = g_strdup (str);
+ char *p, *end;
+ VFormatAttribute *attr;
+
+ /* first validate the string is valid utf8 */
+ if (!g_utf8_validate (buf, -1, (const char **)&end)) {
+ /* if the string isn't valid, we parse as much as we can from it */
+ osync_trace(TRACE_INTERNAL, "invalid utf8 passed to VFormat. Limping along.");
+ *end = '\0';
+ }
+
+ buf = _fold_lines (buf);
+
+ p = buf;
+
+ attr = _read_attribute (&p);
+ if (!attr)
+ attr = _read_attribute (&p);
+
+ if (!attr || attr->group || g_ascii_strcasecmp (attr->name, "begin")) {
+ osync_trace(TRACE_INTERNAL, "vformat began without a BEGIN\n");
+ }
+ if (attr && !g_ascii_strcasecmp (attr->name, "begin"))
+ vformat_attribute_free (attr);
+ else if (attr)
+ vformat_add_attribute (evc, attr);
+
+ while (*p) {
+ VFormatAttribute *next_attr = _read_attribute (&p);
+
+ if (next_attr) {
+ //if (g_ascii_strcasecmp (next_attr->name, "end"))
+ vformat_add_attribute (evc, next_attr);
+ attr = next_attr;
+ }
+ }
+
+ if (!attr || attr->group || g_ascii_strcasecmp (attr->name, "end")) {
+ osync_trace(TRACE_INTERNAL, "vformat ended without END");
+ }
+
+ g_free (buf);
+}
+
+char *vformat_escape_string (const char *s, VFormatType type)
+{
+ GString *str;
+ const char *p;
+
+ str = g_string_new ("");
+
+ /* Escape a string as described in RFC2426, section 5 */
+ for (p = s; p && *p; p++) {
+ switch (*p) {
+ case '\n':
+ str = g_string_append (str, "\\n");
+ break;
+ case '\r':
+ if (*(p+1) == '\n')
+ p++;
+ str = g_string_append (str, "\\n");
+ break;
+ case ';':
+ str = g_string_append (str, "\\;");
+ break;
+ case ',':
+ if (type == VFORMAT_CARD_30 || type == VFORMAT_EVENT_20 || type == VFORMAT_TODO_20)
+ str = g_string_append (str, "\\,");
+ else
+ str = g_string_append_c (str, *p);
+ break;
+ case '\\':
+ /**
+ * We won't escape backslashes
+ * on vcard 2.1, unless it is in the end of a value.
+ * See comments above for a better explanation
+ **/
+ if (*p != '\0' && type == VFORMAT_CARD_21) {
+ osync_trace(TRACE_INTERNAL, "[%s]We won't escape backslashes", __func__);
+ str = g_string_append_c(str, *p);
+ }
+ else {
+ osync_trace(TRACE_INTERNAL, "[%s] escape backslashes!!", __func__);
+ str = g_string_append (str, "\\\\");
+ }
+ break;
+ default:
+ str = g_string_append_c (str, *p);
+ break;
+ }
+ }
+
+ return g_string_free (str, FALSE);
+}
+
+char*
+vformat_unescape_string (const char *s)
+{
+ GString *str;
+ const char *p;
+
+ g_return_val_if_fail (s != NULL, NULL);
+
+ str = g_string_new ("");
+
+ /* Unescape a string as described in RFC2426, section 4 (Formal Grammar) */
+ for (p = s; *p; p++) {
+ if (*p == '\\') {
+ p++;
+ if (*p == '\0') {
+ str = g_string_append_c (str, '\\');
+ break;
+ }
+ switch (*p) {
+ case 'n': str = g_string_append_c (str, '\n'); break;
+ case 'r': str = g_string_append_c (str, '\r'); break;
+ case ';': str = g_string_append_c (str, ';'); break;
+ case ',': str = g_string_append_c (str, ','); break;
+ case '\\': str = g_string_append_c (str, '\\'); break;
+ case '"': str = g_string_append_c (str, '"'); break;
+ /* \t is (incorrectly) used by kOrganizer, so handle it here */
+ case 't': str = g_string_append_c (str, '\t'); break;
+ default:
+ osync_trace(TRACE_INTERNAL, "invalid escape, passing it through. escaped char was %s", *p);
+ str = g_string_append_c (str, '\\');
+ str = g_string_append_unichar (str, g_utf8_get_char(p));
+ break;
+ }
+ }
+ }
+
+ return g_string_free (str, FALSE);
+}
+
+void
+vformat_construct (VFormat *evc, const char *str)
+{
+ g_return_if_fail (str != NULL);
+
+ if (*str)
+ _parse (evc, str);
+}
+
+void vformat_free(VFormat *format)
+{
+ g_list_foreach (format->attributes, (GFunc)vformat_attribute_free, NULL);
+ g_list_free (format->attributes);
+ g_free(format);
+}
+
+VFormat *vformat_new_from_string (const char *str)
+{
+ g_return_val_if_fail (str != NULL, NULL);
+ VFormat *evc = g_malloc0(sizeof(VFormat));
+
+ vformat_construct (evc, str);
+
+ return evc;
+}
+
+VFormat *vformat_new(void)
+{
+ return vformat_new_from_string ("");
+}
+
+VFormatAttribute *vformat_find_attribute(VFormat *vcard, const char *name)
+{
+ GList *attributes = vformat_get_attributes(vcard);
+ GList *a = NULL;
+ for (a = attributes; a; a = a->next) {
+ VFormatAttribute *attr = a->data;
+ if (!strcmp(vformat_attribute_get_name(attr), name)) {
+ return attr;
+ }
+ }
+ return NULL;
+}
+
+char *vformat_to_string (VFormat *evc, VFormatType type)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i)", __func__, type);
+ GList *l;
+ GList *v;
+
+ GString *str = g_string_new ("");
+
+ switch (type) {
+ case VFORMAT_CARD_21:
+ str = g_string_append (str, "BEGIN:VCARD\r\nVERSION:2.1\r\n");
+ break;
+ case VFORMAT_CARD_30:
+ str = g_string_append (str, "BEGIN:VCARD\r\nVERSION:3.0\r\n");
+ break;
+ case VFORMAT_TODO_10:
+ case VFORMAT_EVENT_10:
+ str = g_string_append (str, "BEGIN:VCALENDAR\r\nVERSION:1.0\r\n");
+ break;
+ case VFORMAT_TODO_20:
+ case VFORMAT_EVENT_20:
+ str = g_string_append (str, "BEGIN:VCALENDAR\r\nVERSION:2.0\r\n");
+ break;
+ case VFORMAT_NOTE:
+ str = g_string_append (str, "BEGIN:VNOTE\r\nVERSION:1.1\r\n");
+ break;
+ }
+
+ for (l = evc->attributes; l; l = l->next) {
+ GList *p;
+ VFormatAttribute *attr = l->data;
+ GString *attr_str;
+ int l;
+ int format_encoding = VF_ENCODING_RAW;
+
+ attr_str = g_string_new ("");
+
+ /* From rfc2425, 5.8.2
+ *
+ * contentline = [group "."] name *(";" param) ":" value CRLF
+ */
+
+ if (attr->group) {
+ attr_str = g_string_append (attr_str, attr->group);
+ attr_str = g_string_append_c (attr_str, '.');
+ }
+ attr_str = g_string_append (attr_str, attr->name);
+ /* handle the parameters */
+ for (p = attr->params; p; p = p->next) {
+ VFormatParam *param = p->data;
+ /* 5.8.2:
+ * param = param-name "=" param-value *("," param-value)
+ */
+ if( type == VFORMAT_CARD_30 || type == VFORMAT_TODO_20
+ || type == VFORMAT_EVENT_20) {
+
+ /**
+ * Character set can only be specified on the CHARSET
+ * parameter on the Content-Type MIME header field.
+ **/
+ if (!g_ascii_strcasecmp (param->name, "CHARSET"))
+ continue;
+ attr_str = g_string_append_c (attr_str, ';');
+ attr_str = g_string_append (attr_str, param->name);
+ if (param->values) {
+ attr_str = g_string_append_c (attr_str, '=');
+ }
+ for (v = param->values; v; v = v->next) {
+ if (_helper_is_base64((const char *) v->data)) {
+ format_encoding = VF_ENCODING_BASE64;
+ /*Only the "B" encoding of [RFC 2047] is an allowed*/
+ v->data="B";
+ }
+ /**
+ * QUOTED-PRINTABLE inline encoding has been
+ * eliminated.
+ **/
+ if (!g_ascii_strcasecmp (param->name, "ENCODING") && !g_ascii_strcasecmp ((char *) v->data, "QUOTED-PRINTABLE")) {
+ osync_trace(TRACE_ERROR, "%s false encoding QUOTED-PRINTABLE is not allowed", __func__);
+ format_encoding = VF_ENCODING_QP;
+ }
+ attr_str = g_string_append (attr_str, v->data);
+
+ if (v->next)
+ attr_str = g_string_append_c (attr_str, ',');
+ }
+ }
+ else {
+ attr_str = g_string_append_c (attr_str, ';');
+ /**
+ * The "TYPE=" is optional skip it.
+ * LOGO, PHOTO and SOUND multimedia formats MUST
+ * have a "TYPE=" parameter
+ **/
+ gboolean must_have_type = FALSE;
+ if (!g_ascii_strcasecmp (attr->name, "PHOTO") || !g_ascii_strcasecmp (attr->name, "LOGO") || !g_ascii_strcasecmp (attr->name, "SOUND") )
+ must_have_type = TRUE;
+ if ( must_have_type || g_ascii_strcasecmp (param->name, "TYPE") )
+ attr_str = g_string_append (attr_str, param->name);
+ if ( param->values && (must_have_type || g_ascii_strcasecmp (param->name, "TYPE")) )
+ attr_str = g_string_append_c (attr_str, '=');
+ for (v = param->values; v; v = v->next) {
+ // check for quoted-printable encoding
+ if (!g_ascii_strcasecmp (param->name, "ENCODING") && !g_ascii_strcasecmp ((char *) v->data, "QUOTED-PRINTABLE"))
+ format_encoding = VF_ENCODING_QP;
+ // check for base64 encoding
+ if (_helper_is_base64((const char *) v->data)) {
+ format_encoding = VF_ENCODING_BASE64;
+ v->data="BASE64";
+ }
+ attr_str = g_string_append (attr_str, v->data);
+ if (v->next)
+ attr_str = g_string_append_c (attr_str, ',');
+ }
+ }
+ }
+
+ attr_str = g_string_append_c (attr_str, ':');
+
+ for (v = attr->values; v; v = v->next) {
+ char *value = v->data;
+ char *escaped_value = NULL;
+
+ if (!strcmp (attr->name, "RRULE") &&
+ strstr (value, "BYDAY") == v->data) {
+ attr_str = g_string_append (attr_str, value);
+ } else {
+ escaped_value = vformat_escape_string (value, type);
+ attr_str = g_string_append (attr_str, escaped_value);
+ }
+
+ if (v->next) {
+
+ /* XXX toshok - i hate you, rfc 2426.
+ why doesn't CATEGORIES use a ; like
+ a normal list attribute? */
+ if (!strcmp (attr->name, "CATEGORIES"))
+ attr_str = g_string_append_c (attr_str, ',');
+ else
+ attr_str = g_string_append_c (attr_str, ';');
+ }
+
+ g_free (escaped_value);
+ }
+
+ /* Folding lines:
+ * ^^^^^^^^^^^^^^
+ *
+ * rfc 2426 (vCard), 2.6 Line Delimiting and Folding:
+ * After generating a content line,
+ * lines longer than 75 characters SHOULD be folded according to the
+ * folding procedure described in [MIME-DIR].
+ *
+ * rfc 2445 (iCalendar), 4.1 Content Lines:
+ * Lines of text SHOULD NOT be longer than 75 octets, excluding the line
+ * break. Long content lines SHOULD be split into a multiple line
+ * representations using a line "folding" technique. That is, a long
+ * line can be split between any two characters by inserting a CRLF
+ * immediately followed by a single linear white space character (i.e.,
+ * SPACE, US-ASCII decimal 32 or HTAB, US-ASCII decimal 9). Any sequence
+ * of CRLF followed immediately by a single linear white space character
+ * is ignored (i.e., removed) when processing the content type.
+ *
+ * SUMMARY: When generating a content line, lines longer then 75 characters SHOULD be folded!
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ *
+ * Differences between encodings:
+ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ *
+ * rfc 2425 [MIME-DIR], 5.8.1:
+ * A logical line MAY be continued on the next physical line anywhere
+ * between two characters by inserting a CRLF immediately followed by a
+ * single <WS> (white space) character.
+ *
+ * rfc 2045, 6.7, chapter 5:
+ * The quoted-printable specs says that softbreaks should be generated by inserting a =\r\n
+ * without follwing <WS>
+ *
+ * UTF-8
+ * ^^^^^
+ *
+ * Note that all the line folding above is described in terms of characters
+ * not bytes. In particular, it would be an error to put a line break
+ * within a UTF-8 character.
+ */
+
+ l = 0;
+ do {
+ if (g_utf8_strlen(attr_str->str, attr_str->len) - l > 75) {
+ l += 75;
+
+ /* If using QP, must be sure that we do not fold within a quote sequence */
+ if (format_encoding == VF_ENCODING_QP) {
+ if (g_utf8_get_char(g_utf8_offset_to_pointer(attr_str->str, l-1)) == '=') l--;
+ else if (g_utf8_get_char(g_utf8_offset_to_pointer(attr_str->str, l-2)) == '=') l -= 2;
+ }
+
+ char *p = g_utf8_offset_to_pointer(attr_str->str, l);
+
+ if (format_encoding == VF_ENCODING_QP)
+ attr_str = g_string_insert_len (attr_str, p - attr_str->str, "=" CRLF "", sizeof ("=" CRLF "") - 1);
+ else
+ attr_str = g_string_insert_len (attr_str, p - attr_str->str, CRLF " ", sizeof (CRLF " ") - 1);
+ }
+ else
+ break;
+ } while (l < g_utf8_strlen(attr_str->str, attr_str->len));
+
+ attr_str = g_string_append (attr_str, CRLF);
+ /**
+ * base64= <MIME RFC 1521 base64 text>
+ * the end of the text is marked with two CRLF sequences
+ * this results in one blank line before the start of the
+ * next property
+ **/
+ if( format_encoding == VF_ENCODING_BASE64
+ && (type == VFORMAT_CARD_21))
+ attr_str = g_string_append (attr_str, CRLF);
+
+ str = g_string_append (str, attr_str->str);
+ g_string_free (attr_str, TRUE);
+ }
+
+ switch (type) {
+ case VFORMAT_CARD_21:
+ str = g_string_append (str, "END:VCARD\r\n");
+ break;
+ case VFORMAT_CARD_30:
+ str = g_string_append (str, "END:VCARD\r\n");
+ break;
+ case VFORMAT_TODO_10:
+ case VFORMAT_EVENT_10:
+ str = g_string_append (str, "END:VCALENDAR\r\n");
+ break;
+ case VFORMAT_TODO_20:
+ case VFORMAT_EVENT_20:
+ str = g_string_append (str, "END:VCALENDAR\r\n");
+ break;
+ case VFORMAT_NOTE:
+ str = g_string_append (str, "END:VNOTE\r\n");
+ break;
+ }
+
+ osync_trace(TRACE_EXIT, "%s(%p, %i)", __func__, type);
+ return g_string_free (str, FALSE);
+}
+
+void vformat_dump_structure (VFormat *evc)
+{
+ GList *a;
+ GList *v;
+ int i;
+
+ printf ("VFormat\n");
+ for (a = evc->attributes; a; a = a->next) {
+ GList *p;
+ VFormatAttribute *attr = a->data;
+ printf ("+-- %s\n", attr->name);
+ if (attr->params) {
+ printf (" +- params=\n");
+
+ for (p = attr->params, i = 0; p; p = p->next, i++) {
+ VFormatParam *param = p->data;
+ printf (" | [%d] = %s", i,param->name);
+ printf ("(");
+ for (v = param->values; v; v = v->next) {
+ char *value = vformat_escape_string ((char*)v->data, VFORMAT_CARD_21);
+ printf ("%s", value);
+ if (v->next)
+ printf (",");
+ g_free (value);
+ }
+
+ printf (")\n");
+ }
+ }
+ printf (" +- values=\n");
+ for (v = attr->values, i = 0; v; v = v->next, i++) {
+ printf (" [%d] = `%s'\n", i, (char*)v->data);
+ }
+ }
+}
+
+VFormatAttribute *vformat_attribute_new (const char *attr_group, const char *attr_name)
+{
+ VFormatAttribute *attr;
+
+ attr = g_new0 (VFormatAttribute, 1);
+
+ attr->group = g_strdup (attr_group);
+ attr->name = g_strdup (attr_name);
+
+ return attr;
+}
+
+void
+vformat_attribute_free (VFormatAttribute *attr)
+{
+ g_return_if_fail (attr != NULL);
+
+ g_free (attr->group);
+ g_free (attr->name);
+
+ vformat_attribute_remove_values (attr);
+
+ vformat_attribute_remove_params (attr);
+
+ g_free (attr);
+}
+
+VFormatAttribute*
+vformat_attribute_copy (VFormatAttribute *attr)
+{
+ VFormatAttribute *a;
+ GList *p;
+
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ a = vformat_attribute_new (vformat_attribute_get_group (attr),
+ vformat_attribute_get_name (attr));
+
+ for (p = attr->values; p; p = p->next)
+ vformat_attribute_add_value (a, p->data);
+
+ for (p = attr->params; p; p = p->next)
+ vformat_attribute_add_param (a, vformat_attribute_param_copy (p->data));
+
+ return a;
+}
+
+void
+vformat_remove_attributes (VFormat *evc, const char *attr_group, const char *attr_name)
+{
+ GList *attr;
+
+ g_return_if_fail (attr_name != NULL);
+
+ attr = evc->attributes;
+ while (attr) {
+ GList *next_attr;
+ VFormatAttribute *a = attr->data;
+
+ next_attr = attr->next;
+
+ if (((!attr_group && !a->group) ||
+ (attr_group && !g_ascii_strcasecmp (attr_group, a->group))) &&
+ ((!attr_name && !a->name) || !g_ascii_strcasecmp (attr_name, a->name))) {
+
+ /* matches, remove/delete the attribute */
+ evc->attributes = g_list_remove_link (evc->attributes, attr);
+
+ vformat_attribute_free (a);
+ }
+
+ attr = next_attr;
+ }
+}
+
+void
+vformat_remove_attribute (VFormat *evc, VFormatAttribute *attr)
+{
+ g_return_if_fail (attr != NULL);
+
+ evc->attributes = g_list_remove (evc->attributes, attr);
+ vformat_attribute_free (attr);
+}
+
+void
+vformat_add_attribute (VFormat *evc, VFormatAttribute *attr)
+{
+ g_return_if_fail (attr != NULL);
+
+ evc->attributes = g_list_append (evc->attributes, attr);
+}
+
+void
+vformat_add_attribute_with_value (VFormat *VFormat,
+ VFormatAttribute *attr, const char *value)
+{
+ g_return_if_fail (attr != NULL);
+
+ vformat_attribute_add_value (attr, value);
+
+ vformat_add_attribute (VFormat, attr);
+}
+
+void
+vformat_add_attribute_with_values (VFormat *VFormat, VFormatAttribute *attr, ...)
+{
+ va_list ap;
+ char *v;
+
+ g_return_if_fail (attr != NULL);
+
+ va_start (ap, attr);
+
+ while ((v = va_arg (ap, char*))) {
+ vformat_attribute_add_value (attr, v);
+ }
+
+ va_end (ap);
+
+ vformat_add_attribute (VFormat, attr);
+}
+
+void
+vformat_attribute_add_value (VFormatAttribute *attr, const char *value)
+{
+ g_return_if_fail (attr != NULL);
+
+ attr->values = g_list_append (attr->values, g_strdup (value));
+}
+
+void
+vformat_attribute_add_value_decoded (VFormatAttribute *attr, const char *value, int len)
+{
+ g_return_if_fail (attr != NULL);
+
+ switch (attr->encoding) {
+ case VF_ENCODING_RAW:
+ osync_trace(TRACE_INTERNAL, "can't add_value_decoded with an attribute using RAW encoding. you must set the ENCODING parameter first");
+ break;
+ case VF_ENCODING_BASE64: {
+ char *b64_data = base64_encode_simple (value, len);
+ GString *decoded = g_string_new_len (value, len);
+
+ /* make sure the decoded list is up to date */
+ vformat_attribute_get_values_decoded (attr);
+
+ attr->values = g_list_append (attr->values, b64_data);
+ attr->decoded_values = g_list_append (attr->decoded_values, decoded);
+ break;
+ }
+ case VF_ENCODING_QP: {
+ char *qp_data = quoted_encode_simple ((unsigned char*)value, len);
+ GString *decoded = g_string_new (value);
+
+ /* make sure the decoded list is up to date */
+ vformat_attribute_get_values_decoded (attr);
+
+ attr->values = g_list_append (attr->values, qp_data);
+ attr->decoded_values = g_list_append (attr->decoded_values, decoded);
+ break;
+ }
+ case VF_ENCODING_8BIT: {
+ char *data = g_strdup(value);
+ GString *decoded = g_string_new (value);
+
+ /* make sure the decoded list is up to date */
+ vformat_attribute_get_values_decoded (attr);
+
+ attr->values = g_list_append (attr->values, data);
+ attr->decoded_values = g_list_append (attr->decoded_values, decoded);
+ break;
+ }
+ }
+}
+
+void
+vformat_attribute_add_values (VFormatAttribute *attr, ...)
+{
+ va_list ap;
+ char *v;
+
+ g_return_if_fail (attr != NULL);
+
+ va_start (ap, attr);
+
+ while ((v = va_arg (ap, char*))) {
+ vformat_attribute_add_value (attr, v);
+ }
+
+ va_end (ap);
+}
+
+static void
+free_gstring (GString *str)
+{
+ g_string_free (str, TRUE);
+}
+
+void
+vformat_attribute_remove_values (VFormatAttribute *attr)
+{
+ g_return_if_fail (attr != NULL);
+
+ g_list_foreach (attr->values, (GFunc)g_free, NULL);
+ g_list_free (attr->values);
+ attr->values = NULL;
+
+ g_list_foreach (attr->decoded_values, (GFunc)free_gstring, NULL);
+ g_list_free (attr->decoded_values);
+ attr->decoded_values = NULL;
+}
+
+void
+vformat_attribute_remove_params (VFormatAttribute *attr)
+{
+ g_return_if_fail (attr != NULL);
+
+ g_list_foreach (attr->params, (GFunc)vformat_attribute_param_free, NULL);
+ g_list_free (attr->params);
+ attr->params = NULL;
+
+ /* also remove the cached encoding on this attribute */
+ attr->encoding_set = FALSE;
+ attr->encoding = VF_ENCODING_RAW;
+}
+
+VFormatParam*
+vformat_attribute_param_new (const char *name)
+{
+ VFormatParam *param = g_new0 (VFormatParam, 1);
+ param->name = g_strdup (name);
+
+ return param;
+}
+
+void
+vformat_attribute_param_free (VFormatParam *param)
+{
+ g_return_if_fail (param != NULL);
+
+ g_free (param->name);
+
+ vformat_attribute_param_remove_values (param);
+
+ g_free (param);
+}
+
+VFormatParam*
+vformat_attribute_param_copy (VFormatParam *param)
+{
+ VFormatParam *p;
+ GList *l;
+
+ g_return_val_if_fail (param != NULL, NULL);
+
+ p = vformat_attribute_param_new (vformat_attribute_param_get_name (param));
+
+ for (l = param->values; l; l = l->next) {
+ vformat_attribute_param_add_value (p, l->data);
+ }
+
+ return p;
+}
+
+void
+vformat_attribute_add_param (VFormatAttribute *attr,
+ VFormatParam *param)
+{
+ g_return_if_fail (attr != NULL);
+ g_return_if_fail (param != NULL);
+
+ attr->params = g_list_append (attr->params, param);
+
+ /* we handle our special encoding stuff here */
+
+ if (!g_ascii_strcasecmp (param->name, "ENCODING")) {
+ if (attr->encoding_set) {
+ osync_trace(TRACE_INTERNAL, "ENCODING specified twice");
+ return;
+ }
+
+ if (param->values && param->values->data) {
+ if (_helper_is_base64((const char*)param->values->data))
+ attr->encoding = VF_ENCODING_BASE64;
+ else if (!g_ascii_strcasecmp ((char*)param->values->data, "QUOTED-PRINTABLE"))
+ attr->encoding = VF_ENCODING_QP;
+ else if (!g_ascii_strcasecmp ((char *)param->values->data, "8BIT"))
+ attr->encoding = VF_ENCODING_8BIT;
+ else {
+ osync_trace(TRACE_INTERNAL, "Unknown value `%s' for ENCODING parameter. values will be treated as raw",
+ (char*)param->values->data);
+ }
+
+ attr->encoding_set = TRUE;
+ }
+ else {
+ osync_trace(TRACE_INTERNAL, "ENCODING parameter added with no value");
+ }
+ }
+}
+
+VFormatParam *vformat_attribute_find_param(VFormatAttribute *attr, const char *name)
+{
+ g_return_val_if_fail (attr != NULL, NULL);
+ GList *p = NULL;
+ for (p = attr->params; p; p = p->next) {
+ VFormatParam *param = p->data;
+ if (!g_ascii_strcasecmp (param->name, name))
+ return param;
+ }
+ return NULL;
+}
+
+void
+vformat_attribute_set_value (VFormatAttribute *attr,
+ int nth, const char *value)
+{
+ GList *param = g_list_nth(attr->values, nth);
+ g_free(param->data);
+ param->data = g_strdup(value);
+}
+
+void
+vformat_attribute_param_add_value (VFormatParam *param,
+ const char *value)
+{
+ g_return_if_fail (param != NULL);
+
+ param->values = g_list_append (param->values, g_strdup (value));
+}
+
+void
+vformat_attribute_param_add_values (VFormatParam *param,
+ ...)
+{
+ va_list ap;
+ char *v;
+
+ g_return_if_fail (param != NULL);
+
+ va_start (ap, param);
+
+ while ((v = va_arg (ap, char*))) {
+ vformat_attribute_param_add_value (param, v);
+ }
+
+ va_end (ap);
+}
+
+void
+vformat_attribute_add_param_with_value (VFormatAttribute *attr, const char *name, const char *value)
+{
+ g_return_if_fail (attr != NULL);
+ g_return_if_fail (name != NULL);
+
+ if (!value)
+ return;
+
+ VFormatParam *param = vformat_attribute_param_new(name);
+
+ vformat_attribute_param_add_value (param, value);
+
+ vformat_attribute_add_param (attr, param);
+}
+
+void
+vformat_attribute_add_param_with_values (VFormatAttribute *attr,
+ VFormatParam *param, ...)
+{
+ va_list ap;
+ char *v;
+
+ g_return_if_fail (attr != NULL);
+ g_return_if_fail (param != NULL);
+
+ va_start (ap, param);
+
+ while ((v = va_arg (ap, char*))) {
+ vformat_attribute_param_add_value (param, v);
+ }
+
+ va_end (ap);
+
+ vformat_attribute_add_param (attr, param);
+}
+
+void
+vformat_attribute_param_remove_values (VFormatParam *param)
+{
+ g_return_if_fail (param != NULL);
+
+ g_list_foreach (param->values, (GFunc)g_free, NULL);
+ g_list_free (param->values);
+ param->values = NULL;
+}
+
+GList*
+vformat_get_attributes (VFormat *format)
+{
+ return format->attributes;
+}
+
+const char*
+vformat_attribute_get_group (VFormatAttribute *attr)
+{
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ return attr->group;
+}
+
+const char*
+vformat_attribute_get_name (VFormatAttribute *attr)
+{
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ return attr->name;
+}
+
+GList*
+vformat_attribute_get_values (VFormatAttribute *attr)
+{
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ return attr->values;
+}
+
+GList*
+vformat_attribute_get_values_decoded (VFormatAttribute *attr)
+{
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ if (!attr->decoded_values) {
+ GList *l;
+ switch (attr->encoding) {
+ case VF_ENCODING_RAW:
+ case VF_ENCODING_8BIT:
+ for (l = attr->values; l; l = l->next)
+ attr->decoded_values = g_list_append (attr->decoded_values, g_string_new ((char*)l->data));
+ break;
+ case VF_ENCODING_BASE64:
+ for (l = attr->values; l; l = l->next) {
+ char *decoded = g_strdup ((char*)l->data);
+ int len = base64_decode_simple (decoded, strlen (decoded));
+ attr->decoded_values = g_list_append (attr->decoded_values, g_string_new_len (decoded, len));
+ g_free (decoded);
+ }
+ break;
+ case VF_ENCODING_QP:
+ for (l = attr->values; l; l = l->next) {
+ if (!(l->data))
+ continue;
+ char *decoded = g_strdup ((char*)l->data);
+ int len = quoted_decode_simple (decoded, strlen (decoded));
+ attr->decoded_values = g_list_append (attr->decoded_values, g_string_new_len (decoded, len));
+ g_free (decoded);
+ }
+ break;
+ }
+ }
+
+ return attr->decoded_values;
+}
+
+gboolean
+vformat_attribute_is_single_valued (VFormatAttribute *attr)
+{
+ g_return_val_if_fail (attr != NULL, FALSE);
+
+ if (attr->values == NULL
+ || attr->values->next != NULL)
+ return FALSE;
+
+ return TRUE;
+}
+
+char*
+vformat_attribute_get_value (VFormatAttribute *attr)
+{
+ GList *values;
+
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ values = vformat_attribute_get_values (attr);
+
+ if (!vformat_attribute_is_single_valued (attr))
+ osync_trace(TRACE_INTERNAL, "vformat_attribute_get_value called on multivalued attribute");
+
+ return values ? g_strdup ((char*)values->data) : NULL;
+}
+
+GString*
+vformat_attribute_get_value_decoded (VFormatAttribute *attr)
+{
+ GList *values;
+ GString *str = NULL;
+
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ values = vformat_attribute_get_values_decoded (attr);
+
+ if (!vformat_attribute_is_single_valued (attr))
+ osync_trace(TRACE_INTERNAL, "vformat_attribute_get_value_decoded called on multivalued attribute");
+
+ if (values)
+ str = values->data;
+
+ return str ? g_string_new_len (str->str, str->len) : NULL;
+}
+
+const char *vformat_attribute_get_nth_value(VFormatAttribute *attr, int nth)
+{
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ if (!values)
+ return NULL;
+ GString *retstr = (GString *)g_list_nth_data(values, nth);
+ if (!retstr)
+ return NULL;
+
+ if (!g_utf8_validate(retstr->str, -1, NULL)) {
+ values = vformat_attribute_get_values(attr);
+ if (!values)
+ return NULL;
+ return g_list_nth_data(values, nth);
+ }
+
+ return retstr->str;
+}
+
+gboolean
+vformat_attribute_has_type (VFormatAttribute *attr, const char *typestr)
+{
+ GList *params;
+ GList *p;
+
+ g_return_val_if_fail (attr != NULL, FALSE);
+ g_return_val_if_fail (typestr != NULL, FALSE);
+
+ params = vformat_attribute_get_params (attr);
+
+ for (p = params; p; p = p->next) {
+ VFormatParam *param = p->data;
+
+ if (!strcasecmp (vformat_attribute_param_get_name (param), "TYPE")) {
+ GList *values = vformat_attribute_param_get_values (param);
+ GList *v;
+
+ for (v = values; v; v = v->next) {
+ if (!strcasecmp ((char*)v->data, typestr))
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+
+gboolean vformat_attribute_has_param(VFormatAttribute *attr, const char *name)
+{
+ g_return_val_if_fail (attr != NULL, FALSE);
+ g_return_val_if_fail (name != NULL, FALSE);
+
+ GList *params = vformat_attribute_get_params(attr);
+ GList *p;
+ for (p = params; p; p = p->next) {
+ VFormatParam *param = p->data;
+ if (!strcasecmp(name, vformat_attribute_param_get_name(param)))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+GList*
+vformat_attribute_get_params (VFormatAttribute *attr)
+{
+ g_return_val_if_fail (attr != NULL, NULL);
+
+ return attr->params;
+}
+
+const char*
+vformat_attribute_param_get_name (VFormatParam *param)
+{
+ g_return_val_if_fail (param != NULL, NULL);
+
+ return param->name;
+}
+
+GList*
+vformat_attribute_param_get_values (VFormatParam *param)
+{
+ g_return_val_if_fail (param != NULL, NULL);
+
+ return param->values;
+}
+
+const char *vformat_attribute_param_get_nth_value(VFormatParam *param, int nth)
+{
+ const char *ret = NULL;
+ GList *values = vformat_attribute_param_get_values(param);
+ if (!values)
+ return NULL;
+ ret = g_list_nth_data(values, nth);
+ return ret;
+}
+
+static const char *base64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+//static unsigned char _evc_base64_rank[256];
+
+static void base64_init(char *rank)
+{
+ int i;
+
+ memset(rank, 0xff, sizeof(rank));
+ for (i=0;i<64;i++) {
+ rank[(unsigned int)base64_alphabet[i]] = i;
+ }
+ rank['='] = 0;
+}
+
+/* call this when finished encoding everything, to
+ flush off the last little bit */
+static size_t base64_encode_close(unsigned char *in, size_t inlen, gboolean break_lines, unsigned char *out, int *state, int *save)
+{
+ int c1, c2;
+ unsigned char *outptr = out;
+
+ if (inlen>0)
+ outptr += base64_encode_step(in, inlen, break_lines, outptr, state, save);
+
+ c1 = ((unsigned char *)save)[1];
+ c2 = ((unsigned char *)save)[2];
+
+ switch (((char *)save)[0]) {
+ case 2:
+ outptr[2] = base64_alphabet[ ( (c2 &0x0f) << 2 ) ];
+ g_assert(outptr[2] != 0);
+ goto skip;
+ case 1:
+ outptr[2] = '=';
+ skip:
+ outptr[0] = base64_alphabet[ c1 >> 2 ];
+ outptr[1] = base64_alphabet[ c2 >> 4 | ( (c1&0x3) << 4 )];
+ outptr[3] = '=';
+ outptr += 4;
+ break;
+ }
+ if (break_lines)
+ *outptr++ = '\n';
+
+ *save = 0;
+ *state = 0;
+
+ return outptr-out;
+}
+
+/*
+ performs an 'encode step', only encodes blocks of 3 characters to the
+ output at a time, saves left-over state in state and save (initialise to
+ 0 on first invocation).
+*/
+static size_t base64_encode_step(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save)
+{
+ register unsigned char *inptr, *outptr;
+
+ if (len<=0)
+ return 0;
+
+ inptr = in;
+ outptr = out;
+
+ if (len + ((char *)save)[0] > 2) {
+ unsigned char *inend = in+len-2;
+ register int c1, c2, c3;
+ register int already;
+
+ already = *state;
+
+ switch (((char *)save)[0]) {
+ case 1: c1 = ((unsigned char *)save)[1]; goto skip1;
+ case 2: c1 = ((unsigned char *)save)[1];
+ c2 = ((unsigned char *)save)[2]; goto skip2;
+ }
+
+ /* yes, we jump into the loop, no i'm not going to change it, it's beautiful! */
+ while (inptr < inend) {
+ c1 = *inptr++;
+ skip1:
+ c2 = *inptr++;
+ skip2:
+ c3 = *inptr++;
+ *outptr++ = base64_alphabet[ c1 >> 2 ];
+ *outptr++ = base64_alphabet[ c2 >> 4 | ( (c1&0x3) << 4 ) ];
+ *outptr++ = base64_alphabet[ ( (c2 &0x0f) << 2 ) | (c3 >> 6) ];
+ *outptr++ = base64_alphabet[ c3 & 0x3f ];
+ /* this is a bit ugly ... */
+ if (break_lines && (++already)>=19) {
+ *outptr++='\n';
+ already = 0;
+ }
+ }
+
+ ((char *)save)[0] = 0;
+ len = 2-(inptr-inend);
+ *state = already;
+ }
+
+ if (len>0) {
+ register char *saveout;
+
+ /* points to the slot for the next char to save */
+ saveout = & (((char *)save)[1]) + ((char *)save)[0];
+
+ /* len can only be 0 1 or 2 */
+ switch(len) {
+ case 2: *saveout++ = *inptr++;
+ case 1: *saveout++ = *inptr++;
+ }
+ ((char *)save)[0]+=len;
+ }
+
+ return outptr-out;
+}
+
+
+/**
+ * base64_decode_step: decode a chunk of base64 encoded data
+ * @in: input stream
+ * @len: max length of data to decode
+ * @out: output stream
+ * @state: holds the number of bits that are stored in @save
+ * @save: leftover bits that have not yet been decoded
+ *
+ * Decodes a chunk of base64 encoded data
+ **/
+static size_t base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save)
+{
+ unsigned char base64_rank[256];
+ base64_init((char*)base64_rank);
+
+ register unsigned char *inptr, *outptr;
+ unsigned char *inend, c;
+ register unsigned int v;
+ int i;
+
+ inend = in+len;
+ outptr = out;
+
+ /* convert 4 base64 bytes to 3 normal bytes */
+ v=*save;
+ i=*state;
+ inptr = in;
+ while (inptr<inend) {
+ c = base64_rank[*inptr++];
+ if (c != 0xff) {
+ v = (v<<6) | c;
+ i++;
+ if (i==4) {
+ *outptr++ = v>>16;
+ *outptr++ = v>>8;
+ *outptr++ = v;
+ i=0;
+ }
+ }
+ }
+
+ *save = v;
+ *state = i;
+
+ /* quick scan back for '=' on the end somewhere */
+ /* fortunately we can drop 1 output char for each trailing = (upto 2) */
+ i=2;
+ while (inptr>in && i) {
+ inptr--;
+ if (base64_rank[*inptr] != 0xff) {
+ if (*inptr == '=' && outptr>out)
+ outptr--;
+ i--;
+ }
+ }
+
+ /* if i!= 0 then there is a truncation error! */
+ return outptr-out;
+}
+
+char *base64_encode_simple (const char *data, size_t len)
+{
+ unsigned char *out;
+ int state = 0, outlen;
+ unsigned int save = 0;
+
+ g_return_val_if_fail (data != NULL, NULL);
+
+ out = g_malloc (len * 4 / 3 + 5);
+ outlen = base64_encode_close ((unsigned char *)data, len, FALSE,
+ out, &state, (int*)&save);
+ out[outlen] = '\0';
+ return (char *)out;
+}
+
+size_t base64_decode_simple (char *data, size_t len)
+{
+ int state = 0;
+ unsigned int save = 0;
+
+ g_return_val_if_fail (data != NULL, 0);
+
+ return base64_decode_step ((unsigned char *)data, len,
+ (unsigned char *)data, &state, &save);
+}
+
+char *quoted_encode_simple(const unsigned char *string, int len)
+{
+ GString *tmp = g_string_new("");
+
+ int i = 0;
+ while(string[i] != 0) {
+ if (string[i] > 127 || string[i] == 13 || string[i] == 10 || string[i] == '=') {
+ g_string_append_printf(tmp, "=%02X", string[i]);
+ } else {
+ g_string_append_c(tmp, string[i]);
+ }
+ i++;
+ }
+
+ char *ret = tmp->str;
+ g_string_free(tmp, FALSE);
+ return ret;
+}
+
+
+size_t quoted_decode_simple (char *data, size_t len)
+{
+ g_return_val_if_fail (data != NULL, 0);
+
+ GString *string = g_string_new(data);
+ if (!string)
+ return 0;
+
+ char hex[5];
+ hex[4] = 0;
+
+ while (1) {
+ //Get the index of the next encoded char
+ int i = strcspn(string->str, "=");
+ if (i >= strlen(string->str))
+ break;
+
+ strcpy(hex, "0x");
+ strncat(hex, &string->str[i + 1], 2);
+ char rep = ((int)(strtod(hex, NULL)));
+ g_string_erase(string, i, 2);
+ g_string_insert_c(string, i, rep);
+ }
+
+ memset(data, 0, strlen(data));
+ strcpy(data, string->str);
+ g_string_free(string, 1);
+
+ return strlen(data);
+}
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/vformat.h b/debian/opensync/opensync-0.22/formats/vformats-xml/vformat.h
new file mode 100644
index 00000000..e754e02b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/vformat.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2003 Ximian, Inc. 2005 Armin Bauer
+ *
+ * Copyright (C) 2003 Ximian, Inc.
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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
+ *
+ * Author: Chris Toshok (toshok@ximian.com)
+ * Author: Armin Bauer (armin.bauer@opensync.org)
+ *
+ */
+
+#ifndef _VFORMAT_H
+#define _VFORMAT_H
+
+#include <glib.h>
+#include <time.h>
+
+typedef enum {
+ VFORMAT_CARD_21,
+ VFORMAT_CARD_30,
+ VFORMAT_NOTE,
+ VFORMAT_EVENT_10,
+ VFORMAT_EVENT_20,
+ VFORMAT_TODO_10,
+ VFORMAT_TODO_20
+} VFormatType;
+
+typedef struct VFormat {
+ //VFormatType type;
+ GList *attributes;
+} VFormat;
+
+#define CRLF "\r\n"
+
+typedef enum {
+ VF_ENCODING_RAW, /* no encoding */
+ VF_ENCODING_BASE64, /* base64 */
+ VF_ENCODING_QP, /* quoted-printable */
+ VF_ENCODING_8BIT
+} VFormatEncoding;
+
+typedef struct VFormatAttribute {
+ char *group;
+ char *name;
+ GList *params; /* VFormatParam */
+ GList *values;
+ GList *decoded_values;
+ VFormatEncoding encoding;
+ gboolean encoding_set;
+} VFormatAttribute;
+
+typedef struct VFormatParam {
+ char *name;
+ GList *values; /* GList of char*'s*/
+} VFormatParam;
+
+
+/*VFormat *vcard_new(VFormatType type);
+VFormat *vcard_new_from_string (const char *str, VFormatType type);
+//char *vcard_to_string(VFormat *card, VFormatType format);
+
+VFormat *vnote_new(void);
+VFormat *vnote_new_from_string(const char *str);
+//char *vnote_to_string(VFormat *note);
+
+
+VFormat *vevent_new(void);
+VFormat *vevent_new_from_string(const char *str);
+//char *vevent_to_string(VFormat *event);
+
+VFormat *vtodo_new(void);
+VFormat *vtodo_new_from_string(const char *str);*/
+//char *vtodo_to_string(VFormat *todo);
+
+/* mostly for debugging */
+VFormat *vformat_new(void);
+VFormat *vformat_new_from_string(const char *str);
+void vformat_dump_structure(VFormat *format);
+char *vformat_to_string(VFormat *evc, VFormatType type);
+time_t vformat_time_to_unix(const char *inptime);
+
+/* attributes */
+VFormatAttribute *vformat_attribute_new (const char *attr_group, const char *attr_name);
+void vformat_attribute_free (VFormatAttribute *attr);
+VFormatAttribute *vformat_attribute_copy (VFormatAttribute *attr);
+void vformat_remove_attributes (VFormat *vformat, const char *attr_group, const char *attr_name);
+void vformat_remove_attribute (VFormat *vformat, VFormatAttribute *attr);
+void vformat_add_attribute (VFormat *vformat, VFormatAttribute *attr);
+void vformat_add_attribute_with_value (VFormat *vformat, VFormatAttribute *attr, const char *value);
+void vformat_add_attribute_with_values (VFormat *vformat, VFormatAttribute *attr, ...);
+void vformat_attribute_add_value (VFormatAttribute *attr, const char *value);
+void vformat_attribute_set_value (VFormatAttribute *attr, int nth, const char *value);
+void vformat_attribute_add_value_decoded (VFormatAttribute *attr, const char *value, int len);
+void vformat_attribute_add_values (VFormatAttribute *attr, ...);
+void vformat_attribute_remove_values (VFormatAttribute *attr);
+void vformat_attribute_remove_params (VFormatAttribute *attr);
+VFormatAttribute *vformat_find_attribute (VFormat *evc, const char *name);
+
+/* attribute parameters */
+VFormatParam* vformat_attribute_param_new (const char *param_name);
+void vformat_attribute_param_free (VFormatParam *param);
+VFormatParam* vformat_attribute_param_copy (VFormatParam *param);
+void vformat_attribute_add_param (VFormatAttribute *attr, VFormatParam *param);
+VFormatParam *vformat_attribute_find_param(VFormatAttribute *attr, const char *name);
+void vformat_attribute_add_param_with_value (VFormatAttribute *attr, const char *name, const char *value);
+void vformat_attribute_add_param_with_values (VFormatAttribute *attr,
+ VFormatParam *param, ...);
+
+void vformat_attribute_param_add_value (VFormatParam *param,
+ const char *value);
+void vformat_attribute_param_add_values (VFormatParam *param,
+ ...);
+void vformat_attribute_param_remove_values (VFormatParam *param);
+gboolean vformat_attribute_has_param(VFormatAttribute *attr, const char *name);
+
+/* VFormat* accessors. nothing returned from these functions should be
+ freed by the caller. */
+GList* vformat_get_attributes (VFormat *vformat);
+const char* vformat_attribute_get_group (VFormatAttribute *attr);
+const char* vformat_attribute_get_name (VFormatAttribute *attr);
+GList* vformat_attribute_get_values (VFormatAttribute *attr); /* GList elements are of type char* */
+GList* vformat_attribute_get_values_decoded (VFormatAttribute *attr); /* GList elements are of type GString* */
+const char *vformat_attribute_get_nth_value(VFormatAttribute *attr, int nth);
+
+/* special accessors for single valued attributes */
+gboolean vformat_attribute_is_single_valued (VFormatAttribute *attr);
+char* vformat_attribute_get_value (VFormatAttribute *attr);
+GString* vformat_attribute_get_value_decoded (VFormatAttribute *attr);
+
+GList* vformat_attribute_get_params (VFormatAttribute *attr);
+const char* vformat_attribute_param_get_name (VFormatParam *param);
+GList* vformat_attribute_param_get_values (VFormatParam *param);
+const char *vformat_attribute_param_get_nth_value(VFormatParam *param, int nth);
+
+/* special TYPE= parameter predicate (checks for TYPE=@typestr */
+gboolean vformat_attribute_has_type (VFormatAttribute *attr, const char *typestr);
+
+/* Utility functions. */
+char* vformat_escape_string (const char *str, VFormatType type);
+char* vformat_unescape_string (const char *str);
+
+#endif /* _VFORMAT_H */
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-evolution.c b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-evolution.c
new file mode 100644
index 00000000..648b197a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-evolution.c
@@ -0,0 +1,522 @@
+/*
+ * x-evo - A plugin for evolution extensions for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+#include "vformat.h"
+#include <glib.h>
+
+#include "xml-vcard.h"
+
+static xmlNode *handle_x_aim_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling x-aim attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-AIM", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_file_as_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling file_as attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"FileAs", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_manager_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Manager attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Manager", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_assistant_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Assistant attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Assistant", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_anniversary_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Anniversary attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Anniversary", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_spouse_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Spouse attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Spouse", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_blog_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling BlogUrl attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"BlogUrl", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_calendar_url_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling CalendarUrl attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"CalendarUrl", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_free_busy_url_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling FreeBusyUrl attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"FreeBusyUrl", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_video_chat_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling VideoUrl attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"VideoUrl", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_wants_html_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling WantsHtml attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"WantsHtml", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_yahoo_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling IM-Yahoo attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-Yahoo", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_icq_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling IM-ICQ attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-ICQ", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_groupwise_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling GroupwiseDirectory attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"GroupwiseDirectory", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_jabber_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Jabber attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-Jabber", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_msn_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling MSN attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-MSN", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+//evo2s role is more like a profession so we map it there
+static xmlNode *handle_role_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling role attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Profession", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static void handle_slot_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Slot parameter %s", vformat_attribute_param_get_name(param));
+ xmlNewTextChild(current, NULL, (xmlChar*)"Slot",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_assistant_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Assistant parameter %s", vformat_attribute_param_get_name(param));
+ xmlNewTextChild(current, NULL, (xmlChar*)"Type", (xmlChar*)"Assistant");
+}
+
+static void handle_callback_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Callback parameter %s", vformat_attribute_param_get_name(param));
+ xmlNewTextChild(current, NULL, (xmlChar*)"Type", (xmlChar*)"Callback");
+}
+
+static void handle_company_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Company parameter %s", vformat_attribute_param_get_name(param));
+ xmlNewTextChild(current, NULL, (xmlChar*)"Type", (xmlChar*)"Company");
+}
+
+static void handle_telex_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Telex parameter %s", vformat_attribute_param_get_name(param));
+ xmlNewTextChild(current, NULL, (xmlChar*)"Type", (xmlChar*)"Telex");
+}
+
+static void handle_radio_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Radio parameter %s", vformat_attribute_param_get_name(param));
+ xmlNewTextChild(current, NULL, (xmlChar*)"Type", (xmlChar*)"Radio");
+}
+
+static osync_bool init_x_evo_to_xml(void *input)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, input);
+
+ GHashTable *table = (GHashTable *)input;
+
+ g_hash_table_insert(table, "X-EVOLUTION-FILE-AS", handle_file_as_attribute);
+ g_hash_table_insert(table, "X-EVOLUTION-MANAGER", handle_manager_attribute);
+ g_hash_table_insert(table, "X-EVOLUTION-ASSISTANT", handle_assistant_attribute);
+ g_hash_table_insert(table, "X-EVOLUTION-ANNIVERSARY", handle_anniversary_attribute);
+ g_hash_table_insert(table, "X-EVOLUTION-SPOUSE", handle_spouse_attribute);
+ g_hash_table_insert(table, "X-EVOLUTION-BLOG-URL", handle_blog_attribute);
+ g_hash_table_insert(table, "CALURI", handle_calendar_url_attribute);
+ g_hash_table_insert(table, "FBURL", handle_free_busy_url_attribute);
+ g_hash_table_insert(table, "X-EVOLUTION-VIDEO-URL", handle_video_chat_attribute);
+ g_hash_table_insert(table, "X-MOZILLA-HTML", handle_wants_html_attribute);
+ g_hash_table_insert(table, "X-YAHOO", handle_yahoo_attribute);
+ g_hash_table_insert(table, "X-ICQ", handle_icq_attribute);
+ g_hash_table_insert(table, "X-GROUPWISE", handle_groupwise_attribute);
+ g_hash_table_insert(table, "X-AIM", handle_x_aim_attribute);
+ g_hash_table_insert(table, "X-JABBER", handle_jabber_attribute);
+ g_hash_table_insert(table, "X-MSN", handle_msn_attribute);
+
+ g_hash_table_insert(table, "X-EVOLUTION-UI-SLOT", handle_slot_parameter);
+ g_hash_table_insert(table, "TYPE=X-EVOLUTION-ASSISTANT", handle_assistant_parameter);
+ g_hash_table_insert(table, "TYPE=X-EVOLUTION-CALLBACK", handle_callback_parameter);
+ g_hash_table_insert(table, "TYPE=X-EVOLUTION-COMPANY", handle_company_parameter);
+ g_hash_table_insert(table, "TYPE=X-EVOLUTION-TELEX", handle_telex_parameter);
+ g_hash_table_insert(table, "TYPE=X-EVOLUTION-RADIO", handle_radio_parameter);
+
+ //Overwrite Role
+ g_hash_table_insert(table, "ROLE", handle_role_attribute);
+
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+static osync_bool needs_encoding(const unsigned char *tmp, const char *encoding)
+{
+ int i = 0;
+ if (!strcmp(encoding, "QUOTED-PRINTABLE")) {
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127 || tmp[i] == 10 || tmp[i] == 13)
+ return TRUE;
+ i++;
+ }
+ } else {
+ return !g_utf8_validate((gchar*)tmp, -1, NULL);
+ }
+ return FALSE;
+}
+
+static osync_bool needs_charset(const unsigned char *tmp)
+{
+ int i = 0;
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127)
+ return TRUE;
+ i++;
+ }
+ return FALSE;
+}
+
+static void add_value(VFormatAttribute *attr, xmlNode *parent, const char *name, const char *encoding)
+{
+ char *tmp = osxml_find_node(parent, name);
+ if (!tmp)
+ return;
+
+ if (needs_charset((unsigned char*)tmp))
+ if (!vformat_attribute_has_param (attr, "CHARSET"))
+ vformat_attribute_add_param_with_value(attr, "CHARSET", "UTF-8");
+
+ if (needs_encoding((unsigned char*)tmp, encoding)) {
+ if (!vformat_attribute_has_param (attr, "ENCODING"))
+ vformat_attribute_add_param_with_value(attr, "ENCODING", encoding);
+ vformat_attribute_add_value_decoded(attr, tmp, strlen(tmp) + 1);
+ } else
+ vformat_attribute_add_value(attr, tmp);
+ g_free(tmp);
+}
+
+static VFormatAttribute *handle_xml_file_as_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling file_as xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-EVOLUTION-FILE-AS");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_manager_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling manager xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-EVOLUTION-MANAGER");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_assistant_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling assistant xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-EVOLUTION-ASSISTANT");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_anniversary_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling anniversary xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-EVOLUTION-ANNIVERSARY");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_spouse_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling spouse xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-EVOLUTION-SPOUSE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_blog_url_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling blog_url xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-EVOLUTION-BLOG-URL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_calendar_url_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling calendar_url xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CALURI");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_free_busy_url_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling free_busy_url xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "FBURL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_video_url_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling videourl xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-EVOLUTION-VIDEO-URL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_wants_html_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling wants_html xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-MOZILLA-HTML");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_yahoo_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling yahoo xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-YAHOO");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_icq_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling icq xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-ICQ");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_groupwise_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling groupwise xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-GROUPWISE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_aim_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling aim xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-AIM");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_jabber_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling jabber xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-JABBER");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_msn_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling msn xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-MSN");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+//We map the profession to the ROLE
+static VFormatAttribute *handle_xml_profession_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling profession xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ROLE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static void handle_xml_slot_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling slot xml parameter");
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "X-EVOLUTION-UI-SLOT", content);
+ g_free(content);
+}
+
+static void handle_xml_assistant_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling assistant xml parameter");
+ vformat_attribute_add_param_with_value(attr, "TYPE", "X-EVOLUTION-ASSISTANT");
+}
+
+static void handle_xml_callback_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling callback xml parameter");
+ vformat_attribute_add_param_with_value(attr, "TYPE", "X-EVOLUTION-CALLBACK");
+}
+
+static void handle_xml_company_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling company xml parameter");
+ vformat_attribute_add_param_with_value(attr, "TYPE", "X-EVOLUTION-COMPANY");
+}
+
+static void handle_xml_telex_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling telex xml parameter");
+ vformat_attribute_add_param_with_value(attr, "TYPE", "X-EVOLUTION-TELEX");
+}
+
+static void handle_xml_radio_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling radio xml parameter");
+ vformat_attribute_add_param_with_value(attr, "TYPE", "X-EVOLUTION-RADIO");
+}
+
+static osync_bool init_xml_to_x_evo(void *input)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, input);
+
+ OSyncHookTables *hooks = (OSyncHookTables *)input;
+
+ g_hash_table_insert(hooks->attributes, "FileAs", handle_xml_file_as_attribute);
+ g_hash_table_insert(hooks->attributes, "Manager", handle_xml_manager_attribute);
+ g_hash_table_insert(hooks->attributes, "Assistant", handle_xml_assistant_attribute);
+ g_hash_table_insert(hooks->attributes, "Anniversary", handle_xml_anniversary_attribute);
+ g_hash_table_insert(hooks->attributes, "Spouse", handle_xml_spouse_attribute);
+ g_hash_table_insert(hooks->attributes, "BlogUrl", handle_xml_blog_url_attribute);
+ g_hash_table_insert(hooks->attributes, "CalendarUrl", handle_xml_calendar_url_attribute);
+ g_hash_table_insert(hooks->attributes, "FreeBusyUrl", handle_xml_free_busy_url_attribute);
+ g_hash_table_insert(hooks->attributes, "VideoUrl", handle_xml_video_url_attribute);
+ g_hash_table_insert(hooks->attributes, "WantsHtml", handle_xml_wants_html_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-Yahoo", handle_xml_yahoo_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-ICQ", handle_xml_icq_attribute);
+ g_hash_table_insert(hooks->attributes, "GroupwiseDirectory", handle_xml_groupwise_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-AIM", handle_xml_aim_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-Jabber", handle_xml_jabber_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-MSN", handle_xml_msn_attribute);
+ //Overwrite Profession handler
+ g_hash_table_insert(hooks->attributes, "Profession", handle_xml_profession_attribute);
+
+
+ g_hash_table_insert(hooks->parameters, "Slot", handle_xml_slot_parameter);
+ g_hash_table_insert(hooks->parameters, "Type=Assistant", handle_xml_assistant_parameter);
+ g_hash_table_insert(hooks->parameters, "Type=Callback", handle_xml_callback_parameter);
+ g_hash_table_insert(hooks->parameters, "Type=Company", handle_xml_company_parameter);
+ g_hash_table_insert(hooks->parameters, "Type=Telex", handle_xml_telex_parameter);
+ g_hash_table_insert(hooks->parameters, "Type=Radio", handle_xml_radio_parameter);
+
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "contact");
+ osync_env_register_objformat(env, "contact", "xml-contact");
+
+ osync_env_register_extension(env, "vcard21", "xml-contact", "evolution", init_x_evo_to_xml);
+ osync_env_register_extension(env, "xml-contact", "vcard21", "evolution", init_xml_to_x_evo);
+
+ osync_env_register_extension(env, "vcard30", "xml-contact", "evolution", init_x_evo_to_xml);
+ osync_env_register_extension(env, "xml-contact", "vcard30", "evolution", init_xml_to_x_evo);
+}
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-kde.c b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-kde.c
new file mode 100644
index 00000000..575d61e0
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-kde.c
@@ -0,0 +1,505 @@
+/*
+ * x-kde - A plugin for kde extensions for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+#include "vformat.h"
+#include <glib.h>
+
+#include "xml-vcard.h"
+
+static xmlNode *handle_aim_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling x-aim attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-AIM", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_manager_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Manager attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Manager", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_assistant_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Assistant attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Assistant", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_anniversary_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Anniversary attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Anniversary", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_spouse_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Spouse attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Spouse", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_blog_url_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Blog Url attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"BlogUrl", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_yahoo_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling IM-Yahoo attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-Yahoo", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_icq_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling IM-ICQ attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-ICQ", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_jabber_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Jabber attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-Jabber", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_msn_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling MSN attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-MSN", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_department_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling department attribute");
+ xmlNode *current = NULL;
+
+ //We need to check first if the node already exists.
+ if (!(current = osxml_get_node(root, "Organization")))
+ current = xmlNewTextChild(root, NULL, (xmlChar*)"Organization", NULL);
+
+ osxml_node_add(current, "Department", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_office_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling office attribute");
+ xmlNode *current = NULL;
+
+ //We need to check first if the node already exists.
+ if (!(current = osxml_get_node(root, "Organization")))
+ current = xmlNewTextChild(root, NULL, (xmlChar*)"Organization", NULL);
+
+ osxml_node_add(current, "Unit", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_profession_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling profession attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Profession", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_gadu_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling gadu attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IM-GaduGadu", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_irc_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling IRC attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"IRC", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_sms_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling SMS attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"SMS", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_organization_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Organization attribute");
+ xmlNode *current = NULL;
+
+ //We need to check first if the node already exists.
+ if (!(current = osxml_get_node(root, "Organization")))
+ current = xmlNewTextChild(root, NULL, (xmlChar*)"Organization", NULL);
+
+ osxml_node_add(current, "Name", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(current, "Department", vformat_attribute_get_nth_value(attr, 1));
+
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ values = g_list_nth(values, 2);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Unit", retstr->str);
+ }
+ return current;
+}
+
+static xmlNode *handle_x_kde_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling X-KDE attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"KDE-Extension", NULL);
+ osxml_node_add(current, "ExtName", vformat_attribute_get_name(attr));
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static osync_bool init_kde_to_xml(void *input)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, input);
+
+ GHashTable *table = (GHashTable *)input;
+
+ g_hash_table_insert(table, "X-KADDRESSBOOK-CRYPTOENCRYPTPREF", handle_x_kde_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-CRYPTOPROTOPREF", handle_x_kde_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-CRYPTOSIGNPREF", handle_x_kde_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-OPENPGPFP", handle_x_kde_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-IMAddress", handle_x_kde_attribute);
+
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-ManagersName", handle_manager_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-AssistantsName", handle_assistant_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-Anniversary", handle_anniversary_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-Department", handle_department_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-Office", handle_office_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-Profession", handle_profession_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-X-SpousesName", handle_spouse_attribute);
+ g_hash_table_insert(table, "X-KADDRESSBOOK-BlogFeed", handle_blog_url_attribute);
+ g_hash_table_insert(table, "X-messaging/yahoo-All", handle_yahoo_attribute);
+ g_hash_table_insert(table, "X-messaging/icq-All", handle_icq_attribute);
+ g_hash_table_insert(table, "X-messaging/aim-All", handle_aim_attribute);
+ g_hash_table_insert(table, "X-messaging/xmpp-All", handle_jabber_attribute);
+ g_hash_table_insert(table, "X-messaging/msn-All", handle_msn_attribute);
+ g_hash_table_insert(table, "X-messaging/gadu-All", handle_gadu_attribute);
+ g_hash_table_insert(table, "X-messaging/irc-All", handle_irc_attribute);
+ g_hash_table_insert(table, "X-messaging/sms-All", handle_sms_attribute);
+
+ //Overwrite the organization hook
+ g_hash_table_insert(table, "ORG", handle_organization_attribute);
+
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+static osync_bool needs_encoding(const unsigned char *tmp, const char *encoding)
+{
+ int i = 0;
+ if (!strcmp(encoding, "QUOTED-PRINTABLE")) {
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127 || tmp[i] == 10 || tmp[i] == 13)
+ return TRUE;
+ i++;
+ }
+ } else {
+ return !g_utf8_validate((gchar*)tmp, -1, NULL);
+ }
+ return FALSE;
+}
+
+static osync_bool needs_charset(const unsigned char *tmp)
+{
+ int i = 0;
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127)
+ return TRUE;
+ i++;
+ }
+ return FALSE;
+}
+
+static void add_value_decoded(VFormatAttribute *attr, const char *value, const char *encoding)
+{
+ if (needs_charset((unsigned char*)value))
+ if (!vformat_attribute_has_param (attr, "CHARSET"))
+ vformat_attribute_add_param_with_value(attr, "CHARSET", "UTF-8");
+
+ if (needs_encoding((unsigned char*)value, encoding)) {
+ if (!vformat_attribute_has_param (attr, "ENCODING"))
+ vformat_attribute_add_param_with_value(attr, "ENCODING", encoding);
+ vformat_attribute_add_value_decoded(attr, value, strlen(value) + 1);
+ } else
+ vformat_attribute_add_value(attr, value);
+}
+
+static void add_value(VFormatAttribute *attr, xmlNode *parent, const char *name, const char *encoding)
+{
+ char *tmp = osxml_find_node(parent, name);
+ if (!tmp)
+ return;
+
+ add_value_decoded(attr, tmp, encoding);
+
+ g_free(tmp);
+}
+
+static VFormatAttribute *handle_xml_manager_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling manager xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-X-ManagersName");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_assistant_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling assistant xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-X-AssistantsName");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_anniversary_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling anniversary xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-X-Anniversary");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_spouse_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling spouse xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-X-SpousesName");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_blog_url_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling blog_url xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-BlogFeed");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_yahoo_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling yahoo xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/yahoo-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_icq_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling icq xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/icq-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_aim_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling aim xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/aim-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_jabber_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling jabber xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/xmpp-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_msn_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling msn xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/msn-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_organization_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling organization kde xml attribute");
+ VFormatAttribute *org = NULL;
+ VFormatAttribute *attr = NULL;
+
+ root = root->children;
+
+ int i = 0;
+ while (root) {
+ char *content = (char*)xmlNodeGetContent(root);
+ if (!strcmp((char*)root->name, "Name")) {
+ org = vformat_attribute_new(NULL, "ORG");
+ add_value_decoded(org, content, encoding);
+ vformat_add_attribute(vcard, org);
+ }
+
+ if (!strcmp((char*)root->name, "Department")) {
+ attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-X-Department");
+ vformat_attribute_add_value(attr, content);
+ vformat_add_attribute(vcard, attr);
+ }
+ if (!strcmp((char*)root->name, "Unit")) {
+ switch (i) {
+ case 0:
+ attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-X-Office");
+ vformat_attribute_add_value(attr, content);
+ vformat_add_attribute(vcard, attr);
+ break;
+ default:
+ vformat_attribute_add_value(org, content);
+ }
+ i++;
+ }
+
+ g_free(content);
+ root = root->next;
+ }
+
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_profession_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling profession xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-KADDRESSBOOK-X-Profession");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_gadu_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling msn xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/gadu-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_irc_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling msn xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/irc-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_sms_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling msn xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-messaging/sms-All");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_x_kde_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling msn xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, osxml_find_node(root, "ExtName"));
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static osync_bool init_xml_to_kde(void *input)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, input);
+
+ OSyncHookTables *hooks = (OSyncHookTables *)input;
+
+ g_hash_table_insert(hooks->attributes, "Manager", handle_xml_manager_attribute);
+ g_hash_table_insert(hooks->attributes, "Assistant", handle_xml_assistant_attribute);
+ g_hash_table_insert(hooks->attributes, "Anniversary", handle_xml_anniversary_attribute);
+ g_hash_table_insert(hooks->attributes, "Organization", handle_xml_organization_attribute);
+ g_hash_table_insert(hooks->attributes, "Profession", handle_xml_profession_attribute);
+ g_hash_table_insert(hooks->attributes, "Spouse", handle_xml_spouse_attribute);
+ g_hash_table_insert(hooks->attributes, "BlogUrl", handle_xml_blog_url_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-Yahoo", handle_xml_yahoo_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-ICQ", handle_xml_icq_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-AIM", handle_xml_aim_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-Jabber", handle_xml_jabber_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-MSN", handle_xml_msn_attribute);
+ g_hash_table_insert(hooks->attributes, "IM-GaduGadu", handle_xml_gadu_attribute);
+ g_hash_table_insert(hooks->attributes, "IRC", handle_xml_irc_attribute);
+ g_hash_table_insert(hooks->attributes, "SMS", handle_xml_sms_attribute);
+
+ g_hash_table_insert(hooks->attributes, "KDE-Extension", handle_xml_x_kde_attribute);
+ //Overwrite the uid and revision handler
+ g_hash_table_insert(hooks->attributes, "Uid", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->attributes, "Revision", HANDLE_IGNORE);
+
+ g_hash_table_insert(hooks->parameters, "Unit", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->parameters, "Name", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->parameters, "Department", HANDLE_IGNORE);
+
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "contact");
+ osync_env_register_objformat(env, "contact", "xml-contact");
+
+ osync_env_register_extension(env, "vcard21", "xml-contact", "kde", init_kde_to_xml);
+ osync_env_register_extension(env, "xml-contact", "vcard21", "kde", init_xml_to_kde);
+
+ osync_env_register_extension(env, "vcard30", "xml-contact", "kde", init_kde_to_xml);
+ osync_env_register_extension(env, "xml-contact", "vcard30", "kde", init_xml_to_kde);
+}
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.c b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.c
new file mode 100644
index 00000000..f1583bb8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.c
@@ -0,0 +1,406 @@
+/*
+ * xml - A plugin for xml objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync/opensync.h"
+#include "opensync/opensync_time_internals.h"
+#include "xml-support.h"
+#include <glib.h>
+
+static char *osxml_prepare_time(const char *content, xmlNode *node) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, content, node);
+
+ int tzoffset = 0;
+ char *time = NULL;
+ struct tm *ttm = NULL;
+
+
+ if (!osync_time_isutc(content)) {
+ time = osync_time_tzlocal2utc(node, (char *) node->name);
+ if (!time) {
+ ttm = osync_time_vtime2tm(content);
+ tzoffset = osync_time_timezone_diff(ttm);
+ time = osync_time_vtime2utc(content, tzoffset);
+ g_free(ttm);
+ }
+ }
+
+ if (!time)
+ time = g_strdup(content);
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, time);
+ return time;
+}
+
+static osync_bool osxml_compare_time(xmlNode *leftnode, xmlNode *rightnode) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s(%p), %s(%p))", __func__, leftnode->name, leftnode, rightnode->name, rightnode);
+ int ret = 0;
+ char *left = NULL, *right = NULL;
+ char *leftcontent = osxml_find_node(leftnode, "Content");
+ char *rightcontent = osxml_find_node(rightnode, "Content");
+
+ osync_trace(TRACE_SENSITIVE, "time compare - left: %s right: %s", leftcontent, rightcontent);
+
+ if (osync_time_isutc(leftcontent) != osync_time_isutc(rightcontent)) {
+ left = osxml_prepare_time(leftcontent, leftnode);
+ right = osxml_prepare_time(rightcontent, rightnode);
+
+ g_free(leftcontent);
+ g_free(rightcontent);
+
+ osync_trace(TRACE_SENSITIVE, "AFTER convert - left: %s right: %s", left, right);
+ } else {
+ left = leftcontent;
+ right = rightcontent;
+ }
+
+ ret = strcmp(left, right);
+
+ g_free(left);
+ g_free(right);
+
+ if (ret) {
+ osync_trace(TRACE_EXIT, "%s: FALSE", __func__);
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+
+}
+
+static osync_bool osxml_compare_node(xmlNode *leftnode, xmlNode *rightnode)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p:%s, %p:%s)", __func__, leftnode, leftnode->name, rightnode, rightnode->name);
+
+ if (strcmp((char*)leftnode->name, (char*)rightnode->name)) {
+ osync_trace(TRACE_EXIT, "%s: FALSE: Different Name", __func__);
+ return FALSE;
+ }
+
+ leftnode = leftnode->children;
+ rightnode = rightnode->children;
+ xmlNode *rightstartnode = rightnode;
+
+ if (!leftnode && !rightnode) {
+ osync_trace(TRACE_EXIT, "%s: TRUE. Both 0", __func__);
+ return TRUE;
+ }
+
+ if (!leftnode || !rightnode) {
+ osync_trace(TRACE_EXIT, "%s: FALSE. One 0", __func__);
+ return FALSE;
+ }
+
+ do {
+ if (!strcmp("UnknownParam", (char*)leftnode->name))
+ continue;
+ if (!strcmp("Order", (char*)leftnode->name))
+ continue;
+ rightnode = rightstartnode;
+ char *leftcontent = (char*)xmlNodeGetContent(leftnode);
+
+ do {
+ if (!strcmp("UnknownParam", (char*)rightnode->name))
+ continue;
+
+ osync_trace(TRACE_INTERNAL, "leftnode %s, rightnode %s", leftnode->name, rightnode->name);
+
+ /* Compare only nodes with same name. Skip if
+ * the names are different
+ */
+ if (xmlStrcmp(leftnode->name, rightnode->name))
+ continue;
+
+ char *rightcontent = (char*)xmlNodeGetContent(rightnode);
+
+ osync_trace(TRACE_SENSITIVE, "leftcontent %s, rightcontent %s\n", leftcontent, rightcontent);
+
+ if (leftcontent == rightcontent) {
+ g_free(rightcontent);
+ goto next;
+ }
+
+ /* We compare the striped content to work around bugs in
+ * applications like evo2 which always strip the content
+ * and would therefore cause conflicts. This change should not break
+ * anything since it does not touch the actual content */
+ char *strip_right = g_strstrip(g_strdup(rightcontent));
+ char *strip_left = g_strstrip(g_strdup(leftcontent));
+ if (!strcmp(strip_left, strip_right)) {
+ g_free(strip_right);
+ g_free(strip_left);
+ g_free(rightcontent);
+ goto next;
+ }
+ g_free(strip_right);
+ g_free(strip_left);
+
+ if (!leftcontent || !rightcontent) {
+ osync_trace(TRACE_EXIT, "%s: One is empty", __func__);
+ return FALSE;
+ }
+
+ /* Workaround for palm-sync. palm-sync is not able to set a correct Completed date-timestamp so ignore value (objtype: todo) */
+ if (!strcmp("Completed", (char*)rightnode->name) && !strcmp("Completed",(char*)leftnode->name)) {
+ if ((leftcontent && rightcontent) || (!leftcontent && !rightcontent)) {
+ osync_trace(TRACE_INTERNAL, "PALM-SYNC workaround active!");
+ g_free(rightcontent);
+ goto next;
+ }
+ }
+
+
+ g_free(rightcontent);
+
+ if ((!strcmp("DateStarted", (char*)rightnode->name) && !strcmp("DateStarted", (char*)leftnode->name))
+ || (!strcmp("DateEnd", (char*)rightnode->name) && !strcmp("DateEnd", (char*)leftnode->name))) {
+
+ if (osxml_compare_time(leftnode, rightnode))
+ goto next;
+ }
+
+ /* compare child nodes again .... */
+ if (rightnode->type == XML_ELEMENT_NODE && osxml_compare_node(rightnode, leftnode))
+ goto next;
+
+
+ } while ((rightnode = rightnode->next));
+ osync_trace(TRACE_EXIT, "%s: Could not match one", __func__);
+ g_free(leftcontent);
+ return FALSE;
+ next:;
+ g_free(leftcontent);
+ } while ((leftnode = leftnode->next));
+
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+OSyncConvCmpResult osxml_compare(xmlDoc *leftinpdoc, xmlDoc *rightinpdoc, OSyncXMLScore *scores, int default_score, int treshold)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, leftinpdoc, rightinpdoc, scores);
+ int z = 0, i = 0, n = 0;
+ int res_score = 0;
+
+ xmlDoc *leftdoc = xmlCopyDoc(leftinpdoc, TRUE);
+ xmlDoc *rightdoc = xmlCopyDoc(rightinpdoc, TRUE);
+
+ osync_trace(TRACE_INTERNAL, "Comparing given score list");
+ while (scores && scores[z].path) {
+ OSyncXMLScore *score = &scores[z];
+ z++;
+ xmlXPathObject *leftxobj = osxml_get_nodeset(leftdoc, score->path);
+ xmlXPathObject *rightxobj = osxml_get_nodeset(rightdoc, score->path);
+
+ xmlNodeSet *lnodes = leftxobj->nodesetval;
+ xmlNodeSet *rnodes = rightxobj->nodesetval;
+
+ int lsize = (lnodes) ? lnodes->nodeNr : 0;
+ int rsize = (rnodes) ? rnodes->nodeNr : 0;
+ osync_trace(TRACE_INTERNAL, "parsing next path %s", score->path);
+
+ if (!score->value) {
+ for (i = 0; i < lsize; i++) {
+ xmlUnlinkNode(lnodes->nodeTab[i]);
+ xmlFreeNode(lnodes->nodeTab[i]);
+ lnodes->nodeTab[i] = NULL;
+ }
+
+ for (n = 0; n < rsize; n++) {
+ xmlUnlinkNode(rnodes->nodeTab[n]);
+ xmlFreeNode(rnodes->nodeTab[n]);
+ rnodes->nodeTab[n] = NULL;
+ }
+ } else {
+ for (i = 0; i < lsize; i++) {
+ if (!lnodes->nodeTab[i])
+ continue;
+ for (n = 0; n < rsize; n++) {
+ if (!rnodes->nodeTab[n])
+ continue;
+ osync_trace(TRACE_INTERNAL, "cmp %i:%s (leftcontent), %i:%s (rightcontent)", i, lnodes->nodeTab[i]->name,
+ n, rnodes->nodeTab[n]->name);
+ osync_trace(TRACE_SENSITIVE, "cmp %i:%s (%s), %i:%s (%s)\n", i, lnodes->nodeTab[i]->name, osxml_find_node(lnodes->nodeTab[i],
+ "Content"), n, rnodes->nodeTab[n]->name, osxml_find_node(rnodes->nodeTab[n], "Content"));
+
+ /*
+ if ((!strcmp("DateStarted", lnodes->nodeTab[i]->name) && !strcmp("DateStarted", rnodes->nodeTab[n]->name))
+ || (!strcmp("DateEnd", lnodes->nodeTab[i]->name) && !strcmp("DateEnd", rnodes->nodeTab[n]->name))) {
+ */
+
+ if (osxml_compare_node(lnodes->nodeTab[i], rnodes->nodeTab[n])) {
+ osync_trace(TRACE_INTERNAL, "Adding %i for %s", score->value, score->path);
+ res_score += score->value;
+ xmlUnlinkNode(lnodes->nodeTab[i]);
+ xmlFreeNode(lnodes->nodeTab[i]);
+ lnodes->nodeTab[i] = NULL;
+ xmlUnlinkNode(rnodes->nodeTab[n]);
+ xmlFreeNode(rnodes->nodeTab[n]);
+ rnodes->nodeTab[n] = NULL;
+ goto next;
+ }
+ }
+ osync_trace(TRACE_INTERNAL, "Subtracting %i for %s", score->value, score->path);
+ res_score -= score->value;
+ next:;
+ }
+ for(i = 0; i < rsize; i++) {
+ if (!rnodes->nodeTab[i])
+ continue;
+ res_score -= score->value;
+ }
+ }
+
+ xmlXPathFreeObject(leftxobj);
+ xmlXPathFreeObject(rightxobj);
+ }
+
+ xmlXPathObject *leftxobj = osxml_get_nodeset(leftdoc, "/*/*");
+ xmlXPathObject *rightxobj = osxml_get_nodeset(rightdoc, "/*/*");
+
+ xmlNodeSet *lnodes = leftxobj->nodesetval;
+ xmlNodeSet *rnodes = rightxobj->nodesetval;
+
+ // Check if nodeTab actually exists (for example vnote stuff would crash otherwise...)
+ if (lnodes->nodeTab && rnodes->nodeTab) {
+ // WORKAROUND - FIXME
+ // if nodeTab[0] is an Event or Todo we need a new node structure (/*/*/*)
+
+ if ((!strcmp((char*)lnodes->nodeTab[0]->name, "Event") && \
+ !strcmp((char*)rnodes->nodeTab[0]->name, "Event")) || \
+ (!strcmp((char*)lnodes->nodeTab[0]->name, "Todo") && \
+ !strcmp((char*)rnodes->nodeTab[0]->name, "Todo"))) {
+
+ xmlXPathFreeObject(leftxobj);
+ xmlXPathFreeObject(rightxobj);
+
+ leftxobj = osxml_get_nodeset(leftdoc, "/*/*/*");
+ rightxobj = osxml_get_nodeset(rightdoc, "/*/*/*");
+
+ lnodes = leftxobj->nodesetval;
+ rnodes = rightxobj->nodesetval;
+
+ }
+ }
+
+ int lsize = (lnodes) ? lnodes->nodeNr : 0;
+ int rsize = (rnodes) ? rnodes->nodeNr : 0;
+
+ osync_trace(TRACE_INTERNAL, "Comparing remaining list");
+ osync_bool same = TRUE;
+ for(i = 0; i < lsize; i++) {
+ for (n = 0; n < rsize; n++) {
+ if (!rnodes->nodeTab[n])
+ continue;
+ osync_trace(TRACE_INTERNAL, "cmp %i:%s (leftcontent), %i:%s (rightcontent)", i, lnodes->nodeTab[i]->name,
+ n, rnodes->nodeTab[n]->name);
+ osync_trace(TRACE_SENSITIVE, "cmp %i:%s (%s), %i:%s (%s)\n", i, lnodes->nodeTab[i]->name, osxml_find_node(lnodes->nodeTab[i],
+ "Content"), n, rnodes->nodeTab[n]->name, osxml_find_node(rnodes->nodeTab[n], "Content"));
+
+ if ((!strcmp("DateStarted", (char *) lnodes->nodeTab[i]->name) && !strcmp("DateStarted", (char *) rnodes->nodeTab[n]->name))
+ || (!strcmp("DateEnd", (char *) lnodes->nodeTab[i]->name) && !strcmp("DateEnd", (char *) rnodes->nodeTab[n]->name))) {
+
+ if (osxml_compare_time(lnodes->nodeTab[i], rnodes->nodeTab[n])) {
+ xmlUnlinkNode(lnodes->nodeTab[i]);
+ xmlFreeNode(lnodes->nodeTab[i]);
+ lnodes->nodeTab[i] = NULL;
+ xmlUnlinkNode(rnodes->nodeTab[n]);
+ xmlFreeNode(rnodes->nodeTab[n]);
+ rnodes->nodeTab[n] = NULL;
+ osync_trace(TRACE_INTERNAL, "Adding %i", default_score);
+ res_score += default_score;
+ goto next2;
+ }
+ }
+
+ if (osxml_compare_node(lnodes->nodeTab[i], rnodes->nodeTab[n])) {
+ xmlUnlinkNode(lnodes->nodeTab[i]);
+ xmlFreeNode(lnodes->nodeTab[i]);
+ lnodes->nodeTab[i] = NULL;
+ xmlUnlinkNode(rnodes->nodeTab[n]);
+ xmlFreeNode(rnodes->nodeTab[n]);
+ rnodes->nodeTab[n] = NULL;
+ osync_trace(TRACE_INTERNAL, "Adding %i", default_score);
+ res_score += default_score;
+ goto next2;
+ }
+ }
+ osync_trace(TRACE_INTERNAL, "Subtracting %i", default_score);
+ res_score -= default_score;
+
+ // XXX Find a better way to workaroudn the problem of ignoring without unlinking nodes.
+ if (!strcmp("Timezone", (char *) lnodes->nodeTab[i]->name))
+ osync_trace(TRACE_INTERNAL, "Workaround for Timezone field. We ignore it but don't unlink it from XML");
+ else
+ same = FALSE;
+
+ //goto out;
+ next2:;
+ }
+
+ for(i = 0; i < lsize; i++) {
+ if (!lnodes->nodeTab[i])
+ continue;
+ osync_trace(TRACE_INTERNAL, "left remaining: %s", lnodes->nodeTab[i]->name);
+
+ // XXX Find a better way to workaroudn the problem of ignoring without unlinking nodes.
+ if (!strcmp("Timezone", (char *) lnodes->nodeTab[i]->name))
+ osync_trace(TRACE_INTERNAL, "Workaround for Timezone field. We ignore it but don't unlink it from XML");
+ else
+ same = FALSE;
+
+ goto out;
+ }
+
+ for(i = 0; i < rsize; i++) {
+ if (!rnodes->nodeTab[i])
+ continue;
+ osync_trace(TRACE_INTERNAL, "right remaining: %s", rnodes->nodeTab[i]->name);
+
+ // XXX Find a better way to workaroudn the problem of ignoring without unlinking nodes.
+ if (!strcmp("Timezone", (char *) rnodes->nodeTab[i]->name))
+ osync_trace(TRACE_INTERNAL, "Workaround for Timezone field. We ignore it but don't unlink it from XML");
+ else
+ same = FALSE;
+
+ goto out;
+ }
+ out:
+ xmlXPathFreeObject(leftxobj);
+ xmlXPathFreeObject(rightxobj);
+
+ xmlFreeDoc(leftdoc);
+ xmlFreeDoc(rightdoc);
+
+ osync_trace(TRACE_INTERNAL, "Result is: %i, Treshold is: %i", res_score, treshold);
+ if (same) {
+ osync_trace(TRACE_EXIT, "%s: SAME", __func__);
+ return CONV_DATA_SAME;
+ }
+ if (res_score >= treshold) {
+ osync_trace(TRACE_EXIT, "%s: SIMILAR", __func__);
+ return CONV_DATA_SIMILAR;
+ }
+ osync_trace(TRACE_EXIT, "%s: MISMATCH", __func__);
+ return CONV_DATA_MISMATCH;
+}
+
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.h b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.h
new file mode 100644
index 00000000..bf457cb1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-support.h
@@ -0,0 +1,29 @@
+#ifndef _XML_SUPPORT_H
+#define _XML_SUPPORT_H
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+
+#include <opensync/opensync.h>
+#include <opensync/opensync_xml.h>
+#include <string.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef struct OSyncXMLScore {
+ int value;
+ const char *path;
+} OSyncXMLScore;
+
+OSyncConvCmpResult osxml_compare(xmlDoc *leftinpdoc, xmlDoc *rightinpdoc, OSyncXMLScore *scores, int default_score, int treshold);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _XML_SUPPORT_H
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.c b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.c
new file mode 100644
index 00000000..5328fee2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.c
@@ -0,0 +1,2547 @@
+/*
+ * xml-vcard - A plugin for parsing vcard objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+#include "vformat.h"
+#include "vcalical.h"
+#include "xml-vcal.h"
+#include <glib.h>
+
+/*TODO: replace all g_hash_table_insert by functions with well-defined-type parameters
+ * (like insert_xml_attr_handler() and insert_attr_handler()) */
+
+/*TODO: Refactor this and other xml-*.c code, to put all common code in the same place */
+
+typedef xmlNode *(* vattr_handler_t)(xmlNode *, VFormatAttribute *);
+typedef VFormatAttribute *(* xml_attr_handler_t)(VFormat *vcard, xmlNode *root, const char *encoding);
+
+static void handle_unknown_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown parameter %s", vformat_attribute_param_get_name(param));
+ xmlNode *property = xmlNewTextChild(current, NULL, (xmlChar*)"UnknownParam",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+ osxml_node_add(property, "ParamName", vformat_attribute_param_get_name(param));
+}
+
+static void handle_tzid_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzid parameter");
+ xmlNewTextChild(current, NULL, (xmlChar*)"TimezoneID",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_value_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"Value",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_altrep_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"AlternateRep",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_cn_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"CommonName",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_delegated_from_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"DelegatedFrom",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_delegated_to_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"DelegatedTo",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_dir_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"Directory",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_format_type_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"FormaType",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_fb_type_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"FreeBusyType",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_member_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"Member",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_partstat_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"PartStat",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_range_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"Range",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_related_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"Related",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_reltype_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"RelationType",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_role_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"Role",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_rsvp_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"RSVP",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_sent_by_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"SentBy",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static void handle_status_parameter(xmlNode *current, VFormatParam *param)
+{
+ xmlNewTextChild(current, NULL, (xmlChar*)"Status",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static xmlNode *handle_unknown_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown attribute %s", vformat_attribute_get_name(attr));
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"UnknownNode", NULL);
+ osxml_node_add(current, "NodeName", vformat_attribute_get_name(attr));
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Content", retstr->str);
+ }
+ return current;
+}
+
+static xmlNode *handle_prodid_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling prodid attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"ProductID", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_method_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling method attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Method", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_dtstamp_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling dtstamp attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"DateCalendarCreated", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_percent_complete_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling percent complete attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"PercentComplete", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_created_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ const char *tmp;
+ char *timestamp;
+ osync_trace(TRACE_INTERNAL, "Handling created attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"DateCreated", NULL);
+ tmp = vformat_attribute_get_nth_value(attr, 0);
+ timestamp = osync_time_timestamp(tmp);
+ osxml_node_add(current, "Content", timestamp);
+ g_free(timestamp);
+ return current;
+}
+
+static xmlNode *handle_dtstart_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ const char *tmp;
+ char *timestamp;
+ osync_trace(TRACE_INTERNAL, "Handling dtstart attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"DateStarted", NULL);
+ tmp = vformat_attribute_get_nth_value(attr, 0);
+ timestamp = osync_time_timestamp(tmp);
+ osxml_node_add(current, "Content", timestamp);
+ g_free(timestamp);
+ return current;
+}
+
+static xmlNode *handle_rrule_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling rrule attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"RecurrenceRule", NULL);
+
+ GList *values = NULL;
+ osync_bool interval_isset = FALSE;
+ GString *retstr = NULL;
+
+ values = vformat_attribute_get_values_decoded(attr);
+
+ for (; values; values = values->next) {
+ retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Rule", retstr->str);
+ if (strstr(retstr->str, "INTERVAL"))
+ interval_isset = TRUE;
+ }
+
+ if (!interval_isset)
+ osxml_node_add(current, "Rule", "INTERVAL=1");
+
+ return current;
+}
+
+static xmlNode *handle_vcal_rrule_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling rrule attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"RecurrenceRule", NULL);
+
+ GList *values = NULL;
+
+ const char *rrule = vformat_attribute_get_nth_value(attr, 0);
+ values = conv_vcal2ical_rrule(rrule);
+
+ for (; values; values = values->next) {
+ osxml_node_add(current, "Rule", (char *) values->data);
+ }
+
+ g_list_free(values);
+
+ return current;
+}
+
+static xmlNode *handle_vcal_transp_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling transp attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Transparency", NULL);
+
+ const char *transp = vformat_attribute_get_nth_value(attr, 0);
+
+ if (atoi(transp) > 0)
+ osxml_node_add(current, "Content", "OPAQUE");
+ else
+ osxml_node_add(current, "Content", "TRANSPARENT");
+
+
+ return current;
+}
+
+static xmlNode *handle_aalarm_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling aalarm attribute");
+
+ time_t started, alarm;
+ char *dtstarted = NULL, *duration = NULL;
+ xmlNode *dtstartNode = NULL, *sub = NULL;
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Alarm", NULL);
+
+ osxml_node_add(current, "AlarmAction", "AUDIO");
+ osxml_node_add(current, "AlarmDescription", vformat_attribute_get_nth_value(attr, 1));
+
+ /*
+ osxml_node_add(current, "AlarmDuration", vformat_attribute_get_nth_value(attr, 1));
+ osxml_node_add(current, "AlarmRepeat", vformat_attribute_get_nth_value(attr, 2));
+ */
+
+ sub = xmlNewTextChild(current, NULL, (xmlChar*) "AlarmTrigger", NULL);
+
+ // get timestamp of DateStarted or DateDue (for todos)
+ if ((dtstartNode = osxml_get_node(root, "DateDue"))) {
+ dtstarted = osxml_find_node(dtstartNode, "Content");
+ } else if (( dtstartNode = osxml_get_node(root, "DateStarted"))) {
+ dtstarted = osxml_find_node(dtstartNode, "Content");
+ }
+
+ /* TODO: This breaks the case if a localtime stamp + tzid
+ get synced to a vcal. This means that the alarm duration
+ _CAN_ be wrong when dtstarted is localtime and alarm is not localtime.
+
+ FIXME */
+
+ if (dtstarted) {
+ started = osync_time_vtime2unix(dtstarted, 0);
+ g_free(dtstarted);
+
+ alarm = osync_time_vtime2unix(vformat_attribute_get_nth_value(attr, 0), 0);
+
+ // convert offset in seconds to alarm duration
+ duration = osync_time_sec2alarmdu(alarm - started);
+ osxml_node_add(sub, "Content", duration);
+ osxml_node_add(sub, "Value", "DURATION");
+ osxml_node_add(sub, "Related", "START");
+ g_free(duration);
+
+
+ /* This happens only if a todo has a AALARM without any DateDue and DateStarted field.
+ (This was found on a old SE mobile phone and is illegal.) */
+ } else {
+ osxml_node_add(sub, "Content", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(sub, "Value", "DATE-TIME");
+ }
+
+ return current;
+}
+
+static xmlNode *handle_dalarm_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling dalarm attribute");
+
+ time_t started, alarm;
+ char *dtstarted = NULL, *duration = NULL;
+ xmlNode *dtstartNode = NULL, *sub = NULL;
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Alarm", NULL);
+
+ osxml_node_add(current, "AlarmDescription", vformat_attribute_get_nth_value(attr, 1));
+ /*
+ osxml_node_add(current, "AlarmDuration", vformat_attribute_get_nth_value(attr, 1));
+ osxml_node_add(current, "AlarmRepeat", vformat_attribute_get_nth_value(attr, 2));
+ */
+
+ osxml_node_add(current, "AlarmAction", "DISPLAY");
+
+ sub = xmlNewTextChild(current, NULL, (xmlChar*) "AlarmTrigger", NULL);
+
+ // get timestamp of DateStarted or DateDue (for todos)
+ if ((dtstartNode = osxml_get_node(root, "DateDue"))) {
+ dtstarted = osxml_find_node(dtstartNode, "Content");
+ } else if (( dtstartNode = osxml_get_node(root, "DateStarted"))) {
+ dtstarted = osxml_find_node(dtstartNode, "Content");
+ }
+
+ /* TODO: This breaks the case if a localtime stamp + tzid
+ get synced to a vcal. This means that the alarm duration
+ _CAN_ be wrong when dtstarted is localtime and alarm is not localtime.
+
+ FIXME */
+
+ if (dtstarted) {
+ started = osync_time_vtime2unix(dtstarted, 0);
+ g_free(dtstarted);
+
+ alarm = osync_time_vtime2unix(vformat_attribute_get_nth_value(attr, 0), 0);
+
+ // convert offset in seconds to alarm duration
+ duration = osync_time_sec2alarmdu(alarm - started);
+ osxml_node_add(sub, "Content", duration);
+ osxml_node_add(sub, "Value", "DURATION");
+ osxml_node_add(sub, "Related", "START");
+ g_free(duration);
+
+
+ /* This happens only if a todo has a AALARM without any DateDue and DateStarted field.
+ (This was found on a old SE mobile phone and is illegal.) */
+ } else {
+ osxml_node_add(sub, "Content", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(sub, "Value", "DATE-TIME");
+ }
+
+
+ return current;
+}
+
+static xmlNode *handle_description_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling description attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Description", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_summary_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling summary attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Summary", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_categories_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Categories attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Categories", NULL);
+
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Category", retstr->str);
+ }
+
+ return current;
+}
+
+static xmlNode *handle_class_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Class attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Class", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_due_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ const char *tmp;
+ char *timestamp = NULL;
+ osync_trace(TRACE_INTERNAL, "Handling due attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"DateDue", NULL);
+ tmp = vformat_attribute_get_nth_value(attr, 0);
+ timestamp = osync_time_timestamp(tmp);
+ osxml_node_add(current, "Content", timestamp);
+ g_free(timestamp);
+ return current;
+}
+
+static xmlNode *handle_url_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Url attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Url", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_priority_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling priority attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Priority", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_sequence_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling sequence attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Sequence", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_last_modified_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"LastModified", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_rdate_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"RecurrenceDate", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_location_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Location", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_geo_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling geo attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Geo", NULL);
+ osxml_node_add(current, "Latitude", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(current, "Longitude", vformat_attribute_get_nth_value(attr, 1));
+ return current;
+}
+
+static xmlNode *handle_completed_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Completed", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_organizer_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Organizer", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_recurid_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"RecurrenceID", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_status_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Status", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_duration_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Duration", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_attach_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Attach", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_attendee_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Attendee", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_contact_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Contact", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_exdate_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = NULL;
+ char *datestamp = NULL;
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ current = xmlNewTextChild(root, NULL, (xmlChar*)"ExclusionDate", NULL);
+ if (!osync_time_isdate(retstr->str)) {
+ datestamp = osync_time_datestamp(retstr->str);
+ } else {
+ datestamp = g_strdup(retstr->str);
+ }
+ osxml_node_add(current, "Content", datestamp);
+
+ if (!osync_time_isdate(retstr->str))
+ osxml_node_add(current, "Value", "DATE");
+
+ g_free(datestamp);
+ g_string_free(retstr, TRUE);
+ }
+
+ return current;
+}
+
+static xmlNode *handle_exrule_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"ExclusionRule", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_rstatus_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"RStatus", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_related_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Related", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_resources_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Resources", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_dtend_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ char *timestamp;
+ const char *tmp;
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"DateEnd", NULL);
+ tmp = vformat_attribute_get_nth_value(attr, 0);
+ timestamp = osync_time_timestamp(tmp);
+ osxml_node_add(current, "Content", timestamp);
+ g_free(timestamp);
+ return current;
+}
+
+static xmlNode *handle_transp_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Transparency", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_calscale_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"CalendarScale", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_tzid_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzid attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"TimezoneID",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tz_location_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tz location attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"Location",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tzoffsetfrom_location_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzoffsetfrom attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"TZOffsetFrom",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tzoffsetto_location_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzoffsetto attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"TZOffsetTo",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tzname_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzname attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"TimezoneName",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tzdtstart_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"DateStarted",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tzrrule_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzrrule attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"RecurrenceRule", NULL);
+
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Rule", retstr->str);
+ }
+
+ return current;
+}
+
+static xmlNode *handle_tz_last_modified_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"LastModified",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tzurl_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"TimezoneUrl",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_tzrdate_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"TimezoneDate",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_atrigger_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"AlarmTrigger", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_arepeat_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"AlarmRepeat",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_aduration_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"AlarmDuration",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_aaction_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"AlarmAction",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_aattach_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"AlarmAttach",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_adescription_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"AlarmDescription",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_aattendee_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"AlarmAttendee",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static xmlNode *handle_asummary_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling tzdtstart attribute");
+ return xmlNewTextChild(root, NULL, (xmlChar*)"AlarmSummary",
+ (xmlChar*)vformat_attribute_get_nth_value(attr, 0));
+}
+
+static void vcard_handle_parameter(GHashTable *hooks, xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, hooks, current, param);
+
+ //Find the handler for this parameter
+ void (* param_handler)(xmlNode *, VFormatParam *);
+ char *paramname = g_strdup_printf("%s=%s", vformat_attribute_param_get_name(param), vformat_attribute_param_get_nth_value(param, 0));
+ param_handler = g_hash_table_lookup(hooks, paramname);
+ g_free(paramname);
+ if (!param_handler)
+ param_handler = g_hash_table_lookup(hooks, vformat_attribute_param_get_name(param));
+
+ if (param_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+
+ if (param_handler)
+ param_handler(current, param);
+ else
+ handle_unknown_parameter(current, param);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void vcal_handle_attribute(GHashTable *table, GHashTable *paramtable, xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, table, root, attr, attr ? vformat_attribute_get_name(attr) : "None");
+ xmlNode *current = NULL;
+
+ //Dont add empty stuff
+ GList *v;
+ for (v = vformat_attribute_get_values(attr); v; v = v->next) {
+ char *value = v->data;
+ if (strlen(value) != 0)
+ goto has_value;
+ }
+ osync_trace(TRACE_EXIT, "%s: No values", __func__);
+ return;
+
+has_value:;
+
+ //We need to find the handler for this attribute
+ vattr_handler_t attr_handler = g_hash_table_lookup(table, vformat_attribute_get_name(attr));
+ osync_trace(TRACE_INTERNAL, "Hook is: %p", attr_handler);
+ if (attr_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+ if (attr_handler)
+ current = attr_handler(root, attr);
+ else
+ current = handle_unknown_attribute(root, attr);
+
+ //Handle all parameters of this attribute
+ GList *params = vformat_attribute_get_params(attr);
+ GList *p = NULL;
+ for (p = params; p; p = p->next) {
+ VFormatParam *param = p->data;
+ vcard_handle_parameter(paramtable, current, param);
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void vcal_parse_attributes(OSyncHooksTable *hooks, GHashTable *table, GHashTable *paramtable, GList **attributes, xmlNode *root)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, attributes, root);
+
+ GList *a = NULL;
+ for (a = *attributes; a; a = a->next) {
+ VFormatAttribute *attr = a->data;
+
+ if (!strcmp(vformat_attribute_get_name(attr), "BEGIN")) {
+ //Handling supcomponent
+ a = a->next;
+ if (!strcmp(vformat_attribute_get_nth_value(attr, 0), "VTIMEZONE")) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Timezone", NULL);
+ vcal_parse_attributes(hooks, hooks->tztable, hooks->tztable, &a, current);
+ } else if (!strcmp(vformat_attribute_get_nth_value(attr, 0), "DAYLIGHT")) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"DaylightSavings", NULL);
+ vcal_parse_attributes(hooks, hooks->tztable, hooks->tztable, &a, current);
+ } else if (!strcmp(vformat_attribute_get_nth_value(attr, 0), "STANDARD")) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Standard", NULL);
+ vcal_parse_attributes(hooks, hooks->tztable, hooks->tztable, &a, current);
+ } else if (!strcmp(vformat_attribute_get_nth_value(attr, 0), "VTODO")) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Todo", NULL);
+ vcal_parse_attributes(hooks, hooks->comptable, hooks->compparamtable, &a, current);
+ } else if (!strcmp(vformat_attribute_get_nth_value(attr, 0), "VEVENT")) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Event", NULL);
+ vcal_parse_attributes(hooks, hooks->comptable, hooks->compparamtable, &a, current);
+ } else if (!strcmp(vformat_attribute_get_nth_value(attr, 0), "VJOURNAL")) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Journal", NULL);
+ vcal_parse_attributes(hooks, hooks->comptable, hooks->compparamtable, &a, current);
+ } else if (!strcmp(vformat_attribute_get_nth_value(attr, 0), "VALARM")) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Alarm", NULL);
+ vcal_parse_attributes(hooks, hooks->alarmtable, hooks->alarmtable, &a, current);
+ }
+ } else if (!strcmp(vformat_attribute_get_name(attr), "END")) {
+ osync_trace(TRACE_EXIT, "%s: Found END", __func__);
+ *attributes = a;
+ return;
+ } else
+ vcal_handle_attribute(table, paramtable, root, attr);
+ }
+ osync_trace(TRACE_EXIT, "%s: Done", __func__);
+}
+
+static osync_bool conv_vcal_to_xml(void *conv_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, conv_data, input, inpsize, output, outpsize, free_input, error);
+
+ OSyncHooksTable *hooks = (OSyncHooksTable *)conv_data;
+
+ osync_trace(TRACE_SENSITIVE, "Input vcal is:\n%s", input);
+
+ /* The input is not null-terminated, but vformat_new_from_string() expects a null-terminated string */
+ char *input_str = g_malloc(inpsize + 1);
+ memcpy(input_str, input, inpsize);
+ input_str[inpsize] = '\0';
+
+ //Parse the vcard
+ VFormat *vcal = vformat_new_from_string(input_str);
+ g_free(input_str);
+
+ osync_trace(TRACE_INTERNAL, "Creating xml doc");
+
+ //Create a new xml document
+ xmlDoc *doc = xmlNewDoc((xmlChar*)"1.0");
+ xmlNode *root = osxml_node_add_root(doc, "vcal");
+
+ osync_trace(TRACE_INTERNAL, "parsing attributes");
+
+ //For every attribute we have call the handling hook
+ GList *attributes = vformat_get_attributes(vcal);
+ vcal_parse_attributes(hooks, hooks->table, hooks->table, &attributes, root);
+
+ xmlChar *str = osxml_write_to_string(doc);
+ osync_trace(TRACE_SENSITIVE, "Output XML is:\n%s", str);
+ xmlFree(str);
+
+ *free_input = TRUE;
+ *output = (char *)doc;
+ *outpsize = sizeof(doc);
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+static osync_bool needs_encoding(const unsigned char *tmp, const char *encoding)
+{
+ int i = 0;
+ if (!strcmp(encoding, "QUOTED-PRINTABLE")) {
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127 || tmp[i] == 10 || tmp[i] == 13)
+ return TRUE;
+ i++;
+ }
+ } else {
+ return !g_utf8_validate((gchar*)tmp, -1, NULL);
+ }
+ return FALSE;
+}
+
+static osync_bool needs_charset(const unsigned char *tmp)
+{
+ int i = 0;
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127)
+ return TRUE;
+ i++;
+ }
+ return FALSE;
+}
+
+static void add_value(VFormatAttribute *attr, xmlNode *parent, const char *name, const char *encoding)
+{
+ char *tmp = NULL;
+ if (!name)
+ tmp = (char*)xmlNodeGetContent(parent);
+ else
+ tmp = osxml_find_node(parent, name);
+
+ if (!tmp)
+ return;
+
+ if (needs_charset((unsigned char*)tmp))
+ if (!vformat_attribute_has_param (attr, "CHARSET"))
+ vformat_attribute_add_param_with_value(attr, "CHARSET", "UTF-8");
+
+ if (encoding && needs_encoding((unsigned char*)tmp, encoding)) {
+ if (!vformat_attribute_has_param (attr, "ENCODING"))
+ vformat_attribute_add_param_with_value(attr, "ENCODING", encoding);
+ vformat_attribute_add_value_decoded(attr, tmp, strlen(tmp) + 1);
+ } else
+ vformat_attribute_add_value(attr, tmp);
+ g_free(tmp);
+}
+
+static void xml_handle_unknown_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown xml parameter %s", current->name);
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, (char*)current->name, content);
+ g_free(content);
+}
+
+static void handle_xml_category_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_value(attr, content);
+ g_free(content);
+}
+
+static void handle_xml_rule_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_value(attr, content);
+ g_free(content);
+}
+
+static void handle_xml_value_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "VALUE", content);
+ g_free(content);
+}
+
+static void handle_xml_altrep_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "ALTREP", content);
+ g_free(content);
+}
+
+static void handle_xml_cn_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "CN", content);
+ g_free(content);
+}
+
+static void handle_xml_delegated_from_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "DELEGATED-FROM", content);
+ g_free(content);
+}
+
+static void handle_xml_delegated_to_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "DELEGATED-TO", content);
+ g_free(content);
+}
+
+static void handle_xml_dir_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "DIR", content);
+ g_free(content);
+}
+
+static void handle_xml_format_type_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "FMTTYPE", content);
+ g_free(content);
+}
+
+static void handle_xml_fb_type_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "FBTYPE", content);
+ g_free(content);
+}
+
+static void handle_xml_member_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "MEMBER", content);
+ g_free(content);
+}
+
+static void handle_xml_partstat_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "PARTSTAT", content);
+ g_free(content);
+}
+
+static void handle_xml_range_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "RANGE", content);
+ g_free(content);
+}
+
+static void handle_xml_reltype_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "RELTYPE", content);
+ g_free(content);
+}
+
+static void handle_xml_related_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "RELATED", content);
+ g_free(content);
+}
+
+static void handle_xml_role_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "ROLE", content);
+ g_free(content);
+}
+
+static void handle_xml_rsvp_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "RSVP", content);
+ g_free(content);
+}
+
+static void handle_xml_sent_by_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "SENT-BY", content);
+ g_free(content);
+}
+
+static VFormatAttribute *xml_handle_unknown_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown xml attribute %s", root->name);
+ char *name = osxml_find_node(root, "NodeName");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, name);
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_prodid_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling prodid xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "PRODID");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_method_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling method xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "METHOD");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_geo_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling location xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "GEO");
+ add_value(attr, root, "Latitude", encoding);
+ add_value(attr, root, "Longitude", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_url_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling url xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "URL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_uid_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling uid xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "UID");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_class_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling class xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CLASS");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_categories_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling categories xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CATEGORIES");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static void xml_vcard_handle_parameter(GHashTable *table, VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, table, attr, current, current ? (char *)current->name : "None");
+
+ //Find the handler for this parameter
+ void (* xml_param_handler)(VFormatAttribute *attr, xmlNode *);
+ char *content = (char*)xmlNodeGetContent(current);
+ char *paramname = g_strdup_printf("%s=%s", current->name, content);
+ g_free(content);
+ xml_param_handler = g_hash_table_lookup(table, paramname);
+ g_free(paramname);
+ if (!xml_param_handler)
+ xml_param_handler = g_hash_table_lookup(table, current->name);
+
+ if (xml_param_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+
+ if (xml_param_handler)
+ xml_param_handler(attr, current);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void xml_vcal_handle_attribute(GHashTable *table, VFormat *vcard, xmlNode *root)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, table, vcard, root, root ? (char *)root->name : "None");
+ VFormatAttribute *attr = NULL;
+
+ //We need to find the handler for this attribute
+ xml_attr_handler_t xml_attr_handler = g_hash_table_lookup(table, root->name);
+ osync_trace(TRACE_INTERNAL, "xml hook is: %p", xml_attr_handler);
+ if (xml_attr_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+ if (xml_attr_handler)
+ /*FIXME: What the encoding parameter is supposed to be. Is it necessary? */
+ attr = xml_attr_handler(vcard, root, NULL);
+ else {
+ osync_trace(TRACE_EXIT, "%s: Ignored2", __func__);
+ return;
+ }
+
+ //Handle all parameters of this attribute
+ xmlNode *child = root->xmlChildrenNode;
+ while (child) {
+ xml_vcard_handle_parameter(table, attr, child);
+ child = child->next;
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static OSyncConvCmpResult compare_vevent(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, leftchange, rightchange);
+
+ OSyncXMLScore score[] =
+ {
+ {10, "/vcal/Event/StartTime"},
+ {10, "/vcal/Event/EndTime"},
+ {100, "/vcal/Event/Summary"},
+ {0, "/vcal/Event/Uid"},
+ {0, "/vcal/Event/Revision"},
+ {0, "/vcal/Event/DateCalendarCreated"},
+ {0, "/vcal/Event/DateCreated"},
+ {0, "/vcal/Event/LastModified"},
+ {0, "/vcal/Event/Sequence"},
+ {0, "/vcal/Event/Class[Content = \"PUBLIC\"]"},
+ {0, "/vcal/Event/Priority"},
+ {0, "/vcal/Event/Transparency[Content = \"OPAQUE\"]"},
+ {0, "/vcal/Method"},
+// {0, "/vcal/Timezone"},
+ {0, NULL}
+ };
+
+ OSyncConvCmpResult ret = osxml_compare((xmlDoc*)osync_change_get_data(leftchange), (xmlDoc*)osync_change_get_data(rightchange), score, 0, 99);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, ret);
+ return ret;
+}
+
+static OSyncConvCmpResult compare_vtodo(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, leftchange, rightchange);
+
+ OSyncXMLScore score[] =
+ {
+ {100, "/vcal/Todo/Summary"},
+ {0, "/vcal/Todo/Uid"},
+ {0, "/vcal/Todo/Revision"},
+ {0, "/vcal/Todo/DateCalendarCreated"},
+ {0, "/vcal/Todo/DateCreated"},
+ {0, "/vcal/Todo/LastModified"},
+ {0, "/vcal/Todo/Sequence"},
+ {0, "/vcal/Todo/Class[Content = \"PUBLIC\"]"},
+ {0, "/vcal/Todo/Priority"},
+ // ignore 'PercentComplete', because we aren't able to handle this at the moment
+ {0, "/vcal/Todo/PercentComplete"},
+ {0, "/vcal/Method"},
+// {0, "/vcal/Timezone"},
+ {0, NULL}
+ };
+
+ OSyncConvCmpResult ret = osxml_compare((xmlDoc*)osync_change_get_data(leftchange), (xmlDoc*)osync_change_get_data(rightchange), score, 0, 99);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, ret);
+ return ret;
+}
+
+static char *print_vcal(OSyncChange *change)
+{
+ xmlDoc *doc = (xmlDoc *)osync_change_get_data(change);
+
+ return (char *)osxml_write_to_string(doc);
+}
+
+static void destroy_xml(char *data, size_t size)
+{
+ xmlFreeDoc((xmlDoc *)data);
+}
+
+static void insert_attr_handler(GHashTable *table, const char *attrname, vattr_handler_t handler)
+{
+ g_hash_table_insert(table, (gpointer)attrname, handler);
+}
+
+static void *init_ical_to_xml(void)
+{
+ osync_trace(TRACE_ENTRY, "%s", __func__);
+ OSyncHooksTable *hooks = g_malloc0(sizeof(OSyncHooksTable));
+
+ hooks->table = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->tztable = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->comptable = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->compparamtable = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->alarmtable = g_hash_table_new(g_str_hash, g_str_equal);
+
+ //todo attributes
+ insert_attr_handler(hooks->comptable, "BEGIN", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "END", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "UID", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "X-IRMC-LUID", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "X-SONYERICSSON-DST", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "DTSTAMP", handle_dtstamp_attribute);
+ insert_attr_handler(hooks->comptable, "DESCRIPTION", handle_description_attribute);
+ insert_attr_handler(hooks->comptable, "SUMMARY", handle_summary_attribute);
+ insert_attr_handler(hooks->comptable, "DUE", handle_due_attribute);
+ insert_attr_handler(hooks->comptable, "DTSTART", handle_dtstart_attribute);
+ insert_attr_handler(hooks->comptable, "PERCENT-COMPLETE", handle_percent_complete_attribute);
+ insert_attr_handler(hooks->comptable, "CLASS", handle_class_attribute);
+ insert_attr_handler(hooks->comptable, "CATEGORIES", handle_categories_attribute);
+ insert_attr_handler(hooks->comptable, "PRIORITY", handle_priority_attribute);
+ insert_attr_handler(hooks->comptable, "URL", handle_url_attribute);
+ insert_attr_handler(hooks->comptable, "SEQUENCE", handle_sequence_attribute);
+ insert_attr_handler(hooks->comptable, "LAST-MODIFIED", handle_last_modified_attribute);
+ insert_attr_handler(hooks->comptable, "CREATED", handle_created_attribute);
+ insert_attr_handler(hooks->comptable, "DCREATED", handle_created_attribute);
+ insert_attr_handler(hooks->comptable, "RRULE", handle_rrule_attribute);
+
+ insert_attr_handler(hooks->comptable, "RDATE", handle_rdate_attribute);
+ insert_attr_handler(hooks->comptable, "LOCATION", handle_location_attribute);
+ insert_attr_handler(hooks->comptable, "GEO", handle_geo_attribute);
+ insert_attr_handler(hooks->comptable, "COMPLETED", handle_completed_attribute);
+ insert_attr_handler(hooks->comptable, "ORGANIZER", handle_organizer_attribute);
+ insert_attr_handler(hooks->comptable, "ORGANIZER", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "X-ORGANIZER", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "RECURRENCE-ID", handle_recurid_attribute);
+ insert_attr_handler(hooks->comptable, "STATUS", handle_status_attribute);
+ insert_attr_handler(hooks->comptable, "DURATION", handle_duration_attribute);
+ insert_attr_handler(hooks->comptable, "ATTACH", handle_attach_attribute);
+ insert_attr_handler(hooks->comptable, "ATTENDEE", handle_attendee_attribute);
+ insert_attr_handler(hooks->comptable, "COMMENT", HANDLE_IGNORE);
+ insert_attr_handler(hooks->comptable, "CONTACT", handle_contact_attribute);
+ insert_attr_handler(hooks->comptable, "EXDATE", handle_exdate_attribute);
+ insert_attr_handler(hooks->comptable, "EXRULE", handle_exrule_attribute);
+ insert_attr_handler(hooks->comptable, "RSTATUS", handle_rstatus_attribute);
+ insert_attr_handler(hooks->comptable, "RELATED-TO", handle_related_attribute);
+ insert_attr_handler(hooks->comptable, "RESOURCES", handle_resources_attribute);
+ insert_attr_handler(hooks->comptable, "DTEND", handle_dtend_attribute);
+ insert_attr_handler(hooks->comptable, "TRANSP", handle_transp_attribute);
+ insert_attr_handler(hooks->comptable, "X-LIC-ERROR", HANDLE_IGNORE);
+
+ g_hash_table_insert(hooks->compparamtable, "TZID", handle_tzid_parameter);
+ g_hash_table_insert(hooks->compparamtable, "VALUE", handle_value_parameter);
+ g_hash_table_insert(hooks->compparamtable, "ALTREP", handle_altrep_parameter);
+ g_hash_table_insert(hooks->compparamtable, "CN", handle_cn_parameter);
+ g_hash_table_insert(hooks->compparamtable, "DELEGATED-FROM", handle_delegated_from_parameter);
+ g_hash_table_insert(hooks->compparamtable, "DELEGATED-TO", handle_delegated_to_parameter);
+ g_hash_table_insert(hooks->compparamtable, "DIR", handle_dir_parameter);
+ g_hash_table_insert(hooks->compparamtable, "FMTTYPE", handle_format_type_parameter);
+ g_hash_table_insert(hooks->compparamtable, "FBTYPE", handle_fb_type_parameter);
+ g_hash_table_insert(hooks->compparamtable, "MEMBER", handle_member_parameter);
+ g_hash_table_insert(hooks->compparamtable, "PARTSTAT", handle_partstat_parameter);
+ g_hash_table_insert(hooks->compparamtable, "RANGE", handle_range_parameter);
+ g_hash_table_insert(hooks->compparamtable, "RELATED", handle_related_parameter);
+ g_hash_table_insert(hooks->compparamtable, "RELTYPE", handle_reltype_parameter);
+ g_hash_table_insert(hooks->compparamtable, "ROLE", handle_role_parameter);
+ g_hash_table_insert(hooks->compparamtable, "RSVP", handle_rsvp_parameter);
+ g_hash_table_insert(hooks->compparamtable, "SENT-BY", handle_sent_by_parameter);
+ g_hash_table_insert(hooks->compparamtable, "X-LIC-ERROR", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->compparamtable, "CHARSET", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->compparamtable, "STATUS", handle_status_parameter);
+
+ //vcal attributes
+ g_hash_table_insert(hooks->table, "PRODID", handle_prodid_attribute);
+ g_hash_table_insert(hooks->table, "PRODID", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->table, "METHOD", handle_method_attribute);
+ g_hash_table_insert(hooks->table, "VERSION", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->table, "ENCODING", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->table, "CHARSET", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->table, "BEGIN", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->table, "END", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->table, "CALSCALE", handle_calscale_attribute);
+ g_hash_table_insert(hooks->table, "X-LIC-ERROR", HANDLE_IGNORE);
+
+ //Timezone
+ g_hash_table_insert(hooks->tztable, "TZID", handle_tzid_attribute);
+ g_hash_table_insert(hooks->tztable, "X-LIC-LOCATION", handle_tz_location_attribute);
+ g_hash_table_insert(hooks->tztable, "TZOFFSETFROM", handle_tzoffsetfrom_location_attribute);
+ g_hash_table_insert(hooks->tztable, "TZOFFSETTO", handle_tzoffsetto_location_attribute);
+ g_hash_table_insert(hooks->tztable, "TZNAME", handle_tzname_attribute);
+ g_hash_table_insert(hooks->tztable, "DTSTART", handle_tzdtstart_attribute);
+ g_hash_table_insert(hooks->tztable, "RRULE", handle_tzrrule_attribute);
+ g_hash_table_insert(hooks->tztable, "LAST-MODIFIED", handle_tz_last_modified_attribute);
+ g_hash_table_insert(hooks->tztable, "BEGIN", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->tztable, "END", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->tztable, "TZURL", handle_tzurl_attribute);
+ g_hash_table_insert(hooks->tztable, "COMMENT", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->tztable, "RDATE", handle_tzrdate_attribute);
+
+ /*FIXME: The functions below shoudn't be on tztable, but on another hash table */
+ g_hash_table_insert(hooks->tztable, "VALUE", handle_value_parameter);
+ g_hash_table_insert(hooks->tztable, "ALTREP", handle_altrep_parameter);
+ g_hash_table_insert(hooks->tztable, "CN", handle_cn_parameter);
+ g_hash_table_insert(hooks->tztable, "DELEGATED-FROM", handle_delegated_from_parameter);
+ g_hash_table_insert(hooks->tztable, "DELEGATED-TO", handle_delegated_to_parameter);
+ g_hash_table_insert(hooks->tztable, "DIR", handle_dir_parameter);
+ g_hash_table_insert(hooks->tztable, "FMTTYPE", handle_format_type_parameter);
+ g_hash_table_insert(hooks->tztable, "FBTYPE", handle_fb_type_parameter);
+ g_hash_table_insert(hooks->tztable, "MEMBER", handle_member_parameter);
+ g_hash_table_insert(hooks->tztable, "PARTSTAT", handle_partstat_parameter);
+ g_hash_table_insert(hooks->tztable, "RANGE", handle_range_parameter);
+ g_hash_table_insert(hooks->tztable, "RELATED", handle_related_parameter);
+ g_hash_table_insert(hooks->tztable, "RELTYPE", handle_reltype_parameter);
+ g_hash_table_insert(hooks->tztable, "ROLE", handle_role_parameter);
+ g_hash_table_insert(hooks->tztable, "RSVP", handle_rsvp_parameter);
+ g_hash_table_insert(hooks->tztable, "SENT-BY", handle_sent_by_parameter);
+ g_hash_table_insert(hooks->tztable, "X-LIC-ERROR", HANDLE_IGNORE);
+
+ //VAlarm component
+ g_hash_table_insert(hooks->alarmtable, "TRIGGER", handle_atrigger_attribute);
+ g_hash_table_insert(hooks->alarmtable, "REPEAT", handle_arepeat_attribute);
+ g_hash_table_insert(hooks->alarmtable, "DURATION", handle_aduration_attribute);
+ g_hash_table_insert(hooks->alarmtable, "ACTION", handle_aaction_attribute);
+ g_hash_table_insert(hooks->alarmtable, "ATTACH", handle_aattach_attribute);
+ g_hash_table_insert(hooks->alarmtable, "DESCRIPTION", handle_adescription_attribute);
+ g_hash_table_insert(hooks->alarmtable, "ATTENDEE", handle_aattendee_attribute);
+ g_hash_table_insert(hooks->alarmtable, "SUMMARY", handle_asummary_attribute);
+
+ /*FIXME: The functions below shoudn't be on alarmtable, but on another hash table */
+ g_hash_table_insert(hooks->alarmtable, "TZID", handle_tzid_parameter);
+ g_hash_table_insert(hooks->alarmtable, "VALUE", handle_value_parameter);
+ g_hash_table_insert(hooks->alarmtable, "ALTREP", handle_altrep_parameter);
+ g_hash_table_insert(hooks->alarmtable, "CN", handle_cn_parameter);
+ g_hash_table_insert(hooks->alarmtable, "DELEGATED-FROM", handle_delegated_from_parameter);
+ g_hash_table_insert(hooks->alarmtable, "DELEGATED-TO", handle_delegated_to_parameter);
+ g_hash_table_insert(hooks->alarmtable, "DIR", handle_dir_parameter);
+ g_hash_table_insert(hooks->alarmtable, "FMTTYPE", handle_format_type_parameter);
+ g_hash_table_insert(hooks->alarmtable, "FBTYPE", handle_fb_type_parameter);
+ g_hash_table_insert(hooks->alarmtable, "MEMBER", handle_member_parameter);
+ g_hash_table_insert(hooks->alarmtable, "PARTSTAT", handle_partstat_parameter);
+ g_hash_table_insert(hooks->alarmtable, "RANGE", handle_range_parameter);
+ g_hash_table_insert(hooks->alarmtable, "RELATED", handle_related_parameter);
+ g_hash_table_insert(hooks->alarmtable, "RELTYPE", handle_reltype_parameter);
+ g_hash_table_insert(hooks->alarmtable, "ROLE", handle_role_parameter);
+ g_hash_table_insert(hooks->alarmtable, "RSVP", handle_rsvp_parameter);
+ g_hash_table_insert(hooks->alarmtable, "SENT-BY", handle_sent_by_parameter);
+ g_hash_table_insert(hooks->alarmtable, "X-LIC-ERROR", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->alarmtable, "X-EVOLUTION-ALARM-UID", HANDLE_IGNORE);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, hooks);
+ return (void *)hooks;
+}
+
+static void *init_vcal_to_xml(void)
+{
+ osync_trace(TRACE_ENTRY, "%s", __func__);
+ OSyncHooksTable *hooks = (OSyncHooksTable *)init_ical_to_xml();
+
+ //vcal (event10) only
+ insert_attr_handler(hooks->comptable, "RRULE", handle_vcal_rrule_attribute);
+ insert_attr_handler(hooks->comptable, "TRANSP", handle_vcal_transp_attribute);
+ insert_attr_handler(hooks->comptable, "AALARM", handle_aalarm_attribute);
+ insert_attr_handler(hooks->comptable, "DALARM", handle_dalarm_attribute);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, hooks);
+ return (void *)hooks;
+}
+
+static void fin_vcal_to_xml(void *data)
+{
+ OSyncHooksTable *hooks = (OSyncHooksTable *)data;
+ g_hash_table_destroy(hooks->table);
+ g_free(hooks);
+}
+
+
+
+/* xml to vcal */
+static VFormatAttribute *handle_xml_dtstamp_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DTSTAMP");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_description_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DESCRIPTION");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_summary_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "SUMMARY");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+/* ical only */
+static VFormatAttribute *handle_xml_due_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DUE");
+ add_value(attr, root, "Content", encoding);
+ vformat_attribute_add_param_with_value(attr, "TZID", osxml_find_node(root, "TimezoneID"));
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_dtstart_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DTSTART");
+ add_value(attr, root, "Content", encoding);
+ vformat_attribute_add_param_with_value(attr, "TZID", osxml_find_node(root, "TimezoneID"));
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+/* end ical only */
+
+/* vcal only */
+static VFormatAttribute *handle_vcal_xml_due_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DUE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_vcal_xml_dtstart_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DTSTART");
+
+ char *content = NULL;
+ GString *newdate = g_string_new("");
+
+ content = osxml_find_node(root, "Content");
+ newdate = g_string_append(newdate, content);
+
+ if (osync_time_isdate(content)) {
+ newdate = g_string_append(newdate, "T000000");
+ }
+
+ g_free(content);
+
+ vformat_attribute_add_value(attr, newdate->str);
+ vformat_add_attribute(vcard, attr);
+
+ g_string_free(newdate, TRUE);
+
+ return attr;
+}
+/* end vcal only */
+
+static VFormatAttribute *handle_xml_percent_complete_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "PERCENT-COMPLETE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_priority_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "PRIORITY");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_sequence_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "SEQUENCE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_last_modified_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "LAST-MODIFIED");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_created_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CREATED");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_rrule_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RRULE");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+/* vcal only */
+static VFormatAttribute *handle_vcal_xml_rrule_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RRULE");
+
+ char *vcalrrule = NULL;
+ GString *icalrrule = g_string_new("");
+ xmlNode *child = root->xmlChildrenNode;
+ while (child) {
+ icalrrule = g_string_append(icalrrule, (char*)xmlNodeGetContent(child));
+ if (child->next)
+ icalrrule = g_string_append(icalrrule, ";");
+
+ child = child->next;
+ }
+
+ vcalrrule = conv_ical2vcal_rrule(icalrrule->str);
+
+ g_string_free(icalrrule, TRUE);
+
+ vformat_attribute_add_value(attr, vcalrrule);
+
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+/* end of vcal only */
+
+static VFormatAttribute *handle_xml_rdate_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RDATE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_location_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "LOCATION");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_completed_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "COMPLETED");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_organizer_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ORGANIZER");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_recurid_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RECURRENCE-ID");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_status_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "STATUS");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_duration_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DURATION");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_attach_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ATTACH");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_attendee_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ATTENDEE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_contact_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CONTACT");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_exdate_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "EXDATE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+/* vcal only */
+static VFormatAttribute *handle_vcal_xml_exdate_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+
+ xmlNode *dtstartNode = NULL;
+ char *dtstart = NULL, *timestamp = NULL, *origex = NULL;
+ GString *exdate = g_string_new("");
+ VFormatAttribute *attr = NULL;
+
+ if (!(attr = vformat_find_attribute(vcard, "EXDATE")))
+ attr = vformat_attribute_new(NULL, "EXDATE");
+
+ origex = (char *) xmlNodeGetContent(root);
+
+ exdate = g_string_append(exdate, origex);
+
+ if (!strstr(origex, "T")) {
+ dtstartNode = osxml_get_node(root->parent->parent, "DateStarted");
+ osync_trace(TRACE_INTERNAL, "dtstartNode pointer: %p", dtstartNode);
+ dtstart = osxml_find_node(dtstartNode, "Content");
+ timestamp = strstr(dtstart, "T");
+ osync_trace(TRACE_INTERNAL, "append timestamp: %s", timestamp);
+ exdate = g_string_append(exdate, timestamp);
+ g_free(dtstart);
+ }
+
+ vformat_attribute_add_value(attr, exdate->str);
+
+ g_string_free(exdate, TRUE);
+
+ if (!vformat_find_attribute(vcard, "EXDATE"))
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+/* end of vcal only */
+
+static VFormatAttribute *handle_xml_exrule_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "EXRULE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_rstatus_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RSTATUS");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_related_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RELATED-TO");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_resources_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RESOURCES");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+/* ical only */
+static VFormatAttribute *handle_xml_dtend_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DTEND");
+ add_value(attr, root, "Content", encoding);
+ vformat_attribute_add_param_with_value(attr, "TZID", osxml_find_node(root, "TimezoneID"));
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+/* end ical only */
+
+/* vcal only */
+static VFormatAttribute *handle_vcal_xml_dtend_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DTEND");
+
+ char *content_dtend = NULL;
+ GString *new_dtend = g_string_new("");
+
+ content_dtend = osxml_find_node(root, "Content");
+ new_dtend = g_string_append(new_dtend, content_dtend);
+
+
+ /*
+ * if (DTEND->VALUE == DATE) ==> DTEND = DTEND-60sec + "T000000"
+ *
+ * e.g. (SE W880i): 20070313T000000Z -> 20070313T235900Z
+ *
+ * this works also for SE K750i, SE D750i
+ *
+ */
+ if (osync_time_isdate(content_dtend)) {
+
+ osync_trace(TRACE_INTERNAL, "DTEND (old): %s", content_dtend);
+
+ char *tmp1 = NULL, *tmp2 = NULL;
+
+ /* append "T000000" */
+ new_dtend = g_string_append(new_dtend, "T000000");
+
+ time_t dtend_unixtime = osync_time_vtime2unix(content_dtend, 0);
+
+ /* DTEND = DTEND - 60 sec */
+ dtend_unixtime -= 60;
+
+ tmp1 = osync_time_unix2vtime(&dtend_unixtime);
+ tmp2 = osync_time_vtime2localtime(tmp1, 0);
+
+ g_string_erase(new_dtend, 0, -1);
+ g_string_append(new_dtend, tmp2);
+
+ osync_trace(TRACE_INTERNAL, "DTEND (new): %s", tmp2);
+
+ g_free(tmp1);
+ g_free(tmp2);
+
+ }
+
+ g_free(content_dtend);
+
+ vformat_attribute_add_value(attr, new_dtend->str);
+ vformat_add_attribute(vcard, attr);
+
+ g_string_free(new_dtend, TRUE);
+
+ return attr;
+}
+
+static VFormatAttribute *handle_vcal_xml_transp_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TRANSP");
+
+ char *val = osxml_find_node(root, "Content");
+
+ // Default: TRANSPARENT
+ int block = 0;
+
+ if (!strcmp("OPAQUE", val))
+ block = 1;
+
+ g_free(val);
+
+ char *transp = g_strdup_printf("%i", block);
+ vformat_attribute_add_value(attr, transp);
+ vformat_add_attribute(vcard, attr);
+ g_free(transp);
+
+ return attr;
+}
+/* end vcal only */
+
+static VFormatAttribute *handle_xml_transp_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TRANSP");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_calscale_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CALSCALE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzid_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TZID");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tz_location_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "X-LIC-LOCATION");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzoffsetfrom_location_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TZOFFSETFROM");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzoffsetto_location_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TZOFFSETTO");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzname_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TZNAME");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzdtstart_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DTSTART");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzrrule_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RRULE");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tz_last_modified_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "LAST-MODIFIED");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzurl_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TZURL");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_tzrdate_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "RDATE");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+/* vcal only */
+static VFormatAttribute *handle_vcal_xml_alarm_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling reminder xml attribute");
+
+ xmlNode *dtstart = NULL;
+ xmlNode *trigger = osxml_get_node(root, "AlarmTrigger");
+ char *action = NULL, *tmp = NULL, *value = NULL, *runtime = NULL;
+ char *startvtime = NULL;
+ time_t dtstarted;
+ int duration;
+ osync_bool isruntime = FALSE;
+
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DALARM");
+
+ dtstart = osxml_get_node(root->parent, "DateStarted");
+ value = osxml_find_node(dtstart, "Value");
+
+ if (value) {
+ if (strstr(value, "DATE-TIME")) {
+ isruntime = TRUE;
+ }
+ }
+
+ startvtime = osxml_find_node(dtstart, "Content");
+
+ /* Runtime */
+ if (isruntime) {
+ runtime = startvtime;
+ /* Duration */
+ } else {
+ tmp = osxml_find_node(trigger, "Content");
+ duration = osync_time_alarmdu2sec(tmp);
+ g_free(tmp);
+
+ tmp = osxml_find_node(dtstart, "Content");
+ /* AlarmTrigger MUST be UTC (see rfc2445).
+ So there is an offset to UTC of 0 seconds. */
+ if (osync_time_isutc(tmp))
+ osync_trace(TRACE_INTERNAL, "WARNNING: timestamp is not UTC: %s", tmp);
+
+ dtstarted = osync_time_vtime2unix(tmp, 0);
+
+ g_free(tmp);
+
+ dtstarted += duration;
+
+ runtime = osync_time_unix2vtime(&dtstarted);
+ }
+
+ g_free(value);
+
+ vformat_attribute_add_value(attr, runtime);
+
+ add_value(attr, root, "AlarmDuration", encoding);
+ add_value(attr, root, "AlarmRepeat", encoding);
+ add_value(attr, root, "AlarmDescription", encoding);
+
+ action = osxml_find_node(root, "AlarmAction");
+ if (action) {
+ if (!strcmp(action, "AUDIO")) {
+ osync_trace(TRACE_INTERNAL, "Handling audo reminder xml attribute");
+
+ attr = vformat_attribute_new(NULL, "AALARM");
+ vformat_attribute_add_value(attr, runtime);
+ add_value(attr, root, "AlarmDuration", encoding);
+ add_value(attr, root, "AlarmRepeat", encoding);
+ add_value(attr, root, "AlarmDescription", encoding);
+ }
+ }
+
+ vformat_add_attribute(vcard, attr);
+ g_free(action);
+ g_free(runtime);
+
+ return attr;
+}
+/* end of vcal only */
+
+/* ical only */
+static VFormatAttribute *handle_xml_atrigger_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TRIGGER");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_arepeat_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "REPEAT");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_aduration_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DURATION");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_aaction_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ACTION");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_aattach_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ATTACH");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_adescription_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DESCRIPTION");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_aattendee_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ATTENDEE");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_asummary_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "SUMMARY");
+ add_value(attr, root, NULL, encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+/* end of ical only */
+
+void xml_parse_attribute(OSyncHooksTable *hooks, GHashTable *table, xmlNode **current, VFormat *vcal, VFormatType target)
+{
+ osync_trace(TRACE_INTERNAL, "parsing xml attributes");
+ void *xml_param_handler = NULL;
+ VFormatAttribute *attr = NULL;
+ xmlNode *root = *current;
+ while (root) {
+ if (!strcmp((char*)root->name, "Todo")) {
+ attr = vformat_attribute_new(NULL, "BEGIN");
+ vformat_attribute_add_value(attr, "VTODO");
+ vformat_add_attribute(vcal, attr);
+ xmlNode *child = root->children;
+ xml_parse_attribute(hooks, hooks->comptable, &child, vcal, target);
+ attr = vformat_attribute_new(NULL, "END");
+ vformat_attribute_add_value(attr, "VTODO");
+ vformat_add_attribute(vcal, attr);
+ } else if (!strcmp((char*)root->name, "Timezone") && target != VFORMAT_EVENT_10) {
+ attr = vformat_attribute_new(NULL, "BEGIN");
+ vformat_attribute_add_value(attr, "VTIMEZONE");
+ vformat_add_attribute(vcal, attr);
+ xmlNode *child = root->children;
+ xml_parse_attribute(hooks, hooks->tztable, &child, vcal, target);
+ attr = vformat_attribute_new(NULL, "END");
+ vformat_attribute_add_value(attr, "VTIMEZONE");
+ vformat_add_attribute(vcal, attr);
+ } else if (!strcmp((char*)root->name, "Event")) {
+ attr = vformat_attribute_new(NULL, "BEGIN");
+ vformat_attribute_add_value(attr, "VEVENT");
+ vformat_add_attribute(vcal, attr);
+ xmlNode *child = root->children;
+ xml_parse_attribute(hooks, hooks->comptable, &child, vcal, target);
+ attr = vformat_attribute_new(NULL, "END");
+ vformat_attribute_add_value(attr, "VEVENT");
+ vformat_add_attribute(vcal, attr);
+ } else if (!strcmp((char*)root->name, "Journal")) {
+ attr = vformat_attribute_new(NULL, "BEGIN");
+ vformat_attribute_add_value(attr, "VJOURNAL");
+ vformat_add_attribute(vcal, attr);
+ xmlNode *child = root->children;
+ xml_parse_attribute(hooks, hooks->tztable, &child, vcal, target);
+ attr = vformat_attribute_new(NULL, "END");
+ vformat_attribute_add_value(attr, "VJOURNAL");
+ vformat_add_attribute(vcal, attr);
+ } else if (!strcmp((char*)root->name, "DaylightSavings")) {
+ attr = vformat_attribute_new(NULL, "BEGIN");
+ vformat_attribute_add_value(attr, "DAYLIGHT");
+ vformat_add_attribute(vcal, attr);
+ xmlNode *child = root->children;
+ xml_parse_attribute(hooks, hooks->tztable, &child, vcal, target);
+ attr = vformat_attribute_new(NULL, "END");
+ vformat_attribute_add_value(attr, "DAYLIGHT");
+ vformat_add_attribute(vcal, attr);
+ } else if (!strcmp((char*)root->name, "Standard")) {
+ attr = vformat_attribute_new(NULL, "BEGIN");
+ vformat_attribute_add_value(attr, "STANDARD");
+ vformat_add_attribute(vcal, attr);
+ xmlNode *child = root->children;
+ xml_parse_attribute(hooks, hooks->tztable, &child, vcal, target);
+ attr = vformat_attribute_new(NULL, "END");
+ vformat_attribute_add_value(attr, "STANDARD");
+ vformat_add_attribute(vcal, attr);
+ } else if (!strcmp((char*)root->name, "Alarm") && target != VFORMAT_EVENT_10) {
+
+ xmlNode *child = root->children;
+ attr = vformat_attribute_new(NULL, "BEGIN");
+ vformat_attribute_add_value(attr, "VALARM");
+ vformat_add_attribute(vcal, attr);
+ xml_parse_attribute(hooks, hooks->alarmtable, &child, vcal, target);
+ attr = vformat_attribute_new(NULL, "END");
+ vformat_attribute_add_value(attr, "VALARM");
+ vformat_add_attribute(vcal, attr);
+
+ /* list of parameters which should NOT handle for vcal (event10) */
+ } else if (!strcmp((char*)root->name, "ExclusionDate") && target == VFORMAT_EVENT_10) {
+ xml_param_handler = g_hash_table_lookup(hooks->comptable, "Value");
+ g_hash_table_insert(hooks->comptable, "Value", HANDLE_IGNORE);
+ g_hash_table_insert(hooks->comptable, "Content", handle_vcal_xml_exdate_attribute);
+
+ xmlNode *child = root->children;
+ xml_parse_attribute(hooks, hooks->comptable, &child, vcal, target);
+
+ g_hash_table_insert(hooks->comptable, "Value", xml_param_handler);
+ g_hash_table_remove(hooks->comptable, "Content");
+
+ } else {
+ xml_vcal_handle_attribute(table, vcal, root);
+ }
+ root = root->next;
+ }
+}
+
+
+static void insert_xml_attr_handler(GHashTable *table, const char *name, xml_attr_handler_t handler)
+{
+ g_hash_table_insert(table, (gpointer)name, handler);
+}
+
+static osync_bool conv_xml_to_vcal(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error, VFormatType target)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, user_data, input, inpsize, output, outpsize, free_input, error);
+
+ xmlChar *str = osxml_write_to_string((xmlDoc *)input);
+ osync_trace(TRACE_SENSITIVE, "Input XML is:\n%s", str);
+ xmlFree(str);
+
+ //Get the root node of the input document
+ xmlNode *root = osxml_node_get_root((xmlDoc *)input, "vcal", error);
+ if (!root) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get root element of xml-contact");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ //Make the new vcard
+ VFormat *vcal = vformat_new();
+
+ OSyncHooksTable *hooks = (OSyncHooksTable *)user_data;
+ /* vevent10 / vevent20 */
+ if (target == VFORMAT_EVENT_10) {
+ /* RRULE */
+ insert_xml_attr_handler(hooks->comptable, "RecurrenceRule", handle_vcal_xml_rrule_attribute);
+ insert_xml_attr_handler(hooks->comptable, "ExclusionDate", handle_vcal_xml_exdate_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Alarm", handle_vcal_xml_alarm_attribute);
+ g_hash_table_insert(hooks->comptable, "Rule", HANDLE_IGNORE);
+
+ /* TRANSP */
+ insert_xml_attr_handler(hooks->comptable, "Transparency", handle_vcal_xml_transp_attribute);
+
+ /* vcal attributes */
+ insert_xml_attr_handler(hooks->comptable, "DateEnd", handle_vcal_xml_dtend_attribute);
+ insert_xml_attr_handler(hooks->comptable, "DateDue", handle_vcal_xml_due_attribute);
+ insert_xml_attr_handler(hooks->comptable, "DateStarted", handle_vcal_xml_dtstart_attribute);
+
+ /* vcal parameter */
+ g_hash_table_insert(hooks->comptable, "Value", HANDLE_IGNORE);
+
+
+ } else {
+ /* RRULE */
+ insert_xml_attr_handler(hooks->comptable, "RecurrenceRule", handle_xml_rrule_attribute);
+ insert_xml_attr_handler(hooks->comptable, "ExclusionDate", handle_xml_exdate_attribute);
+ g_hash_table_insert(hooks->comptable, "Rule", handle_xml_rule_parameter);
+
+ /* TRANSP */
+ insert_xml_attr_handler(hooks->comptable, "Transparency", handle_xml_transp_attribute);
+
+ /* ical attributes */
+ g_hash_table_insert(hooks->table, "Method", handle_xml_method_attribute);
+ insert_xml_attr_handler(hooks->comptable, "DateEnd", handle_xml_dtend_attribute);
+ insert_xml_attr_handler(hooks->comptable, "DateDue", handle_xml_due_attribute);
+ insert_xml_attr_handler(hooks->comptable, "DateStarted", handle_xml_dtstart_attribute);
+
+ /* Timezone */
+ g_hash_table_insert(hooks->tztable, "TimezoneID", handle_xml_tzid_attribute);
+ g_hash_table_insert(hooks->tztable, "Location", handle_xml_tz_location_attribute);
+ g_hash_table_insert(hooks->tztable, "TZOffsetFrom", handle_xml_tzoffsetfrom_location_attribute);
+ g_hash_table_insert(hooks->tztable, "TZOffsetTo", handle_xml_tzoffsetto_location_attribute);
+ g_hash_table_insert(hooks->tztable, "TimezoneName", handle_xml_tzname_attribute);
+ g_hash_table_insert(hooks->tztable, "DateStarted", handle_xml_tzdtstart_attribute);
+ g_hash_table_insert(hooks->tztable, "RecurrenceRule", handle_xml_tzrrule_attribute);
+ g_hash_table_insert(hooks->tztable, "LastModified", handle_xml_tz_last_modified_attribute);
+ g_hash_table_insert(hooks->tztable, "TimezoneUrl", handle_xml_tzurl_attribute);
+ g_hash_table_insert(hooks->tztable, "RecurrenceDate", handle_xml_tzrdate_attribute);
+
+ /* VAlarm component */
+ g_hash_table_insert(hooks->alarmtable, "AlarmTrigger", handle_xml_atrigger_attribute);
+ g_hash_table_insert(hooks->alarmtable, "AlarmRepeat", handle_xml_arepeat_attribute);
+ g_hash_table_insert(hooks->alarmtable, "AlarmDuration", handle_xml_aduration_attribute);
+ g_hash_table_insert(hooks->alarmtable, "AlarmAction", handle_xml_aaction_attribute);
+ g_hash_table_insert(hooks->alarmtable, "AlarmAttach", handle_xml_aattach_attribute);
+ g_hash_table_insert(hooks->alarmtable, "AlarmDescription", handle_xml_adescription_attribute);
+ g_hash_table_insert(hooks->alarmtable, "AlarmAttendee", handle_xml_aattendee_attribute);
+ g_hash_table_insert(hooks->alarmtable, "AlarmSummary", handle_xml_asummary_attribute);
+
+ }
+
+ xml_parse_attribute(hooks, hooks->table, &root, vcal, target);
+
+ *free_input = TRUE;
+ *output = vformat_to_string(vcal, target);
+ osync_trace(TRACE_SENSITIVE, "vevent output is: \n%s", *output);
+ *outpsize = strlen(*output);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+
+ return TRUE;
+}
+
+static osync_bool conv_xml_to_vevent10(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ return conv_xml_to_vcal(user_data, input, inpsize, output, outpsize, free_input, error, VFORMAT_EVENT_10);
+}
+
+static osync_bool conv_xml_to_vevent20(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ return conv_xml_to_vcal(user_data, input, inpsize, output, outpsize, free_input, error, VFORMAT_EVENT_20);
+}
+
+static osync_bool conv_xml_to_vtodo10(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ return conv_xml_to_vcal(user_data, input, inpsize, output, outpsize, free_input, error, VFORMAT_TODO_10);
+}
+
+static osync_bool conv_xml_to_vtodo20(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ return conv_xml_to_vcal(user_data, input, inpsize, output, outpsize, free_input, error, VFORMAT_TODO_20);
+}
+
+static void *init_xml_to_vcal(void)
+{
+ osync_trace(TRACE_ENTRY, "%s", __func__);
+
+ OSyncHooksTable *hooks = g_malloc0(sizeof(OSyncHooksTable));
+
+ hooks->table = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->tztable = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->comptable = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->alarmtable = g_hash_table_new(g_str_hash, g_str_equal);
+
+ //todo attributes
+ insert_xml_attr_handler(hooks->comptable, "Uid", handle_xml_uid_attribute);
+ insert_xml_attr_handler(hooks->comptable, "DateCalendarCreated", handle_xml_dtstamp_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Description", handle_xml_description_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Summary", handle_xml_summary_attribute);
+ insert_xml_attr_handler(hooks->comptable, "PercentComplete", handle_xml_percent_complete_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Class", handle_xml_class_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Categories", handle_xml_categories_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Priority", handle_xml_priority_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Url", handle_xml_url_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Sequence", handle_xml_sequence_attribute);
+ insert_xml_attr_handler(hooks->comptable, "LastModified", handle_xml_last_modified_attribute);
+ insert_xml_attr_handler(hooks->comptable, "DateCreated", handle_xml_created_attribute);
+ insert_xml_attr_handler(hooks->comptable, "RecurrenceDate", handle_xml_rdate_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Location", handle_xml_location_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Geo", handle_xml_geo_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Completed", handle_xml_completed_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Organizer", handle_xml_organizer_attribute);
+ insert_xml_attr_handler(hooks->comptable, "RecurrenceID", handle_xml_recurid_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Status", handle_xml_status_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Duration", handle_xml_duration_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Attach", handle_xml_attach_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Attendee", handle_xml_attendee_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Contact", handle_xml_contact_attribute);
+ insert_xml_attr_handler(hooks->comptable, "ExclusionRule", handle_xml_exrule_attribute);
+ insert_xml_attr_handler(hooks->comptable, "RStatus", handle_xml_rstatus_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Related", handle_xml_related_attribute);
+ insert_xml_attr_handler(hooks->comptable, "Resources", handle_xml_resources_attribute);
+
+
+ /*FIXME: The functions below shouldn't be on comptable, but on other hash table */
+ g_hash_table_insert(hooks->comptable, "Category", handle_xml_category_parameter);
+ g_hash_table_insert(hooks->comptable, "Value", handle_xml_value_parameter);
+ g_hash_table_insert(hooks->comptable, "AlternateRep", handle_xml_altrep_parameter);
+ g_hash_table_insert(hooks->comptable, "CommonName", handle_xml_cn_parameter);
+ g_hash_table_insert(hooks->comptable, "DelegatedFrom", handle_xml_delegated_from_parameter);
+ g_hash_table_insert(hooks->comptable, "DelegatedTo", handle_xml_delegated_to_parameter);
+ g_hash_table_insert(hooks->comptable, "Directory", handle_xml_dir_parameter);
+ g_hash_table_insert(hooks->comptable, "FormaType", handle_xml_format_type_parameter);
+ g_hash_table_insert(hooks->comptable, "FreeBusyType", handle_xml_fb_type_parameter);
+ g_hash_table_insert(hooks->comptable, "Member", handle_xml_member_parameter);
+ g_hash_table_insert(hooks->comptable, "PartStat", handle_xml_partstat_parameter);
+ g_hash_table_insert(hooks->comptable, "Range", handle_xml_range_parameter);
+ g_hash_table_insert(hooks->comptable, "Related", handle_xml_related_parameter);
+ g_hash_table_insert(hooks->comptable, "RelationType", handle_xml_reltype_parameter);
+ g_hash_table_insert(hooks->comptable, "Role", handle_xml_role_parameter);
+ g_hash_table_insert(hooks->comptable, "RSVP", handle_xml_rsvp_parameter);
+ g_hash_table_insert(hooks->comptable, "SentBy", handle_xml_sent_by_parameter);
+
+ //vcal attributes
+ g_hash_table_insert(hooks->table, "CalendarScale", handle_xml_calscale_attribute);
+ g_hash_table_insert(hooks->table, "ProductID", handle_xml_prodid_attribute);
+ g_hash_table_insert(hooks->table, "UnknownNode", xml_handle_unknown_attribute);
+ g_hash_table_insert(hooks->table, "UnknownParameter", xml_handle_unknown_parameter);
+
+ /*FIXME: The functions below shouldn't be on tztable, but on other hash table */
+ g_hash_table_insert(hooks->tztable, "Category", handle_xml_category_parameter);
+ g_hash_table_insert(hooks->tztable, "Rule", handle_xml_rule_parameter);
+ g_hash_table_insert(hooks->tztable, "Value", handle_xml_value_parameter);
+ g_hash_table_insert(hooks->tztable, "AlternateRep", handle_xml_altrep_parameter);
+ g_hash_table_insert(hooks->tztable, "CommonName", handle_xml_cn_parameter);
+ g_hash_table_insert(hooks->tztable, "DelegatedFrom", handle_xml_delegated_from_parameter);
+ g_hash_table_insert(hooks->tztable, "DelegatedTo", handle_xml_delegated_to_parameter);
+ g_hash_table_insert(hooks->tztable, "Directory", handle_xml_dir_parameter);
+ g_hash_table_insert(hooks->tztable, "FormaType", handle_xml_format_type_parameter);
+ g_hash_table_insert(hooks->tztable, "FreeBusyType", handle_xml_fb_type_parameter);
+ g_hash_table_insert(hooks->tztable, "Member", handle_xml_member_parameter);
+ g_hash_table_insert(hooks->tztable, "PartStat", handle_xml_partstat_parameter);
+ g_hash_table_insert(hooks->tztable, "Range", handle_xml_range_parameter);
+ g_hash_table_insert(hooks->tztable, "Related", handle_xml_related_parameter);
+ g_hash_table_insert(hooks->tztable, "RelationType", handle_xml_reltype_parameter);
+ g_hash_table_insert(hooks->tztable, "Role", handle_xml_role_parameter);
+ g_hash_table_insert(hooks->tztable, "RSVP", handle_xml_rsvp_parameter);
+ g_hash_table_insert(hooks->tztable, "SentBy", handle_xml_sent_by_parameter);
+
+
+ /*FIXME: The functions below shouldn't be on alarmtable, but on other hash table */
+ g_hash_table_insert(hooks->alarmtable, "Category", handle_xml_category_parameter);
+ g_hash_table_insert(hooks->alarmtable, "Rule", handle_xml_rule_parameter);
+ g_hash_table_insert(hooks->alarmtable, "Value", handle_xml_value_parameter);
+ g_hash_table_insert(hooks->alarmtable, "AlternateRep", handle_xml_altrep_parameter);
+ g_hash_table_insert(hooks->alarmtable, "CommonName", handle_xml_cn_parameter);
+ g_hash_table_insert(hooks->alarmtable, "DelegatedFrom", handle_xml_delegated_from_parameter);
+ g_hash_table_insert(hooks->alarmtable, "DelegatedTo", handle_xml_delegated_to_parameter);
+ g_hash_table_insert(hooks->alarmtable, "Directory", handle_xml_dir_parameter);
+ g_hash_table_insert(hooks->alarmtable, "FormaType", handle_xml_format_type_parameter);
+ g_hash_table_insert(hooks->alarmtable, "FreeBusyType", handle_xml_fb_type_parameter);
+ g_hash_table_insert(hooks->alarmtable, "Member", handle_xml_member_parameter);
+ g_hash_table_insert(hooks->alarmtable, "PartStat", handle_xml_partstat_parameter);
+ g_hash_table_insert(hooks->alarmtable, "Range", handle_xml_range_parameter);
+ g_hash_table_insert(hooks->alarmtable, "Related", handle_xml_related_parameter);
+ g_hash_table_insert(hooks->alarmtable, "RelationType", handle_xml_reltype_parameter);
+ g_hash_table_insert(hooks->alarmtable, "Role", handle_xml_role_parameter);
+ g_hash_table_insert(hooks->alarmtable, "RSVP", handle_xml_rsvp_parameter);
+ g_hash_table_insert(hooks->alarmtable, "SentBy", handle_xml_sent_by_parameter);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, hooks);
+ return (void *)hooks;
+}
+
+static void fin_xml_to_vcal(void *data)
+{
+ OSyncHooksTable *hooks = (OSyncHooksTable *)data;
+ g_hash_table_destroy(hooks->table);
+ g_free(hooks);
+}
+
+static time_t get_revision(OSyncChange *change, const char *path, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, change, error);
+
+ xmlDoc *doc = (xmlDoc *)osync_change_get_data(change);
+
+ xmlXPathObject *xobj = osxml_get_nodeset(doc, path);
+
+ xmlNodeSet *nodes = xobj->nodesetval;
+
+ int size = (nodes) ? nodes->nodeNr : 0;
+ if (size != 1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find the revision");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return -1;
+ }
+
+ char *revision = (char*)xmlNodeGetContent(nodes->nodeTab[0]);
+
+ time_t time = vformat_time_to_unix(revision);
+ g_free(revision);
+ xmlXPathFreeObject(xobj);
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, time);
+ return time;
+}
+
+static time_t get_todo_revision(OSyncChange *change, OSyncError **error)
+{
+ return get_revision(change, "/vcal/Todo/LastModified", error);
+}
+
+static time_t get_event_revision(OSyncChange *change, OSyncError **error)
+{
+ return get_revision(change, "/vcal/Event/LastModified", error);
+}
+
+void get_info(OSyncEnv *env)
+{
+ //Calendar
+ osync_env_register_objtype(env, "event");
+ osync_env_register_objformat(env, "event", "xml-event");
+ osync_env_format_set_compare_func(env, "xml-event", compare_vevent);
+ osync_env_format_set_destroy_func(env, "xml-event", destroy_xml);
+ osync_env_format_set_print_func(env, "xml-event", print_vcal);
+ osync_env_format_set_copy_func(env, "xml-event", osxml_copy);
+ osync_env_format_set_revision_func(env, "xml-event", get_event_revision);
+ osync_env_format_set_marshall_func(env, "xml-event", osxml_marshall);
+ osync_env_format_set_demarshall_func(env, "xml-event", osxml_demarshall);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "vevent10", "xml-event", conv_vcal_to_xml);
+ osync_env_converter_set_init(env, "vevent10", "xml-event", init_vcal_to_xml, fin_vcal_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-event", "vevent10", conv_xml_to_vevent10);
+ osync_env_converter_set_init(env, "xml-event", "vevent10", init_xml_to_vcal, fin_xml_to_vcal);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "vevent20", "xml-event", conv_vcal_to_xml);
+ osync_env_converter_set_init(env, "vevent20", "xml-event", init_ical_to_xml, fin_vcal_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-event", "vevent20", conv_xml_to_vevent20);
+ osync_env_converter_set_init(env, "xml-event", "vevent20", init_xml_to_vcal, fin_xml_to_vcal);
+
+ //Todo
+ osync_env_register_objtype(env, "todo");
+ osync_env_register_objformat(env, "todo", "xml-todo");
+ osync_env_format_set_compare_func(env, "xml-todo", compare_vtodo);
+ osync_env_format_set_destroy_func(env, "xml-todo", destroy_xml);
+ osync_env_format_set_print_func(env, "xml-todo", print_vcal);
+ osync_env_format_set_copy_func(env, "xml-todo", osxml_copy);
+ osync_env_format_set_revision_func(env, "xml-todo", get_todo_revision);
+ osync_env_format_set_marshall_func(env, "xml-todo", osxml_marshall);
+ osync_env_format_set_demarshall_func(env, "xml-todo", osxml_demarshall);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "vtodo10", "xml-todo", conv_vcal_to_xml);
+ osync_env_converter_set_init(env, "vtodo10", "xml-todo", init_vcal_to_xml, fin_vcal_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-todo", "vtodo10", conv_xml_to_vtodo10);
+ osync_env_converter_set_init(env, "xml-todo", "vtodo10", init_xml_to_vcal, fin_xml_to_vcal);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "vtodo20", "xml-todo", conv_vcal_to_xml);
+ osync_env_converter_set_init(env, "vtodo20", "xml-todo", init_ical_to_xml, fin_vcal_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-todo", "vtodo20", conv_xml_to_vtodo20);
+ osync_env_converter_set_init(env, "xml-todo", "vtodo20", init_xml_to_vcal, fin_xml_to_vcal);
+}
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.h b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.h
new file mode 100644
index 00000000..dcc4a02e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcal.h
@@ -0,0 +1,16 @@
+#ifndef _XMLVCARD_H_
+#define _XMLVCARD_H_
+
+typedef struct OSyncHooksTable OSyncHooksTable;
+
+struct OSyncHooksTable {
+ GHashTable *table;
+ GHashTable *tztable;
+ GHashTable *comptable;
+ GHashTable *compparamtable;
+ GHashTable *alarmtable;
+};
+
+#define HANDLE_IGNORE (void *)1
+
+#endif //_XMLVCARD_H_
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.c b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.c
new file mode 100644
index 00000000..a577ed86
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.c
@@ -0,0 +1,1405 @@
+/*
+ * xml-vcard - A plugin for parsing vcard objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+#include "vformat.h"
+#include "xml-vcard.h"
+#include <opensync/opensync_xml.h>
+#include <glib.h>
+
+static const char * rewrite_mime_type(const char * source_format, int use_iana);
+static int _helper_is_base64(const char *);
+
+static void handle_unknown_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown parameter %s", vformat_attribute_param_get_name(param));
+ xmlNode *property = xmlNewTextChild(current, NULL, (xmlChar*)"UnknownParam",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+ osxml_node_add(property, "ParamName", vformat_attribute_param_get_name(param));
+}
+
+static void handle_encoding_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "%s: xmlNodeName=%s, param=%s", __func__,
+ (char *)current->name,
+ vformat_attribute_param_get_name(param));
+ GList *v = vformat_attribute_param_get_values(param);
+ for (; v; v = v->next) {
+ char * content = g_strdup(v->data);
+ if (_helper_is_base64((const char *)content))
+ {
+ g_free(content);
+ content=g_strdup("B");
+ }
+ xmlNewTextChild(current, NULL, (xmlChar*)"Encoding", (xmlChar*)content);
+ g_free(content);
+ }
+}
+
+static void handle_type_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "%s: xmlNodeName=%s, param=%s", __func__,
+ (char *)current->name,
+ vformat_attribute_param_get_name(param));
+ GList *v = vformat_attribute_param_get_values(param);
+ /**
+ * PHOTO and LOGO TYPE parameter should be rewritten
+ * PHOTO;TYPE=JPEG -> PHOTO;TYPE=image/jpeg
+ **/
+ if ( xmlStrcmp(current->name, (const xmlChar *)"Photo") && xmlStrcmp(current->name, (const xmlChar *)"Logo")) {
+ for (; v; v = v->next) {
+ xmlNewTextChild(current, NULL,
+ (xmlChar*)"Type", (xmlChar*)v->data);
+ }
+ } else {
+ for (; v; v = v->next) {
+ const char * tmp = rewrite_mime_type(v->data, 1);
+ if (tmp)
+ xmlNewTextChild(current, NULL, (xmlChar*)"Type",
+ (xmlChar*)tmp);
+ }
+ }
+
+}
+
+static void handle_value_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling value parameter %s", vformat_attribute_param_get_name(param));
+
+ GList *v = vformat_attribute_param_get_values(param);
+ for (; v; v = v->next) {
+ xmlNewTextChild(current, NULL, (xmlChar*)"Value", (xmlChar*)v->data);
+ }
+}
+
+static xmlNode *handle_formatted_name_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling formatted name attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"FormattedName", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_name_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling name attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Name", NULL);
+ osxml_node_add(current, "LastName", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(current, "FirstName", vformat_attribute_get_nth_value(attr, 1));
+ osxml_node_add(current, "Additional", vformat_attribute_get_nth_value(attr, 2));
+ osxml_node_add(current, "Prefix", vformat_attribute_get_nth_value(attr, 3));
+ osxml_node_add(current, "Suffix", vformat_attribute_get_nth_value(attr, 4));
+ return current;
+}
+
+static xmlNode *handle_agent_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling agent attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Agent", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_photo_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "%s:Handling photo attribute", __func__);
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Photo", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_birthday_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ char *datestamp;
+ const char *tmp;
+
+ osync_trace(TRACE_INTERNAL, "Handling birthday attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Birthday", NULL);
+ tmp = vformat_attribute_get_nth_value(attr, 0);
+ datestamp = osync_time_datestamp(tmp);
+ osxml_node_add(current, "Content", datestamp);
+ free(datestamp);
+
+ return current;
+}
+
+static xmlNode *handle_address_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling address attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Address", NULL);
+ osxml_node_add(current, "PostalBox", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(current, "ExtendedAddress", vformat_attribute_get_nth_value(attr, 1));
+ osxml_node_add(current, "Street", vformat_attribute_get_nth_value(attr, 2));
+ osxml_node_add(current, "City", vformat_attribute_get_nth_value(attr, 3));
+ osxml_node_add(current, "Region", vformat_attribute_get_nth_value(attr, 4));
+ osxml_node_add(current, "PostalCode", vformat_attribute_get_nth_value(attr, 5));
+ osxml_node_add(current, "Country", vformat_attribute_get_nth_value(attr, 6));
+ return current;
+}
+
+static xmlNode *handle_label_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling AddressLabel attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"AddressLabel", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_telephone_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Telephone attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Telephone", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_email_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling EMail attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"EMail", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_mailer_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Mailer attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Mailer", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_timezone_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Timezone attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Timezone", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_location_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Location attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Location", NULL);
+ osxml_node_add(current, "Latitude", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(current, "Longitude", vformat_attribute_get_nth_value(attr, 1));
+ return current;
+}
+
+static xmlNode *handle_title_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Title attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Title", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_role_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Role attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Role", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_logo_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Logo attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Logo", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_organization_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Organization attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Organization", NULL);
+ osxml_node_add(current, "Name", vformat_attribute_get_nth_value(attr, 0));
+ osxml_node_add(current, "Department", vformat_attribute_get_nth_value(attr, 1));
+
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ values = g_list_nth(values, 2);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Unit", retstr->str);
+ }
+ return current;
+}
+
+static xmlNode *handle_note_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Note attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Note", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_revision_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ const char *tmp;
+ char *revision;
+
+ osync_trace(TRACE_INTERNAL, "Handling Revision attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Revision", NULL);
+ tmp = vformat_attribute_get_nth_value(attr, 0);
+ revision = osync_time_timestamp(tmp);
+ osxml_node_add(current, "Content", revision);
+ free(revision);
+ return current;
+}
+
+static xmlNode *handle_sound_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Sound attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Sound", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_url_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Url attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Url", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_uid_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Uid attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Uid", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_key_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Key attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Key", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_nickname_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Nickname attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Nickname", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_class_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Class attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Class", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_categories_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Categories attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Categories", NULL);
+
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Category", retstr->str);
+ }
+
+ return current;
+}
+
+static xmlNode *handle_unknown_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown attribute %s", vformat_attribute_get_name(attr));
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"UnknownNode", NULL);
+ osxml_node_add(current, "NodeName", vformat_attribute_get_name(attr));
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Content", retstr->str);
+ }
+ return current;
+}
+
+static void vcard_handle_parameter(GHashTable *hooks, xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, hooks, current, param);
+
+ //Find the handler for this parameter
+ void (* param_handler)(xmlNode *, VFormatParam *);
+ char *paramname = g_strdup_printf("%s=%s", vformat_attribute_param_get_name(param), vformat_attribute_param_get_nth_value(param, 0));
+ param_handler = g_hash_table_lookup(hooks, paramname);
+ g_free(paramname);
+ if (!param_handler)
+ param_handler = g_hash_table_lookup(hooks, vformat_attribute_param_get_name(param));
+
+ if (param_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+
+ if (param_handler)
+ param_handler(current, param);
+ else
+ handle_unknown_parameter(current, param);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void vcard_handle_attribute(GHashTable *hooks, xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, hooks, root, attr, attr ? vformat_attribute_get_name(attr) : "None");
+ xmlNode *current = NULL;
+
+ //Dont add empty stuff
+ GList *v;
+ for (v = vformat_attribute_get_values(attr); v; v = v->next) {
+ char *value = v->data;
+ if (strlen(value) != 0)
+ goto has_value;
+ }
+ osync_trace(TRACE_EXIT, "%s: No values", __func__);
+ return;
+
+has_value:;
+
+ //We need to find the handler for this attribute
+ xmlNode *(* attr_handler)(xmlNode *, VFormatAttribute *) = g_hash_table_lookup(hooks, vformat_attribute_get_name(attr));
+ osync_trace(TRACE_INTERNAL, "Hook is: %p", attr_handler);
+ if (attr_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+ if (attr_handler)
+ current = attr_handler(root, attr);
+ else
+ current = handle_unknown_attribute(root, attr);
+
+ //Handle all parameters of this attribute
+ GList *params = vformat_attribute_get_params(attr);
+ GList *p = NULL;
+ for (p = params; p; p = p->next) {
+ VFormatParam *param = p->data;
+ vcard_handle_parameter(hooks, current, param);
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void _generate_formatted_name(VFormat *vcard, xmlNode *root)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, root);
+ VFormatAttribute *n = vformat_find_attribute(vcard, "N");
+ GList *v = vformat_attribute_get_values(n);
+ GString *fnentry;
+ fnentry = g_string_new("");
+
+ // NAME:LAST;FIRST;ADDITIONAL;PREFIX;SUFFIX
+ // FN:PREFIX FIRST ADDITIONAL LAST SUFFIX
+
+ int order[5] = {3, 1, 2, 0, 4};
+ int i = 0;
+ char *str = NULL;
+ for (i = 0; i < 5; i++) {
+ if ((str = g_list_nth_data(v, order[i])) && str[0]) {
+ if (fnentry->len != 0)
+ g_string_append(fnentry, " ");
+ g_string_append(fnentry, str);
+ }
+ }
+
+ osync_trace(TRACE_INTERNAL, "Handling formattedname attribute");
+
+ if (fnentry->len != 0) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"FormattedName", NULL);
+ osxml_node_add(current, "Content", fnentry->str);
+ } else {
+ osync_trace(TRACE_INTERNAL, "FN is empty!");
+ }
+
+ g_string_free(fnentry,TRUE);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+}
+
+static void _generate_name_from_fn(VFormat *vcard, xmlNode *root)
+{
+ /*
+ * We copy FN to N:LASTNAME because we don't now how FN was build.
+ * e.g. we don't know if FN is "PREFIX FIRST LAST" or "FIRST ADDITIONAL LAST"
+ * With copying FN to N we prevent the vcard from being invalid.
+ */
+
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, root);
+ VFormatAttribute *n = vformat_find_attribute(vcard, "FN");
+ char *fn = vformat_attribute_get_value(n);
+
+ osync_trace(TRACE_INTERNAL, "Handling name attribute");
+ if (strlen(fn) != 0) {
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Name", NULL);
+ osxml_node_add(current, "LastName", fn);
+ } else {
+ osync_trace(TRACE_INTERNAL, "Name is empty");
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+}
+
+static osync_bool conv_vcard_to_xml(void *conv_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, conv_data, input, inpsize, output, outpsize, free_input, error);
+
+ GHashTable *hooks = (GHashTable *)conv_data;
+
+ osync_trace(TRACE_SENSITIVE, "Input Vcard is:\n%s", input);
+
+ /* The input is not null-terminated, but vformat_new_from_string() expects a null-terminated string */
+ char *input_str = g_malloc(inpsize + 1);
+ memcpy(input_str, input, inpsize);
+ input_str[inpsize] = '\0';
+
+ //Parse the vcard
+ VFormat *vcard = vformat_new_from_string(input_str);
+
+ g_free(input_str);
+
+ osync_trace(TRACE_INTERNAL, "Creating xml doc");
+
+ //Create a new xml document
+ xmlDoc *doc = xmlNewDoc((xmlChar*)"1.0");
+ xmlNode *root = osxml_node_add_root(doc, "contact");
+
+ osync_trace(TRACE_INTERNAL, "parsing attributes");
+
+ //For every attribute we have call the handling hook
+ GList *attributes = vformat_get_attributes(vcard);
+ GList *a = NULL;
+ for (a = attributes; a; a = a->next) {
+ VFormatAttribute *attr = a->data;
+ vcard_handle_attribute(hooks, root, attr);
+ }
+
+ //Generate FormattedName from Name if it doesn't exist
+ if (!vformat_find_attribute(vcard, "FN") && vformat_find_attribute(vcard, "N")) {
+ _generate_formatted_name(vcard,root);
+ }
+
+ //Generate Name from FormattedName if it doesn't exist
+ if (!vformat_find_attribute(vcard, "N") && vformat_find_attribute(vcard, "FN")) {
+ _generate_name_from_fn(vcard,root);
+ }
+
+ xmlChar *str = osxml_write_to_string(doc);
+ osync_trace(TRACE_SENSITIVE, "Output XML is:\n%s", str);
+ xmlFree(str);
+
+ *free_input = TRUE;
+ *output = (char *)doc;
+ *outpsize = sizeof(doc);
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+static osync_bool needs_encoding(const unsigned char *tmp, const char *encoding)
+{
+ int i = 0;
+ if (!strcmp(encoding, "QUOTED-PRINTABLE")) {
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127 || tmp[i] == 10 || tmp[i] == 13)
+ return TRUE;
+ i++;
+ }
+ } else {
+ return !g_utf8_validate((gchar*)tmp, -1, NULL);
+ }
+ return FALSE;
+}
+
+static osync_bool needs_charset(const unsigned char *tmp)
+{
+ int i = 0;
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127)
+ return TRUE;
+ i++;
+ }
+ return FALSE;
+}
+
+static void add_value(VFormatAttribute *attr, xmlNode *parent, const char *name, const char *encoding)
+{
+ char *tmp = osxml_find_node(parent, name);
+
+ if (!tmp) {
+ /* If there is no node with the given name, add an empty value to the list.
+ * This is necessary because some fields (N and ADR, for example) need
+ * a specific order of the values
+ */
+ tmp = g_strdup("");
+ }
+
+ if (needs_charset((unsigned char*)tmp))
+ if (!vformat_attribute_has_param (attr, "CHARSET"))
+ vformat_attribute_add_param_with_value(attr, "CHARSET", "UTF-8");
+
+ if (needs_encoding((unsigned char*)tmp, encoding)) {
+ if (!vformat_attribute_has_param (attr, "ENCODING"))
+ vformat_attribute_add_param_with_value(attr, "ENCODING", encoding);
+ vformat_attribute_add_value_decoded(attr, tmp, strlen(tmp) + 1);
+ } else
+ vformat_attribute_add_value(attr, tmp);
+ g_free(tmp);
+}
+
+/**
+ * handle_xml_type_parameter:
+ * Photo or Logo Type will be IANA Mime type or not set
+ * @param attr
+ * @param current
+ */
+static void handle_xml_type_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "%s: nodename=%s",
+ __func__, (char *)current->parent->name);
+ char *content = (char*)xmlNodeGetContent(current);
+ if(!xmlStrcmp(current->parent->name, (const xmlChar *)"Photo") || !xmlStrcmp(current->parent->name, (const xmlChar *)"Logo")) {
+ content = (char *)rewrite_mime_type((const char *)content, 1);
+ if(!content)
+ return;
+ }
+ VFormatParam *param = vformat_attribute_param_new("TYPE");
+ vformat_attribute_param_add_value(param, content);
+ vformat_attribute_add_param (attr, param);
+}
+
+/**
+ * handle_xml_type_parameter:
+ * Photo or Logo Type will be not IANA Mime type or not set
+ * @param attr
+ * @param current
+ */
+static void handle_xml_type_no_iana_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "%s: nodename=%s",
+ __func__, (char *)current->parent->name);
+ char *content = (char*)xmlNodeGetContent(current);
+ if(!xmlStrcmp(current->parent->name, (const xmlChar *)"Photo") || !xmlStrcmp(current->parent->name, (const xmlChar *)"Logo")) {
+ content = (char *)rewrite_mime_type((const char *)content, 0);
+ if(!content)
+ return;
+ }
+ VFormatParam *param = vformat_attribute_param_new("TYPE");
+ vformat_attribute_param_add_value(param, content);
+ vformat_attribute_add_param (attr, param);
+}
+
+static void handle_xml_encoding_21_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "%s()",__func__);
+ char *content = (char*)xmlNodeGetContent(current);
+ if (_helper_is_base64((const char *)content))
+ {
+ g_free(content);
+ content=g_strdup("BASE64");
+ }
+ VFormatParam *param = vformat_attribute_param_new("ENCODING");
+ vformat_attribute_param_add_value(param, content);
+ vformat_attribute_add_param (attr, param);
+ g_free(content);
+}
+
+static void handle_xml_encoding_30_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "%s()",__func__);
+ char *content = (char*)xmlNodeGetContent(current);
+ VFormatParam *param = vformat_attribute_param_new("ENCODING");
+ if (_helper_is_base64((const char *)content))
+ {
+ g_free(content);
+ content=g_strdup("B");
+ }
+ vformat_attribute_param_add_value(param, content);
+ vformat_attribute_add_param (attr, param);
+ g_free(content);
+}
+
+static void handle_xml_value_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling value xml parameter");
+ char *content = (char*)xmlNodeGetContent(current);
+ VFormatParam *param = vformat_attribute_param_new("VALUE");
+ vformat_attribute_param_add_value(param, content);
+ vformat_attribute_add_param (attr, param);
+ g_free(content);
+}
+
+static void handle_xml_category_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling category xml parameter");
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_value(attr, content);
+ g_free(content);
+}
+
+static void handle_xml_unit_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unit xml parameter");
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_value(attr, content);
+ g_free(content);
+}
+
+static void xml_handle_unknown_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown xml parameter %s", current->name);
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, (char*)current->name, content);
+ g_free(content);
+}
+
+static void xml_vcard_handle_parameter(OSyncHookTables *hooks, VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, hooks, attr, current, current ? (char *)current->name : "None");
+
+ //Find the handler for this parameter
+ void (* xml_param_handler)(VFormatAttribute *attr, xmlNode *);
+ char *content = (char*)xmlNodeGetContent(current);
+ char *paramname = g_strdup_printf("%s=%s", current->name, content);
+ g_free(content);
+ xml_param_handler = g_hash_table_lookup(hooks->parameters, paramname);
+ g_free(paramname);
+ if (!xml_param_handler)
+ xml_param_handler = g_hash_table_lookup(hooks->parameters, current->name);
+
+ if (xml_param_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+
+ if (xml_param_handler)
+ xml_param_handler(attr, current);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static VFormatAttribute *xml_handle_unknown_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown xml attribute %s", root->name);
+ char *name = osxml_find_node(root, "NodeName");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, name);
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_formatted_name_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling formatted name xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "FN");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_name_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling name xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "N");
+ add_value(attr, root, "LastName", encoding);
+ add_value(attr, root, "FirstName", encoding);
+ add_value(attr, root, "Additional", encoding);
+ add_value(attr, root, "Prefix", encoding);
+ add_value(attr, root, "Suffix", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_agent_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling agent xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "AGENT");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static void xml_vcard_handle_attribute(OSyncHookTables *hooks, VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, hooks, vcard, root, root ? (char *)root->name : "None");
+ VFormatAttribute *attr = NULL;
+
+ //We need to find the handler for this attribute
+ VFormatAttribute *(* xml_attr_handler)(VFormat *vcard, xmlNode *root, const char *) = g_hash_table_lookup(hooks->attributes, root->name);
+ osync_trace(TRACE_INTERNAL, "xml hook is: %p", xml_attr_handler);
+ if (xml_attr_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+ if (xml_attr_handler)
+ attr = xml_attr_handler(vcard, root, encoding);
+ else {
+ osync_trace(TRACE_EXIT, "%s: Ignored2", __func__);
+ return;
+ }
+
+ //Handle all parameters of this attribute
+ xmlNode *child = root->xmlChildrenNode;
+ while (child) {
+ xml_vcard_handle_parameter(hooks, attr, child);
+ child = child->next;
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static VFormatAttribute *handle_xml_photo_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "%s:Handling photo xml attribute", __func__);
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "PHOTO");
+ add_value(attr, root, "Content", encoding);
+// vformat_attribute_add_param_with_value(attr, "ENCODING", "b");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_photo_base64_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "%s:Handling photo xml attribute", __func__);
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "PHOTO");
+ add_value(attr, root, "Content", encoding);
+// vformat_attribute_add_param_with_value(attr, "ENCODING", "BASE64");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_birthday_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling birthday xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "BDAY");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_address_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling address xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ADR");
+ add_value(attr, root, "PostalBox", encoding);
+ add_value(attr, root, "ExtendedAddress", encoding);
+ add_value(attr, root, "Street", encoding);
+ add_value(attr, root, "City", encoding);
+ add_value(attr, root, "Region", encoding);
+ add_value(attr, root, "PostalCode", encoding);
+ add_value(attr, root, "Country", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_label_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling label xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "LABEL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_telephone_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling telephone xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TEL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_email_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling email xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "EMAIL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_mailer_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling mailer xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "MAILER");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_timezone_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling timezone xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TZ");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_location_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling location xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "GEO");
+ add_value(attr, root, "Latitude", encoding);
+ add_value(attr, root, "Longitude", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_title_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling title xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "TITLE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_role_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling role xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ROLE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_logo_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling logo xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "LOGO");
+ add_value(attr, root, "Content", encoding);
+ //vformat_attribute_add_param_with_value(attr, "ENCODING", "b");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_organization_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling organization xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "ORG");
+ add_value(attr, root, "Name", encoding);
+ add_value(attr, root, "Department", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_note_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling note xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "NOTE");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_revision_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling revision xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "REV");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_sound_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling sound xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "SOUND");
+ add_value(attr, root, "Content", encoding);
+ //vformat_attribute_add_param_with_value(attr, "ENCODING", "b");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_url_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling url xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "URL");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_uid_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling uid xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "UID");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_key_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling key xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "KEY");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_nickname_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling nickname xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "NICKNAME");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_class_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling class xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CLASS");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_categories_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling categories xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CATEGORIES");
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static osync_bool conv_xml_to_vcard(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error, int target)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, user_data, input, inpsize, output, outpsize, free_input, error);
+
+ xmlChar *str = osxml_write_to_string((xmlDoc *)input);
+ osync_trace(TRACE_SENSITIVE, "Input XML is:\n%s", str);
+ xmlFree(str);
+
+ //Get the root node of the input document
+ xmlNode *root = xmlDocGetRootElement((xmlDoc *)input);
+ if (!root) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get xml root element");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (xmlStrcmp(root->name, (const xmlChar *)"contact")) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Wrong xml root element");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ //Make the new vcard
+ VFormat *vcard = vformat_new();
+
+ osync_trace(TRACE_INTERNAL, "parsing cml attributes");
+ const char *std_encoding = NULL;
+ if (target == VFORMAT_CARD_21)
+ std_encoding = "QUOTED-PRINTABLE";
+ else
+ std_encoding = "B";
+
+ OSyncHookTables *hooks = (OSyncHookTables *)user_data;
+ /* vcard21 / vcard30 */
+ if (target == VFORMAT_CARD_21) {
+ g_hash_table_insert(hooks->attributes, "Photo", handle_xml_photo_base64_attribute);
+ g_hash_table_insert(hooks->parameters, "Type", handle_xml_type_no_iana_parameter);
+ g_hash_table_insert(hooks->parameters, "Encoding", handle_xml_encoding_21_parameter);
+ } else {
+ g_hash_table_insert(hooks->attributes, "Photo", handle_xml_photo_attribute);
+ g_hash_table_insert(hooks->parameters, "Type", handle_xml_type_parameter);
+ g_hash_table_insert(hooks->parameters, "Encoding", handle_xml_encoding_30_parameter);
+ }
+
+ if (root)
+ root = root->children;
+ while (root) {
+ xml_vcard_handle_attribute(hooks, vcard, root, std_encoding);
+ root = root->next;
+ }
+
+ *free_input = TRUE;
+ *output = vformat_to_string(vcard, target);
+ osync_trace(TRACE_SENSITIVE, "vcard output is: \n%s", *output);
+ *outpsize = strlen(*output);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+
+ return TRUE;
+}
+
+static osync_bool conv_xml_to_vcard30(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ return conv_xml_to_vcard(user_data, input, inpsize, output, outpsize, free_input, error, VFORMAT_CARD_30);
+}
+
+static osync_bool conv_xml_to_vcard21(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ return conv_xml_to_vcard(user_data, input, inpsize, output, outpsize, free_input, error, VFORMAT_CARD_21);
+}
+
+static OSyncConvCmpResult compare_contact(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, leftchange, rightchange);
+
+ OSyncXMLScore score[] =
+ {
+ //{30, "/contact/FullName"},
+ {100, "/contact/Name"},
+ //{20, "/contact/Telephone"},
+ //{20, "/contact/Address"},
+ {0, "/contact/UnknownNode"},
+ {0, "/contact/*/Slot"},
+ {0, "/contact/*/Type"},
+ {0, "/contact/WantsHtml"},
+ {0, "/contact/Class"},
+ {0, "/contact/FileAs"},
+ {0, "/contact/IM-ICQ"},
+ {0, "/contact/AddressLabel"},
+ {0, "/contact/Uid"},
+ {0, "/contact/Revision"},
+ {0, NULL}
+ };
+
+ OSyncConvCmpResult ret = osxml_compare((xmlDoc*)osync_change_get_data(leftchange), (xmlDoc*)osync_change_get_data(rightchange), score, 0, 99);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, ret);
+ return ret;
+}
+
+static char *print_contact(OSyncChange *change)
+{
+ xmlDoc *doc = (xmlDoc *)osync_change_get_data(change);
+
+ return (char *)osxml_write_to_string(doc);
+}
+
+static void destroy_xml(char *data, size_t size)
+{
+ xmlFreeDoc((xmlDoc *)data);
+}
+
+static void *init_vcard_to_xml(void)
+{
+ osync_trace(TRACE_ENTRY, "%s", __func__);
+ GHashTable *table = g_hash_table_new(g_str_hash, g_str_equal);
+
+ g_hash_table_insert(table, "FN", handle_formatted_name_attribute);
+ g_hash_table_insert(table, "N", handle_name_attribute);
+ g_hash_table_insert(table, "AGENT", handle_agent_attribute);
+ g_hash_table_insert(table, "PHOTO", handle_photo_attribute);
+ g_hash_table_insert(table, "BDAY", handle_birthday_attribute);
+ g_hash_table_insert(table, "ADR", handle_address_attribute);
+ g_hash_table_insert(table, "LABEL", handle_label_attribute);
+ g_hash_table_insert(table, "TEL", handle_telephone_attribute);
+ g_hash_table_insert(table, "EMAIL", handle_email_attribute);
+ g_hash_table_insert(table, "MAILER", handle_mailer_attribute);
+ g_hash_table_insert(table, "TZ", handle_timezone_attribute);
+ g_hash_table_insert(table, "GEO", handle_location_attribute);
+ g_hash_table_insert(table, "TITLE", handle_title_attribute);
+ g_hash_table_insert(table, "ROLE", handle_role_attribute);
+ g_hash_table_insert(table, "LOGO", handle_logo_attribute);
+ g_hash_table_insert(table, "ORG", handle_organization_attribute);
+ g_hash_table_insert(table, "NOTE", handle_note_attribute);
+ g_hash_table_insert(table, "REV", handle_revision_attribute);
+ g_hash_table_insert(table, "SOUND", handle_sound_attribute);
+ g_hash_table_insert(table, "URL", handle_url_attribute);
+ g_hash_table_insert(table, "UID", handle_uid_attribute);
+ g_hash_table_insert(table, "KEY", handle_key_attribute);
+ g_hash_table_insert(table, "NICKNAME", handle_nickname_attribute);
+ g_hash_table_insert(table, "CLASS", handle_class_attribute);
+ g_hash_table_insert(table, "CATEGORIES", handle_categories_attribute);
+
+ g_hash_table_insert(table, "VERSION", HANDLE_IGNORE);
+ g_hash_table_insert(table, "BEGIN", HANDLE_IGNORE);
+ g_hash_table_insert(table, "END", HANDLE_IGNORE);
+
+ g_hash_table_insert(table, "ENCODING", handle_encoding_parameter);
+ g_hash_table_insert(table, "CHARSET", HANDLE_IGNORE);
+
+ g_hash_table_insert(table, "TYPE", handle_type_parameter);
+ g_hash_table_insert(table, "VALUE", handle_value_parameter);
+
+ g_hash_table_insert(table, "X-IRMC-LUID", HANDLE_IGNORE);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, table);
+ return (void *)table;
+}
+
+static void fin_vcard_to_xml(void *data)
+{
+ g_hash_table_destroy((GHashTable *)data);
+}
+
+static void *init_xml_to_vcard(void)
+{
+ osync_trace(TRACE_ENTRY, "%s", __func__);
+
+ OSyncHookTables *hooks = g_malloc0(sizeof(OSyncHookTables));
+
+ hooks->attributes = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->parameters = g_hash_table_new(g_str_hash, g_str_equal);
+
+ g_hash_table_insert(hooks->attributes, "FormattedName", handle_xml_formatted_name_attribute);
+ g_hash_table_insert(hooks->attributes, "Name", handle_xml_name_attribute);
+ g_hash_table_insert(hooks->attributes, "Agent", handle_xml_agent_attribute);
+ g_hash_table_insert(hooks->attributes, "Birthday", handle_xml_birthday_attribute);
+ g_hash_table_insert(hooks->attributes, "Address", handle_xml_address_attribute);
+ g_hash_table_insert(hooks->attributes, "AddressLabel", handle_xml_label_attribute);
+ g_hash_table_insert(hooks->attributes, "Telephone", handle_xml_telephone_attribute);
+ g_hash_table_insert(hooks->attributes, "EMail", handle_xml_email_attribute);
+ g_hash_table_insert(hooks->attributes, "Mailer", handle_xml_mailer_attribute);
+ g_hash_table_insert(hooks->attributes, "Timezone", handle_xml_timezone_attribute);
+ g_hash_table_insert(hooks->attributes, "Location", handle_xml_location_attribute);
+ g_hash_table_insert(hooks->attributes, "Title", handle_xml_title_attribute);
+ g_hash_table_insert(hooks->attributes, "Role", handle_xml_role_attribute);
+ g_hash_table_insert(hooks->attributes, "Logo", handle_xml_logo_attribute);
+ g_hash_table_insert(hooks->attributes, "Organization", handle_xml_organization_attribute);
+ g_hash_table_insert(hooks->attributes, "Note", handle_xml_note_attribute);
+ g_hash_table_insert(hooks->attributes, "Revision", handle_xml_revision_attribute);
+ g_hash_table_insert(hooks->attributes, "Sound", handle_xml_sound_attribute);
+ g_hash_table_insert(hooks->attributes, "Url", handle_xml_url_attribute);
+ g_hash_table_insert(hooks->attributes, "Uid", handle_xml_uid_attribute);
+ g_hash_table_insert(hooks->attributes, "Key", handle_xml_key_attribute);
+ g_hash_table_insert(hooks->attributes, "Nickname", handle_xml_nickname_attribute);
+ g_hash_table_insert(hooks->attributes, "Class", handle_xml_class_attribute);
+ g_hash_table_insert(hooks->attributes, "Categories", handle_xml_categories_attribute);
+ g_hash_table_insert(hooks->attributes, "UnknownNode", xml_handle_unknown_attribute);
+
+ /* disable general Type handling .... because Photo type needs to be handled
+ seperatly
+ g_hash_table_insert(hooks->parameters, "Type", handle_xml_type_parameter);*/
+ g_hash_table_insert(hooks->parameters, "Value", handle_xml_value_parameter);
+ g_hash_table_insert(hooks->parameters, "Category", handle_xml_category_parameter);
+ g_hash_table_insert(hooks->parameters, "Unit", handle_xml_unit_parameter);
+
+ g_hash_table_insert(hooks->parameters, "UnknownParam", xml_handle_unknown_parameter);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, hooks);
+ return (void *)hooks;
+}
+
+static void fin_xml_to_vcard(void *data)
+{
+ OSyncHookTables *hooks = (OSyncHookTables *)data;
+ g_hash_table_destroy(hooks->attributes);
+ g_hash_table_destroy(hooks->parameters);
+ g_free(hooks);
+}
+
+static time_t get_revision(OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, change, error);
+
+ xmlDoc *doc = (xmlDoc *)osync_change_get_data(change);
+
+ xmlXPathObject *xobj = osxml_get_nodeset(doc, "/contact/Revision");
+
+ xmlNodeSet *nodes = xobj->nodesetval;
+
+ int size = (nodes) ? nodes->nodeNr : 0;
+ if (size != 1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find the revision");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return -1;
+ }
+
+ char *revision = (char*)osxml_find_node(nodes->nodeTab[0], "Content");
+
+ osync_trace(TRACE_INTERNAL, "About to convert string %s", revision);
+ time_t time = vformat_time_to_unix(revision);
+ g_free(revision);
+ xmlXPathFreeObject(xobj);
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, time);
+ return time;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "contact");
+ osync_env_register_objformat(env, "contact", "xml-contact");
+ osync_env_format_set_compare_func(env, "xml-contact", compare_contact);
+ osync_env_format_set_destroy_func(env, "xml-contact", destroy_xml);
+ osync_env_format_set_print_func(env, "xml-contact", print_contact);
+ osync_env_format_set_copy_func(env, "xml-contact", osxml_copy);
+ osync_env_format_set_revision_func(env, "xml-contact", get_revision);
+ osync_env_format_set_marshall_func(env, "xml-contact", osxml_marshall);
+ osync_env_format_set_demarshall_func(env, "xml-contact", osxml_demarshall);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "vcard21", "xml-contact", conv_vcard_to_xml);
+ osync_env_converter_set_init(env, "vcard21", "xml-contact", init_vcard_to_xml, fin_vcard_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-contact", "vcard21", conv_xml_to_vcard21);
+ osync_env_converter_set_init(env, "xml-contact", "vcard21", init_xml_to_vcard, fin_xml_to_vcard);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "vcard30", "xml-contact", conv_vcard_to_xml);
+ osync_env_converter_set_init(env, "vcard30", "xml-contact", init_vcard_to_xml, fin_vcard_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-contact", "vcard30", conv_xml_to_vcard30);
+ osync_env_converter_set_init(env, "xml-contact", "vcard30", init_xml_to_vcard, fin_xml_to_vcard);
+}
+
+/**
+ * rewrite_mime_type: rewrites a IANA or not IANA mime type
+ * Internet Assigned Numbers Authority mime types are only supported in
+ * VCARD:3.0.
+ * VCARD:2.1 only supports the following mime types: GIF, CGM, WMF, BMP,
+ * MET, PMB, DIB, PICT, TIFF, PS, PDF, JPEG, MPEG, MPEG2, AVI, QTIME, WAVE,
+ * PCM, AIFF
+ *
+ * @param source_format: could be a IANA ("image/jpeg") or not IANA ("JPEG")
+ * @param use_iana: 0 rewrite to not IANA, 1 rewrite to IANA
+ * @returns IANA / not IANA mime type or NULL if not found
+ **/
+static const char * rewrite_mime_type(const char * source_format, int use_iana)
+{
+ osync_trace(TRACE_INTERNAL, "%s: source_format = %s", __func__, source_format);
+ char * iana_format = NULL;
+ char * not_iana_format = NULL;
+
+ if ( (!g_ascii_strcasecmp (source_format, "JPEG")) ||
+ (!g_ascii_strcasecmp (source_format, "image/jpeg")) ) {
+ iana_format = "image/jpeg";
+ not_iana_format = "JPEG";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "TIFF")) ||
+ (!g_ascii_strcasecmp (source_format, "image/tiff")) ) {
+ iana_format = "image/tiff";
+ not_iana_format = "TIFF";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "GIF")) ||
+ (!g_ascii_strcasecmp (source_format, "image/gif")) ) {
+ iana_format = "image/gif";
+ not_iana_format = "GIF";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "CGM")) ||
+ (!g_ascii_strcasecmp (source_format, "image/cgm")) ) {
+ iana_format = "image/cgm";
+ not_iana_format = "CGM";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "BMP")) ||
+ (!g_ascii_strcasecmp (source_format, "image/x-ms-bmp")) ) {
+ iana_format = "image/x-ms-bmp";
+ not_iana_format = "BMP";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "PS")) ||
+ (!g_ascii_strcasecmp (source_format, "application/postscript")) ) {
+ iana_format = "application/postscript";
+ not_iana_format = "PS";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "PDF")) ||
+ (!g_ascii_strcasecmp (source_format, "application/pdf")) ) {
+ iana_format = "application/pdf";
+ not_iana_format = "PDF";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "MPEG")) ||
+ (!g_ascii_strcasecmp (source_format, "video/mpeg")) ) {
+ iana_format = "video/mpeg";
+ not_iana_format = "MPEG";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "MPEG2")) ||
+ (!g_ascii_strcasecmp (source_format, "video/mpeg")) ) {
+ iana_format = "video/mpeg";
+ not_iana_format = "MPEG2";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "AVI")) ||
+ (!g_ascii_strcasecmp (source_format, "video/x-msvideo")) ) {
+ iana_format = "video/x-msvideo";
+ not_iana_format = "AVI";
+ goto NORMAL_EXIT;
+ }
+ if ( (!g_ascii_strcasecmp (source_format, "QTIME")) ||
+ (!g_ascii_strcasecmp (source_format, "video/quicktime")) ) {
+ iana_format = "video/quicktime";
+ not_iana_format = "QTIME";
+ goto NORMAL_EXIT;
+ }
+
+ /*FIXME:vcard 2.1 only no iana typ found*/
+ if ( !g_ascii_strcasecmp (source_format, "WMF") ) {
+ goto NO_IANA;
+ }
+ if ( !g_ascii_strcasecmp (source_format, "MET") ) {
+ goto NO_IANA;
+ }
+ if ( !g_ascii_strcasecmp (source_format, "PMB") ) {
+ goto NO_IANA;
+ }
+ if ( !g_ascii_strcasecmp (source_format, "DIB") ) {
+ goto NO_IANA;
+ }
+ if ( !g_ascii_strcasecmp (source_format, "PICT") ) {
+ goto NO_IANA;
+ }
+ if ( !g_ascii_strcasecmp (source_format, "WAVE") ) {
+ goto NO_IANA;
+ }
+ if ( !g_ascii_strcasecmp (source_format, "PCM") ) {
+ goto NO_IANA;
+ }
+ if ( !g_ascii_strcasecmp (source_format, "AIFF") ) {
+ goto NO_IANA;
+ }
+
+/*NO_MATCH:*/
+ osync_trace(TRACE_INTERNAL, "%s:[NO_MATCH] output = NULL ", __func__);
+ return(NULL);
+
+NO_IANA:
+ osync_trace(TRACE_INTERNAL, "%s:[NO_IANA] output = %s ", __func__, source_format);
+ if (!use_iana)
+ return(source_format);
+ return(NULL);
+
+NORMAL_EXIT:
+ if (use_iana)
+ {
+ osync_trace(TRACE_INTERNAL, "%s:[NORMAL_EXIT] output = %s ", __func__, iana_format);
+ return (iana_format);
+ }
+ osync_trace(TRACE_INTERNAL, "%s:[NORMAL_EXIT] output = %s ", __func__, not_iana_format);
+ return(not_iana_format);
+}
+
+/**
+ * _helper_is_base64 is helper function to check i a string is "b" or "base64"
+ * @param check_string string that should be compared with "b" or "base64"
+ * @return 0 if check_string is not base64 and 1 if it is
+ */
+static int _helper_is_base64(const char *check_string)
+{
+ if(!g_ascii_strcasecmp ((char *) check_string, "BASE64") ||
+ !g_ascii_strcasecmp ((char *) check_string, "b") )
+ return (1);
+ return (0);
+}
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.h b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.h
new file mode 100644
index 00000000..e84bfa3d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vcard.h
@@ -0,0 +1,11 @@
+#ifndef _XMLVCARD_H_
+#define _XMLVCARD_H_
+
+typedef struct OSyncHookTables {
+ GHashTable *attributes;
+ GHashTable *parameters;
+} OSyncHookTables;
+
+#define HANDLE_IGNORE (void *)1
+
+#endif //_XMLVCARD_H_
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.c b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.c
new file mode 100644
index 00000000..ce8580c4
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.c
@@ -0,0 +1,672 @@
+/*
+ * xml-vnote - A plugin for parsing vnote objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+#include "vformat.h"
+#include "xml-vnote.h"
+#include <glib.h>
+
+static void handle_unknown_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown parameter %s", vformat_attribute_param_get_name(param));
+ xmlNode *property = xmlNewTextChild(current, NULL, (xmlChar*)"UnknownParam",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+ osxml_node_add(property, "ParamName", vformat_attribute_param_get_name(param));
+}
+
+static xmlNode *handle_created_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ char *timestamp;
+ const char *tmp;
+
+ osync_trace(TRACE_INTERNAL, "Handling created attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"DateCreated", NULL);
+ tmp = vformat_attribute_get_nth_value(attr, 0);
+ timestamp = osync_time_timestamp(tmp);
+ osxml_node_add(current, "Content", timestamp);
+ g_free(timestamp);
+ return current;
+}
+
+static xmlNode *handle_last_modified_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling last_modified attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"LastModified", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_summary_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling summary attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Summary", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_categories_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Categories attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Categories", NULL);
+
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Category", retstr->str);
+ }
+
+ return current;
+}
+
+static xmlNode *handle_body_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling body attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Body", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static xmlNode *handle_class_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling Class attribute");
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"Class", NULL);
+ osxml_node_add(current, "Content", vformat_attribute_get_nth_value(attr, 0));
+ return current;
+}
+
+static void handle_type_parameter(xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_INTERNAL, "Handling type parameter %s", vformat_attribute_param_get_name(param));
+ xmlNewTextChild(current, NULL, (xmlChar*)"Type",
+ (xmlChar*)vformat_attribute_param_get_nth_value(param, 0));
+}
+
+static xmlNode *handle_unknown_attribute(xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown attribute %s", vformat_attribute_get_name(attr));
+ xmlNode *current = xmlNewTextChild(root, NULL, (xmlChar*)"UnknownNode", NULL);
+ osxml_node_add(current, "NodeName", vformat_attribute_get_name(attr));
+ GList *values = vformat_attribute_get_values_decoded(attr);
+ for (; values; values = values->next) {
+ GString *retstr = (GString *)values->data;
+ g_assert(retstr);
+ osxml_node_add(current, "Content", retstr->str);
+ }
+ return current;
+}
+
+static void vnote_handle_parameter(GHashTable *hooks, xmlNode *current, VFormatParam *param)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, hooks, current, param);
+
+ //Find the handler for this parameter
+ void (* param_handler)(xmlNode *, VFormatParam *);
+ char *paramname = g_strdup_printf("%s=%s", vformat_attribute_param_get_name(param), vformat_attribute_param_get_nth_value(param, 0));
+ param_handler = g_hash_table_lookup(hooks, paramname);
+ g_free(paramname);
+ if (!param_handler)
+ param_handler = g_hash_table_lookup(hooks, vformat_attribute_param_get_name(param));
+
+ if (param_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+
+ if (param_handler)
+ param_handler(current, param);
+ else
+ handle_unknown_parameter(current, param);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void vnote_handle_attribute(GHashTable *hooks, xmlNode *root, VFormatAttribute *attr)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, hooks, root, attr, attr ? vformat_attribute_get_name(attr) : "None");
+ xmlNode *current = NULL;
+
+ //Dont add empty stuff
+ GList *v;
+ for (v = vformat_attribute_get_values(attr); v; v = v->next) {
+ char *value = v->data;
+ if (strlen(value) != 0)
+ goto has_value;
+ }
+ osync_trace(TRACE_EXIT, "%s: No values", __func__);
+ return;
+
+has_value:;
+
+ //We need to find the handler for this attribute
+ xmlNode *(* attr_handler)(xmlNode *, VFormatAttribute *) = g_hash_table_lookup(hooks, vformat_attribute_get_name(attr));
+ osync_trace(TRACE_INTERNAL, "Hook is: %p", attr_handler);
+ if (attr_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+ if (attr_handler)
+ current = attr_handler(root, attr);
+ else
+ current = handle_unknown_attribute(root, attr);
+
+ //Handle all parameters of this attribute
+ GList *params = vformat_attribute_get_params(attr);
+ GList *p = NULL;
+ for (p = params; p; p = p->next) {
+ VFormatParam *param = p->data;
+ vnote_handle_parameter(hooks, current, param);
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static osync_bool conv_vnote_to_xml(void *conv_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, conv_data, input, inpsize, output, outpsize, free_input, error);
+
+ GHashTable *hooks = (GHashTable *)conv_data;
+
+ osync_trace(TRACE_SENSITIVE, "Input vnote is:\n%s", input);
+
+ /* The input is not null-terminated, but vformat_new_from_string() expects a null-terminated string */
+ char *input_str = g_malloc(inpsize + 1);
+ memcpy(input_str, input, inpsize);
+ input_str[inpsize] = '\0';
+
+ //Parse the vnote
+ VFormat *vnote = vformat_new_from_string(input_str);
+
+ g_free(input_str);
+
+ osync_trace(TRACE_INTERNAL, "Creating xml doc");
+
+ //Create a new xml document
+ xmlDoc *doc = xmlNewDoc((xmlChar*)"1.0");
+ xmlNode *root = osxml_node_add_root(doc, "Note");
+
+ osync_trace(TRACE_INTERNAL, "parsing attributes");
+
+ //For every attribute we have call the handling hook
+ GList *attributes = vformat_get_attributes(vnote);
+ GList *a = NULL;
+ for (a = attributes; a; a = a->next) {
+ VFormatAttribute *attr = a->data;
+ vnote_handle_attribute(hooks, root, attr);
+ }
+
+ xmlChar *str = osxml_write_to_string(doc);
+ osync_trace(TRACE_SENSITIVE, "Output XML is:\n%s", str);
+ xmlFree(str);
+
+ *free_input = TRUE;
+ *output = (char *)doc;
+ *outpsize = sizeof(doc);
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+static osync_bool conv_memo_to_xml(void *conv_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, conv_data, input, inpsize, output, outpsize, free_input, error);
+
+ osync_trace(TRACE_SENSITIVE, "Input memo is:\n%s", input);
+
+ xmlNode *current = NULL;
+
+ //Create a new xml document
+ xmlDoc *doc = xmlNewDoc((xmlChar*)"1.0");
+ xmlNode *root = osxml_node_add_root(doc, "Note");
+
+ // Summary & Body
+ if (input) {
+ gchar **splitMemo = g_strsplit(input, "\n", 2);
+
+ current = xmlNewTextChild(root, NULL, (xmlChar*)"Summary", NULL);
+ xmlNewTextChild(current, NULL, (xmlChar*)"Content", (xmlChar*)splitMemo[0]);
+
+ current = xmlNewTextChild(root, NULL, (xmlChar*)"Body", NULL);
+ xmlNewTextChild(current, NULL, (xmlChar*)"Content", (xmlChar*)splitMemo[1]);
+
+ g_strfreev(splitMemo);
+ }
+
+ xmlChar *str = osxml_write_to_string(doc);
+ osync_trace(TRACE_SENSITIVE, "Output XML is:\n%s", str);
+ xmlFree(str);
+
+ *free_input = TRUE;
+ *output = (char *)doc;
+ *outpsize = sizeof(doc);
+
+ osync_trace(TRACE_EXIT, "%s: TRUE", __func__);
+ return TRUE;
+}
+
+static osync_bool needs_encoding(const unsigned char *tmp, const char *encoding)
+{
+ int i = 0;
+ if (!strcmp(encoding, "QUOTED-PRINTABLE")) {
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127 || tmp[i] == 10 || tmp[i] == 13)
+ return TRUE;
+ i++;
+ }
+ } else {
+ return !g_utf8_validate((gchar*)tmp, -1, NULL);
+ }
+ return FALSE;
+}
+
+static osync_bool needs_charset(const unsigned char *tmp)
+{
+ int i = 0;
+ while (tmp[i] != 0) {
+ if (tmp[i] > 127)
+ return TRUE;
+ i++;
+ }
+ return FALSE;
+}
+
+static void add_value(VFormatAttribute *attr, xmlNode *parent, const char *name, const char *encoding)
+{
+ char *tmp = osxml_find_node(parent, name);
+ if (!tmp)
+ return;
+
+ if (needs_charset((unsigned char*)tmp))
+ if (!vformat_attribute_has_param (attr, "CHARSET"))
+ vformat_attribute_add_param_with_value(attr, "CHARSET", "UTF-8");
+
+ if (needs_encoding((unsigned char*)tmp, encoding)) {
+ if (!vformat_attribute_has_param (attr, "ENCODING"))
+ vformat_attribute_add_param_with_value(attr, "ENCODING", encoding);
+ vformat_attribute_add_value_decoded(attr, tmp, strlen(tmp) + 1);
+ } else
+ vformat_attribute_add_value(attr, tmp);
+ g_free(tmp);
+}
+
+static void handle_xml_type_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling type xml parameter");
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, "TYPE", content);
+ g_free(content);
+}
+
+static void handle_xml_category_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling category xml parameter");
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_value(attr, content);
+ g_free(content);
+}
+
+static void xml_handle_unknown_parameter(VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown xml parameter %s", current->name);
+ char *content = (char*)xmlNodeGetContent(current);
+ vformat_attribute_add_param_with_value(attr, (char*)current->name, content);
+ g_free(content);
+}
+
+static VFormatAttribute *handle_xml_categories_attribute(VFormat *vnote, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling categories xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CATEGORIES");
+ vformat_add_attribute(vnote, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_class_attribute(VFormat *vnote, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling class xml attribute");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "CLASS");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vnote, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_summary_attribute(VFormat *vnote, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "SUMMARY");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vnote, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_body_attribute(VFormat *vnote, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "BODY");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vnote, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_created_attribute(VFormat *vnote, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "DCREATED");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vnote, attr);
+ return attr;
+}
+
+static VFormatAttribute *handle_xml_last_modified_attribute(VFormat *vcard, xmlNode *root, const char *encoding)
+{
+ VFormatAttribute *attr = vformat_attribute_new(NULL, "LAST-MODIFIED");
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vcard, attr);
+ return attr;
+}
+
+static void xml_vnote_handle_parameter(OSyncHookTables *hooks, VFormatAttribute *attr, xmlNode *current)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, hooks, attr, current, current ? (char *)current->name : "None");
+
+ //Find the handler for this parameter
+ void (* xml_param_handler)(VFormatAttribute *attr, xmlNode *);
+ char *content = (char*)xmlNodeGetContent(current);
+ char *paramname = g_strdup_printf("%s=%s", current->name, content);
+ g_free(content);
+ xml_param_handler = g_hash_table_lookup(hooks->parameters, paramname);
+ g_free(paramname);
+ if (!xml_param_handler)
+ xml_param_handler = g_hash_table_lookup(hooks->parameters, current->name);
+
+ if (xml_param_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+
+ if (xml_param_handler)
+ xml_param_handler(attr, current);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static VFormatAttribute *xml_handle_unknown_attribute(VFormat *vnote, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_INTERNAL, "Handling unknown xml attribute %s", root->name);
+ char *name = osxml_find_node(root, "NodeName");
+ VFormatAttribute *attr = vformat_attribute_new(NULL, name);
+ add_value(attr, root, "Content", encoding);
+ vformat_add_attribute(vnote, attr);
+ return attr;
+}
+
+static void xml_vnote_handle_attribute(OSyncHookTables *hooks, VFormat *vnote, xmlNode *root, const char *encoding)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p:%s)", __func__, hooks, vnote, root, root ? (char *)root->name : "None");
+ VFormatAttribute *attr = NULL;
+
+ //We need to find the handler for this attribute
+ VFormatAttribute *(* xml_attr_handler)(VFormat *vnote, xmlNode *root, const char *) = g_hash_table_lookup(hooks->attributes, root->name);
+ osync_trace(TRACE_INTERNAL, "xml hook is: %p", xml_attr_handler);
+ if (xml_attr_handler == HANDLE_IGNORE) {
+ osync_trace(TRACE_EXIT, "%s: Ignored", __func__);
+ return;
+ }
+ if (xml_attr_handler)
+ attr = xml_attr_handler(vnote, root, encoding);
+ else {
+ osync_trace(TRACE_EXIT, "%s: Ignored2", __func__);
+ return;
+ }
+
+ //Handle all parameters of this attribute
+ xmlNode *child = root->xmlChildrenNode;
+ while (child) {
+ xml_vnote_handle_parameter(hooks, attr, child);
+ child = child->next;
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static osync_bool conv_xml_to_vnote(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, user_data, input, inpsize, output, outpsize, free_input, error);
+
+ xmlChar *str = osxml_write_to_string((xmlDoc *)input);
+ osync_trace(TRACE_SENSITIVE, "Input XML is:\n%s", str);
+ xmlFree(str);
+
+ //Get the root node of the input document
+ xmlNode *root = osxml_node_get_root((xmlDoc *)input, "Note", error);
+ if (!root) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get root element of xml-note");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ //Make the new vnote
+ VFormat *vnote = vformat_new();
+
+ osync_trace(TRACE_INTERNAL, "parsing xml attributes");
+ while (root) {
+ xml_vnote_handle_attribute((OSyncHookTables *)user_data, vnote, root, "QUOTED-PRINTABLE");
+ root = root->next;
+ }
+
+ *free_input = TRUE;
+ *output = vformat_to_string(vnote, VFORMAT_NOTE);
+ osync_trace(TRACE_SENSITIVE, "vnote output is: \n%s", *output);
+ *outpsize = strlen(*output);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+
+ return TRUE;
+}
+
+static osync_bool conv_xml_to_memo(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p, %p, %p, %p)", __func__, user_data, input, inpsize, output, outpsize, free_input, error);
+
+ xmlChar *str = osxml_write_to_string((xmlDoc *)input);
+ osync_trace(TRACE_SENSITIVE, "Input XML is:\n%s", str);
+ xmlFree(str);
+
+ //Get the root node of the input document
+ xmlNode *root = xmlDocGetRootElement((xmlDoc *)input);
+
+ if (!root) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get xml root element");
+ goto error;
+ }
+
+ if (xmlStrcmp(root->name, (const xmlChar *)"Note")) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Wrong xml root element");
+ goto error;
+ }
+
+ GString *memo = g_string_new("");
+
+ // Summary
+ xmlNode *cur = osxml_get_node(root, "Summary");
+
+ if (cur)
+ memo = g_string_append(memo, osxml_find_node(cur, "Content"));
+
+ // Body
+ cur = osxml_get_node(root, "Body");
+ if (cur) {
+ if (memo->len > 0)
+ memo = g_string_append(memo, "\n");
+
+ memo = g_string_append(memo, osxml_find_node(cur, "Content"));
+ }
+
+ *free_input = TRUE;
+ *output = g_string_free(memo, FALSE);
+ osync_trace(TRACE_SENSITIVE, "memo output is: \n%s", *output);
+ *outpsize = strlen(*output);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+static OSyncConvCmpResult compare_notes(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, leftchange, rightchange);
+
+ OSyncXMLScore score[] =
+ {
+ {100, "/Note/Summary"},
+ {100, "/Note/Body"},
+ {0, "/Note/*/Type"},
+ {0, "/Note/Uid"},
+ {0, "/Note/LastModified"},
+ {0, "/Note/DateCreated"},
+ {0, NULL}
+ };
+
+ OSyncConvCmpResult ret = osxml_compare((xmlDoc*)osync_change_get_data(leftchange), (xmlDoc*)osync_change_get_data(rightchange), score, 0, 199);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, ret);
+ return ret;
+}
+
+static char *print_note(OSyncChange *change)
+{
+ xmlDoc *doc = (xmlDoc *)osync_change_get_data(change);
+
+ return (char *)osxml_write_to_string(doc);
+}
+
+static void destroy_xml(char *data, size_t size)
+{
+ xmlFreeDoc((xmlDoc *)data);
+}
+
+static void *init_vnote_to_xml(void)
+{
+ osync_trace(TRACE_ENTRY, "%s", __func__);
+ GHashTable *table = g_hash_table_new(g_str_hash, g_str_equal);
+
+ g_hash_table_insert(table, "X-IRMC-LUID", HANDLE_IGNORE);
+ g_hash_table_insert(table, "DCREATED", handle_created_attribute);
+ g_hash_table_insert(table, "LAST-MODIFIED", handle_last_modified_attribute);
+ g_hash_table_insert(table, "SUMMARY", handle_summary_attribute);
+ g_hash_table_insert(table, "BODY", handle_body_attribute);
+ g_hash_table_insert(table, "CLASS", handle_class_attribute);
+ g_hash_table_insert(table, "CATEGORIES", handle_categories_attribute);
+
+ g_hash_table_insert(table, "VERSION", HANDLE_IGNORE);
+ g_hash_table_insert(table, "BEGIN", HANDLE_IGNORE);
+ g_hash_table_insert(table, "END", HANDLE_IGNORE);
+
+ g_hash_table_insert(table, "ENCODING", HANDLE_IGNORE);
+ g_hash_table_insert(table, "CHARSET", HANDLE_IGNORE);
+
+ g_hash_table_insert(table, "TYPE", handle_type_parameter);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, table);
+ return (void *)table;
+}
+
+static void fin_vnote_to_xml(void *data)
+{
+ g_hash_table_destroy((GHashTable *)data);
+}
+
+static void *init_xml_to_vnote(void)
+{
+ osync_trace(TRACE_ENTRY, "%s", __func__);
+
+ OSyncHookTables *hooks = g_malloc0(sizeof(OSyncHookTables));
+
+ hooks->attributes = g_hash_table_new(g_str_hash, g_str_equal);
+ hooks->parameters = g_hash_table_new(g_str_hash, g_str_equal);
+
+ g_hash_table_insert(hooks->attributes, "Summary", handle_xml_summary_attribute);
+ g_hash_table_insert(hooks->attributes, "Body", handle_xml_body_attribute);
+ g_hash_table_insert(hooks->attributes, "Class", handle_xml_class_attribute);
+ g_hash_table_insert(hooks->attributes, "Categories", handle_xml_categories_attribute);
+ g_hash_table_insert(hooks->attributes, "UnknownNode", xml_handle_unknown_attribute);
+ g_hash_table_insert(hooks->attributes, "DateCreated", handle_xml_created_attribute);
+ g_hash_table_insert(hooks->attributes, "LastModified", handle_xml_last_modified_attribute);
+
+ g_hash_table_insert(hooks->parameters, "Type", handle_xml_type_parameter);
+ g_hash_table_insert(hooks->parameters, "Category", handle_xml_category_parameter);
+
+ g_hash_table_insert(hooks->parameters, "UnknownParameter", xml_handle_unknown_parameter);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, hooks);
+ return (void *)hooks;
+}
+
+static void fin_xml_to_vnote(void *data)
+{
+ OSyncHookTables *hooks = (OSyncHookTables *)data;
+ g_hash_table_destroy(hooks->attributes);
+ g_hash_table_destroy(hooks->parameters);
+ g_free(hooks);
+}
+
+static time_t get_revision(OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, change, error);
+
+ xmlDoc *doc = (xmlDoc *)osync_change_get_data(change);
+
+ xmlXPathObject *xobj = osxml_get_nodeset(doc, "/Note/LastModified");
+
+ xmlNodeSet *nodes = xobj->nodesetval;
+
+ int size = (nodes) ? nodes->nodeNr : 0;
+ if (size != 1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find the revision");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return -1;
+ }
+
+ char *revision = (char*)osxml_find_node(nodes->nodeTab[0], "Content");
+
+ osync_trace(TRACE_INTERNAL, "About to convert string %s", revision);
+ time_t time = vformat_time_to_unix(revision);
+ g_free(revision);
+ xmlXPathFreeObject(xobj);
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, time);
+ return time;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "note");
+ osync_env_register_objformat(env, "note", "xml-note");
+ osync_env_format_set_compare_func(env, "xml-note", compare_notes);
+ osync_env_format_set_destroy_func(env, "xml-note", destroy_xml);
+ osync_env_format_set_print_func(env, "xml-note", print_note);
+ osync_env_format_set_copy_func(env, "xml-note", osxml_copy);
+ osync_env_format_set_revision_func(env, "xml-note", get_revision);
+ osync_env_format_set_marshall_func(env, "xml-note", osxml_marshall);
+ osync_env_format_set_demarshall_func(env, "xml-note", osxml_demarshall);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "vnote11", "xml-note", conv_vnote_to_xml);
+ osync_env_converter_set_init(env, "vnote11", "xml-note", init_vnote_to_xml, fin_vnote_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-note", "vnote11", conv_xml_to_vnote);
+ osync_env_converter_set_init(env, "xml-note", "vnote11", init_xml_to_vnote, fin_xml_to_vnote);
+
+ osync_env_register_converter(env, CONVERTER_CONV, "memo", "xml-note", conv_memo_to_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-note", "memo", conv_xml_to_memo);
+}
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.h b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.h
new file mode 100644
index 00000000..1b76878c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xml-vnote.h
@@ -0,0 +1,11 @@
+#ifndef _XMLVNOTE_H_
+#define _XMLVNOTE_H_
+
+typedef struct OSyncHookTables {
+ GHashTable *attributes;
+ GHashTable *parameters;
+} OSyncHookTables;
+
+#define HANDLE_IGNORE (void *)1
+
+#endif //_XMLVNOTE_H_
diff --git a/debian/opensync/opensync-0.22/formats/vformats-xml/xmldoc.c b/debian/opensync/opensync-0.22/formats/vformats-xml/xmldoc.c
new file mode 100644
index 00000000..3bf998df
--- /dev/null
+++ b/debian/opensync/opensync-0.22/formats/vformats-xml/xmldoc.c
@@ -0,0 +1,76 @@
+/*
+ * xmldoc - serialised textual versions of the XML event formats, for external plugins
+ * Copyright (C) 2006 Andrew Baumann <andrewb@cse.unsw.edu.au>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "xml-support.h"
+
+static osync_bool from_xml(void *conv_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ return osxml_marshall(input, inpsize, output, outpsize, error);
+}
+
+static osync_bool to_xml(void *conv_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ return osxml_demarshall(input, inpsize, output, outpsize, error);
+}
+
+static osync_bool copy_string(const char *input, int inpsize, char **output, int *outpsize)
+{
+ *output = strdup(input);
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+static void destroy(char *input, size_t inpsize)
+{
+ free(input);
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "event");
+ osync_env_register_objformat(env, "event", "xml-event-doc");
+ osync_env_format_set_destroy_func(env, "xml-event-doc", destroy);
+ osync_env_format_set_copy_func(env, "xml-event-doc", copy_string);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-event", "xml-event-doc", from_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-event-doc", "xml-event", to_xml);
+
+ osync_env_register_objtype(env, "todo");
+ osync_env_register_objformat(env, "todo", "xml-todo-doc");
+ osync_env_format_set_destroy_func(env, "xml-todo-doc", destroy);
+ osync_env_format_set_copy_func(env, "xml-todo-doc", copy_string);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-todo", "xml-todo-doc", from_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-todo-doc", "xml-todo", to_xml);
+
+ osync_env_register_objtype(env, "contact");
+ osync_env_register_objformat(env, "contact", "xml-contact-doc");
+ osync_env_format_set_destroy_func(env, "xml-contact-doc", destroy);
+ osync_env_format_set_copy_func(env, "xml-contact-doc", copy_string);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-contact", "xml-contact-doc", from_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-contact-doc", "xml-contact", to_xml);
+
+ osync_env_register_objtype(env, "note");
+ osync_env_register_objformat(env, "note", "xml-note-doc");
+ osync_env_format_set_destroy_func(env, "xml-note-doc", destroy);
+ osync_env_format_set_copy_func(env, "xml-note-doc", copy_string);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-note", "xml-note-doc", from_xml);
+ osync_env_register_converter(env, CONVERTER_CONV, "xml-note-doc", "xml-note", to_xml);
+}
diff --git a/debian/opensync/opensync-0.22/install-sh b/debian/opensync/opensync-0.22/install-sh
new file mode 100755
index 00000000..4d4a9519
--- /dev/null
+++ b/debian/opensync/opensync-0.22/install-sh
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-05-14.22
+
+# 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. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+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:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
+ shift
+ shift
+ continue;;
+
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; 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
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ 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 "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # 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: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ shift
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # 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
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $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 "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit 1
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); 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:
diff --git a/debian/opensync/opensync-0.22/ltmain.sh b/debian/opensync/opensync-0.22/ltmain.sh
new file mode 100644
index 00000000..c715b594
--- /dev/null
+++ b/debian/opensync/opensync-0.22/ltmain.sh
@@ -0,0 +1,6871 @@
+# 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
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@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.22 Debian 1.5.22-4"
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ 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.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# 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/"
+
+#####################################
+# 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_xdir="$my_gentop/$my_xlib"
+
+ $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"
+ $echo
+ $echo "Copyright (C) 2005 Free Software Foundation, Inc."
+ $echo "This is free software; see the source for copying conditions. There is NO"
+ $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ exit $?
+ ;;
+
+ --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 ;;
+ *.f90) xform=f90 ;;
+ *.for) xform=for ;;
+ *.java) xform=java ;;
+ 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)
+ if test "X$arg" = "X-all-static"; then
+ 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
+ else
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ fi
+ 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)
+ 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
+ # -pg pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+ -t[45]*|-txscale*|@*)
+
+ # 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*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # 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)
+ # 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%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $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)
+ 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 -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)
+ current=`expr $number_major + $number_minor`
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ current=`expr $number_major + $number_minor - 1`
+ age="$number_minor"
+ revision="$number_minor"
+ ;;
+ *)
+ $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
+ ;;
+ 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`
+ verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ irix | nonstopux)
+ major=`expr $current - $age + 1`
+
+ 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
+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
+ if test "$?" -eq 0 ; 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" -ne "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: dynamic linker does not accept needed library $i."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which I believe you do not have"
+ $echo "*** because a test_compile did reveal that the linker did not use it for"
+ $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error 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
+ $LTCC $LTCFLAGS -o conftest conftest.c $i
+ # Did it work?
+ if test "$?" -eq 0 ; 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
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ 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
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ 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" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ else
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ fi
+ ;;
+ * )
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ 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" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ 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" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ 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" | $Xsed -e "$sed_quote_subst"`
+ 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'
+
+# 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 \${1+\"\$@\"}\"
+ exit $EXIT_FAILURE
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit $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" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ 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" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ 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" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $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
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit $EXIT_FAILURE
+ 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
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
+
+ # 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@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 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:
diff --git a/debian/opensync/opensync-0.22/misc/buildtest.sh b/debian/opensync/opensync-0.22/misc/buildtest.sh
new file mode 100755
index 00000000..4a69011c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/misc/buildtest.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+echo -n "Cleaning Stuff now"
+
+rm -rf _inst > /dev/null
+echo -n "."
+rm -rf libopensync-0.?? > /dev/null
+echo -n "."
+rm -f libopensync-0.??.tar.gz > /dev/null
+echo "."
+
+TOP_SRCDIR=$(pwd)
+
+echo -n "Making sure build environment is sane"
+autoreconf -sfi > /dev/null
+echo -n "."
+./configure > /dev/null
+echo -n "."
+make clean > /dev/null || exit 1
+echo "."
+
+echo "Making tarball"
+make dist > /dev/null || exit 1
+
+mkdir _inst > /dev/null
+rm -rf libopensync-0.??
+
+echo "Unpacking tarball"
+tar zxvf libopensync-0.??.tar.gz > /dev/null || exit 1
+
+cd libopensync-0.??
+
+echo -n "Checking if configure is working"
+./configure --enable-tests=no --disable-python > /dev/null || exit 1
+echo -n "Making OpenSync"
+autoreconf -sfi > /dev/null
+echo -n "."
+./configure --prefix=$TOP_SRCDIR/_inst > /dev/null || exit 1
+echo -n "."
+make install > /dev/null || exit 1
+echo "."
+
+echo "Makeing clean"
+make distclean > /dev/null || exit 1
+
+echo -n "Making OpenSync"
+./configure --enable-tests=no --enable-python --prefix=$TOP_SRCDIR/_inst > /dev/null || exit 1
+echo -n "."
+make install > /dev/null || exit 1
+echo "."
+
+cd $TOP_SRCDIR/docs/example-plugin
+
+echo -n "Making example plugin"
+export PKG_CONFIG_PATH=$TOP_SRCDIR/_inst/lib
+autoreconf -sfi > /dev/null
+echo -n "."
+./configure --prefix=$TOP_SRCDIR/_inst > /dev/null || exit 1
+echo -n "."
+make install > /dev/null || exit 1
+echo -n "."
+make distclean > /dev/null || exit 1
+echo "."
+
+cd $TOP_SRCDIR/libopensync-0.?? || exit 1
+
+echo "Running tests now."
+make check || exit 1
+
+cd $TOP_SRCDIR
+
+rm -rf _inst
+rm -rf libopensync-0.??
+
+echo "Everyting went fine!"
diff --git a/debian/opensync/opensync-0.22/misc/doxygen.css b/debian/opensync/opensync-0.22/misc/doxygen.css
new file mode 100644
index 00000000..64a23fff
--- /dev/null
+++ b/debian/opensync/opensync-0.22/misc/doxygen.css
@@ -0,0 +1,302 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+ font-family: sans-serif;
+}
+BODY,TD {
+ font-size: 90%;
+}
+H1 {
+ text-align: center;
+ font-size: 160%;
+}
+H2 {
+ font-size: 120%;
+}
+H3 {
+ font-size: 110%;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+ width: 100%;
+ background-color: #eeeeff;
+ border: 1px solid #b0b0b0;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.nav {
+ width: 100%;
+ background-color: #eeeeff;
+ border: 1px solid #b0b0b0;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+A.qindex {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D;
+}
+A.qindex:visited {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D
+}
+A.qindex:hover {
+ text-decoration: none;
+ background-color: #ddddff;
+}
+A.qindexHL {
+ text-decoration: none;
+ font-weight: bold;
+ background-color: #6666cc;
+ color: #ffffff;
+ border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+ text-decoration: none;
+ background-color: #6666cc;
+ color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+.fragment {
+ font-family: monospace
+}
+PRE.fragment {
+ border: 1px solid #CCCCCC;
+ background-color: #f5f5f5;
+ margin-top: 4px;
+ margin-bottom: 4px;
+ margin-left: 2px;
+ margin-right: 8px;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md {
+ background-color: #F4F4FB;
+ font-weight: bold;
+}
+TD.mdPrefix {
+ background-color: #F4F4FB;
+ color: #606060;
+ font-size: 80%;
+}
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ margin-bottom: 6px;
+ font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
+BODY {
+ background: white;
+ color: black;
+ margin-right: 20px;
+ margin-left: 20px;
+}
+TD.indexkey {
+ background-color: #eeeeff;
+ font-weight: bold;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+ background-color: #eeeeff;
+ font-style: italic;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TR.memlist {
+ background-color: #f0f0f0;
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword { color: #008000 }
+SPAN.keywordtype { color: #604020 }
+SPAN.keywordflow { color: #e08000 }
+SPAN.comment { color: #800000 }
+SPAN.preprocessor { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral { color: #008080 }
+.mdTable {
+ border: 1px solid #868686;
+ background-color: #F4F4FB;
+ width: 100%;
+}
+.mdRow {
+ width: 100%;
+ padding: 8px 10px;
+}
+.mdescLeft {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.mdescRight {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.memItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplParams {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ color: #606060;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.search { color: #003399;
+ font-weight: bold;
+}
+FORM.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #eeeeff;
+}
+TD.tiny { font-size: 75%;
+}
+a {
+ color: #252E78;
+}
+a:visited {
+ color: #3D2185;
+}
+.dirtab { padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #b0b0b0;
+}
+TH.dirtab { background: #eeeeff;
+ font-weight: bold;
+}
+HR { height: 1px;
+ border: none;
+ border-top: 1px solid black;
+}
diff --git a/debian/opensync/opensync-0.22/missing b/debian/opensync/opensync-0.22/missing
new file mode 100755
index 00000000..894e786e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@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=:
+
+# 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'
+ 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@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 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ 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 [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -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 [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -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 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -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 's/.*-o \([^ ]*\).*/\1/p'`
+ 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:
diff --git a/debian/opensync/opensync-0.22/opensync-1.0-uninstalled.pc.in b/debian/opensync/opensync-0.22/opensync-1.0-uninstalled.pc.in
new file mode 100644
index 00000000..666e377f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync-1.0-uninstalled.pc.in
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@ac_workaround_abs_builddir@
+includedir=@ac_workaround_abs_srcdir@
+datarootdir=@datarootdir@
+plugindir=@OPENSYNC_PLUGINDIR@
+configdir=@OPENSYNC_CONFIGDIR@
+headerdir=@OPENSYNC_HEADERDIR@
+formatsdir=@OPENSYNC_FORMATSDIR@
+
+Name: opensync
+Description: OpenSync synchronization framework (uninstalled version)
+Version: @VERSION@
+Libs: -L${libdir} -lopensync
+Cflags: -I${includedir}
diff --git a/debian/opensync/opensync-0.22/opensync-1.0.pc.in b/debian/opensync/opensync-0.22/opensync-1.0.pc.in
new file mode 100644
index 00000000..f6cca19f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync-1.0.pc.in
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datarootdir=@datarootdir@
+plugindir=@OPENSYNC_PLUGINDIR@
+configdir=@OPENSYNC_CONFIGDIR@
+headerdir=@OPENSYNC_HEADERDIR@
+formatsdir=@OPENSYNC_FORMATSDIR@
+
+Name: opensync
+Description: OpenSync synchronization framework
+Version: @VERSION@
+Libs: -L${libdir} -lopensync
+Cflags: -I${includedir}/opensync-1.0
diff --git a/debian/opensync/opensync-0.22/opensync/Makefile.am b/debian/opensync/opensync-0.22/opensync/Makefile.am
new file mode 100755
index 00000000..1ca81459
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/Makefile.am
@@ -0,0 +1,81 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+
+INCLUDES = @PACKAGE_CFLAGS@
+
+lib_LTLIBRARIES = libopensync.la
+
+opensyncincludedir = @OPENSYNC_HEADERDIR@
+
+opensyncinclude_HEADERS = \
+ opensync.h \
+ opensync_env.h \
+ opensync_plugin.h \
+ opensync_group.h \
+ opensync_member.h \
+ opensync_change.h \
+ opensync_error.h \
+ opensync_hashtable.h \
+ opensync_context.h \
+ opensync_convert.h \
+ opensync_convreg.h \
+ opensync_anchor.h \
+ opensync_filter.h \
+ opensync_time.h \
+ opensync_xml.h \
+ opensync_debug.h \
+ opensync_changecmds.h \
+ opensync_serializer.h
+
+EXTRA_DIST = \
+ opensync_internals.h \
+ opensync_anchor.h \
+ opensync_db_bdb.h \
+ opensync_db_internals.h \
+ opensync_format_internals.h \
+ opensync_member_internals.h \
+ opensync_message_internals.h \
+ opensync_plugin_internals.h \
+ opensync_queue_internals.h \
+ opensync_env_internals.h \
+ opensync_error_internals.h \
+ opensync_filter_internals.h \
+ opensync_change_internals.h \
+ opensync_context_internals.h \
+ opensync_group_internals.h \
+ opensync_hashtable_internals.h \
+ opensync_support.h \
+ opensync_user_internals.h \
+ opensync_time_internals.h
+
+libopensync_la_SOURCES = \
+ opensync_debug.c \
+ opensync_env.c \
+ opensync_db.c \
+ opensync_plugin.c \
+ opensync_group.c \
+ opensync_user.c \
+ opensync_member.c \
+ opensync_change.c \
+ opensync_hashtable.c \
+ opensync_error.c \
+ opensync_context.c \
+ opensync_convert.c \
+ opensync_changecmds.c \
+ opensync_convreg.c \
+ opensync_anchor.c \
+ opensync_time.c \
+ opensync_xml.c \
+ opensync_filter.c \
+ opensync_queue.c \
+ opensync_message.c \
+ opensync_serializer.c
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+libopensync_la_LDFLAGS = @PACKAGE_LIBS@ @GCOV_LDFLAGS@
+libopensync_la_LIBADD = @XML_LIBS@
diff --git a/debian/opensync/opensync-0.22/opensync/Makefile.in b/debian/opensync/opensync-0.22/opensync/Makefile.in
new file mode 100644
index 00000000..b577ee2e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/Makefile.in
@@ -0,0 +1,629 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = opensync
+DIST_COMMON = $(opensyncinclude_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+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)$(opensyncincludedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libopensync_la_DEPENDENCIES =
+am_libopensync_la_OBJECTS = opensync_debug.lo opensync_env.lo \
+ opensync_db.lo opensync_plugin.lo opensync_group.lo \
+ opensync_user.lo opensync_member.lo opensync_change.lo \
+ opensync_hashtable.lo opensync_error.lo opensync_context.lo \
+ opensync_convert.lo opensync_changecmds.lo opensync_convreg.lo \
+ opensync_anchor.lo opensync_time.lo opensync_xml.lo \
+ opensync_filter.lo opensync_queue.lo opensync_message.lo \
+ opensync_serializer.lo
+libopensync_la_OBJECTS = $(am_libopensync_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libopensync_la_SOURCES)
+DIST_SOURCES = $(libopensync_la_SOURCES)
+opensyncincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(opensyncinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+INCLUDES = @PACKAGE_CFLAGS@
+lib_LTLIBRARIES = libopensync.la
+opensyncincludedir = @OPENSYNC_HEADERDIR@
+opensyncinclude_HEADERS = \
+ opensync.h \
+ opensync_env.h \
+ opensync_plugin.h \
+ opensync_group.h \
+ opensync_member.h \
+ opensync_change.h \
+ opensync_error.h \
+ opensync_hashtable.h \
+ opensync_context.h \
+ opensync_convert.h \
+ opensync_convreg.h \
+ opensync_anchor.h \
+ opensync_filter.h \
+ opensync_time.h \
+ opensync_xml.h \
+ opensync_debug.h \
+ opensync_changecmds.h \
+ opensync_serializer.h
+
+EXTRA_DIST = \
+ opensync_internals.h \
+ opensync_anchor.h \
+ opensync_db_bdb.h \
+ opensync_db_internals.h \
+ opensync_format_internals.h \
+ opensync_member_internals.h \
+ opensync_message_internals.h \
+ opensync_plugin_internals.h \
+ opensync_queue_internals.h \
+ opensync_env_internals.h \
+ opensync_error_internals.h \
+ opensync_filter_internals.h \
+ opensync_change_internals.h \
+ opensync_context_internals.h \
+ opensync_group_internals.h \
+ opensync_hashtable_internals.h \
+ opensync_support.h \
+ opensync_user_internals.h \
+ opensync_time_internals.h
+
+libopensync_la_SOURCES = \
+ opensync_debug.c \
+ opensync_env.c \
+ opensync_db.c \
+ opensync_plugin.c \
+ opensync_group.c \
+ opensync_user.c \
+ opensync_member.c \
+ opensync_change.c \
+ opensync_hashtable.c \
+ opensync_error.c \
+ opensync_context.c \
+ opensync_convert.c \
+ opensync_changecmds.c \
+ opensync_convreg.c \
+ opensync_anchor.c \
+ opensync_time.c \
+ opensync_xml.c \
+ opensync_filter.c \
+ opensync_queue.c \
+ opensync_message.c \
+ opensync_serializer.c
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+libopensync_la_LDFLAGS = @PACKAGE_LIBS@ @GCOV_LDFLAGS@
+libopensync_la_LIBADD = @XML_LIBS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign opensync/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign opensync/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-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) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --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
+libopensync.la: $(libopensync_la_OBJECTS) $(libopensync_la_DEPENDENCIES)
+ $(LINK) -rpath $(libdir) $(libopensync_la_LDFLAGS) $(libopensync_la_OBJECTS) $(libopensync_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_anchor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_change.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_changecmds.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_context.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_convert.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_convreg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_db.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_debug.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_env.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_filter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_group.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_hashtable.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_member.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_message.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_plugin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_queue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_serializer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_time.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_user.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_xml.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-opensyncincludeHEADERS: $(opensyncinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(opensyncincludedir)" || $(mkdir_p) "$(DESTDIR)$(opensyncincludedir)"
+ @list='$(opensyncinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(opensyncincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(opensyncincludedir)/$$f'"; \
+ $(opensyncincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(opensyncincludedir)/$$f"; \
+ done
+
+uninstall-opensyncincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(opensyncinclude_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(opensyncincludedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(opensyncincludedir)/$$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; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(opensyncincludedir)"; 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:
+ -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-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-opensyncincludeHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
+ uninstall-opensyncincludeHEADERS
+
+.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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES install-man \
+ install-opensyncincludeHEADERS install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+ uninstall-libLTLIBRARIES uninstall-opensyncincludeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/opensync/opensync.h b/debian/opensync/opensync-0.22/opensync/opensync.h
new file mode 100755
index 00000000..2d585c13
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync.h
@@ -0,0 +1,85 @@
+#ifndef HAVE_OPENSYNC_H
+#define HAVE_OPENSYNC_H
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <time.h>
+#include <fcntl.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**************************************************************
+ * Defines
+ *************************************************************/
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+/*!
+ * @ingroup OSyncChange
+ * @brief The changetypes of a change object */
+typedef enum {
+ /** Unknown changetype */
+ CHANGE_UNKNOWN = 0,
+ /** Object was added */
+ CHANGE_ADDED = 1,
+ /** Object is unmodifed */
+ CHANGE_UNMODIFIED = 2,
+ /** Object is deleted */
+ CHANGE_DELETED = 3,
+ /** Object has been modified */
+ CHANGE_MODIFIED = 4
+} OSyncChangeType;
+
+/**************************************************************
+ * Structs
+ *************************************************************/
+typedef struct OSyncError OSyncError;
+typedef struct OSyncEnv OSyncEnv;
+typedef struct OSyncPlugin OSyncPlugin;
+typedef struct OSyncGroup OSyncGroup;
+typedef struct OSyncUserInfo OSyncUserInfo;
+typedef struct OSyncMember OSyncMember;
+typedef struct OSyncChange OSyncChange;
+typedef struct OSyncContext OSyncContext;
+typedef struct OSyncHashTable OSyncHashTable;
+typedef struct OSyncFormatEnv OSyncFormatEnv;
+typedef struct OSyncObjType OSyncObjType;
+typedef struct OSyncObjFormat OSyncObjFormat;
+typedef struct OSyncFormatConverter OSyncFormatConverter;
+typedef struct OSyncFormatProperty OSyncFormatProperty;
+typedef struct OSyncFilter OSyncFilter;
+typedef struct OSyncCustomFilter OSyncCustomFilter;
+typedef struct OSyncMessage OSyncMessage;
+typedef struct OSyncQueue OSyncQueue;
+typedef int osync_bool;
+
+#include "opensync_debug.h"
+#include "opensync_env.h"
+#include "opensync_plugin.h"
+#include "opensync_group.h"
+#include "opensync_member.h"
+#include "opensync_error.h"
+#include "opensync_hashtable.h"
+#include "opensync_change.h"
+#include "opensync_context.h"
+#include "opensync_filter.h"
+#include "opensync_convert.h"
+#include "opensync_changecmds.h"
+#include "opensync_convreg.h"
+#include "opensync_anchor.h"
+#include "opensync_time.h"
+#include "opensync_serializer.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_anchor.c b/debian/opensync/opensync-0.22/opensync/opensync_anchor.c
new file mode 100644
index 00000000..fc630616
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_anchor.c
@@ -0,0 +1,105 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync.h>
+#include "opensync_internals.h"
+
+osync_bool osync_anchor_compare(OSyncMember *member, const char *objtype, const char *new_anchor)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %s)", __func__, member, objtype, new_anchor);
+ g_assert(member);
+
+ OSyncError *error = NULL;
+ OSyncDB *db = NULL;
+ if (!(db = osync_db_open_anchor(member, &error)))
+ goto error;
+
+ osync_bool retval = FALSE;
+
+ char *old_anchor = NULL;
+ osync_db_get_anchor(db, objtype, &old_anchor);
+
+ if (old_anchor) {
+ if (!strcmp(old_anchor, new_anchor)) {
+ retval = TRUE;
+ } else {
+ osync_trace(TRACE_INTERNAL, "Anchor mismatch");
+ retval = FALSE;
+ }
+ } else {
+ osync_trace(TRACE_INTERNAL, "No previous anchor");
+ retval = FALSE;
+ }
+
+ osync_db_close_anchor(db);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, retval);
+ return retval;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return FALSE;
+}
+
+void osync_anchor_update(OSyncMember *member, const char *objtype, const char *new_anchor)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %s)", __func__, member, objtype, new_anchor);
+ g_assert(member);
+
+ OSyncError *error = NULL;
+ OSyncDB *db = NULL;
+ if (!(db = osync_db_open_anchor(member, &error)))
+ goto error;
+
+ osync_db_put_anchor(db, objtype, new_anchor);
+ osync_db_close_anchor(db);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return;
+}
+
+char *osync_anchor_retrieve(OSyncMember *member, const char *objtype)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, member, objtype);
+ g_assert(member);
+
+ OSyncError *error = NULL;
+ OSyncDB *db = NULL;
+ if (!(db = osync_db_open_anchor(member, &error)))
+ goto error;
+
+ char *anchor = NULL;
+ osync_db_get_anchor(db, objtype, &anchor);
+ osync_db_close_anchor(db);
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, anchor);
+ return anchor;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return NULL;
+}
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_anchor.h b/debian/opensync/opensync-0.22/opensync/opensync_anchor.h
new file mode 100644
index 00000000..b28624ff
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_anchor.h
@@ -0,0 +1,28 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 _OPENSYNC_ANCHOR_H_
+#define _OPENSYNC_ANCHOR_H_
+
+osync_bool osync_anchor_compare(OSyncMember *member, const char *objtype, const char *new_anchor);
+void osync_anchor_update(OSyncMember *member, const char *objtype, const char *new_anchor);
+char *osync_anchor_retrieve(OSyncMember *member, const char *objtype);
+
+#endif //_OPENSYNC_ANCHOR_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_change.c b/debian/opensync/opensync-0.22/opensync/opensync_change.c
new file mode 100644
index 00000000..b05dcca7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_change.c
@@ -0,0 +1,617 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @defgroup OSyncChangePrivate OpenSync Change Internals
+ * @ingroup OSyncPrivate
+ * @brief The internals of the OSyncChange
+ *
+ */
+/*@{*/
+
+/** Increment the reference count of a change
+ *
+ * @param change The change to ref
+ **/
+void osync_change_ref(OSyncChange *change)
+{
+ g_assert(change);
+ change->refcount++;
+}
+
+/** Decrement the reference count of a change
+ *
+ * @param change The change to decref
+ **/
+void osync_change_decref(OSyncChange *change)
+{
+ g_assert(change);
+ change->refcount--;
+ if (change->refcount >= 0)
+ osync_change_free(change);
+}
+
+/** Get the name of the source object type of a change
+ *
+ * @param change The change
+ * @returns The name of the source object type
+ **/
+const char *osync_change_get_sourceobjtype(OSyncChange *change)
+{
+ g_assert(change);
+ return change->sourceobjtype;
+}
+
+/** Get the name of the inital format of a change
+ *
+ * @param change The change
+ * @returns The name of the inital format
+ **/
+OSyncObjFormat *osync_change_get_initial_objformat(OSyncChange *change)
+{
+ g_assert(change);
+ if (change->initial_format)
+ return change->initial_format;
+
+ if (!change->initial_format)
+ return NULL;
+
+ osync_assert_msg(change->conv_env, "The conv env of the change must be set by calling member_set or conv_env_set");
+ change->initial_format = osync_conv_find_objformat(change->conv_env, change->initial_format_name);
+ return change->initial_format;
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSyncChange OpenSync Change
+ * @ingroup OSyncPublic
+ * @brief The public API of the OSyncChange
+ *
+ */
+/*@{*/
+
+/*! @brief Spawns a new change object
+ *
+ * @returns Newly allocated change object
+ *
+ */
+OSyncChange *osync_change_new(void)
+{
+ osync_trace(TRACE_ENTRY, "%s()", __func__);
+
+ OSyncChange *change = g_malloc0(sizeof(OSyncChange));
+ change->refcount = 1;
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, change);
+ return change;
+}
+
+/*! @brief Frees a change
+ *
+ * @param change The change to free
+ *
+ */
+void osync_change_free(OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, change);
+ g_assert(change);
+
+ //FIXME cleanly release the change!
+ g_free(change);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Frees the data of a change
+ *
+ * This frees the data of a change but does not free
+ * the change itself
+ *
+ * @param change The change of which to free the data
+ *
+ */
+void osync_change_free_data(OSyncChange *change)
+{
+ g_assert(change);
+ g_assert(osync_change_get_objformat(change));
+ if (!osync_change_get_objformat(change)->destroy_func)
+ osync_debug("OSCONV", 1, "Memory leak: can't free data of type %s", osync_change_get_objformat(change)->name);
+ else {
+ osync_debug("OSCONV", 4, "Freeing data of type %s", osync_change_get_objformat(change)->name);
+ osync_change_get_objformat(change)->destroy_func(change->data, change->size);
+ }
+ change->data = NULL;
+ change->size = 0;
+ //FIXME Set format to NULL here?
+}
+
+/*! @brief Resets a change
+ *
+ * Resets the information about changetype, hash, data etc.
+ *
+ * @param change The change to reset
+ *
+ */
+void osync_change_reset(OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, change);
+
+ if (change->hash)
+ g_free(change->hash);
+ change->hash = NULL;
+ //FIXME Release data
+ change->data = NULL;
+ change->size = 0;
+ change->has_data = FALSE;
+ change->changetype = CHANGE_UNKNOWN;
+ //change->sourceobjtype = NULL;
+ //change->destobjtype = NULL;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief This will save a change into the database
+ *
+ * @param change The change to save
+ * @param save_format Wether to save the format or not.
+ * @param error A pointer to a error struct
+ * @returns TRUE if save was successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_change_save(OSyncChange *change, osync_bool save_format, OSyncError **error)
+{
+ if (!change->changes_db)
+ change->changes_db = change->member->group->changes_db;
+ return osync_db_save_change(change, save_format, error);
+}
+
+/*! @brief This will delete a change from the database
+ *
+ * @param change The change to delete
+ * @param error A pointer to a error struct
+ * @returns TRUE if deletion was successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_change_delete(OSyncChange *change, OSyncError **error)
+{
+ return osync_db_delete_change(change, error);
+}
+
+/*! @brief This will load the changes from the database
+ *
+ * This opens the change database and returns an array with
+ * the changes. The changes have to be freed later. The database has
+ * to be closed with a call to osync_changes_close()
+ *
+ * @param group The group for which to load the changes
+ * @param changes An pointer to an array in which to store the changes
+ * @param error A pointer to a error struct
+ * @returns TRUE if load was successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_changes_load(OSyncGroup *group, OSyncChange ***changes, OSyncError **error)
+{
+ return osync_db_open_changes(group, changes, error);
+}
+
+/*! @brief Closes the change database
+ *
+ * @param group The group for which to close the database
+ *
+ */
+void osync_changes_close(OSyncGroup *group)
+{
+ osync_db_close_changes(group);
+}
+
+/*! @brief Gets the member which reported a change
+ *
+ * @param change The change
+ * @returns The member of the change
+ *
+ */
+OSyncMember *osync_change_get_member(OSyncChange *change)
+{
+ g_assert(change);
+ return change->member;
+}
+
+/*! @brief Sets the member of a change
+ *
+ * @param change The change
+ * @param member The member of the change
+ *
+ */
+void osync_change_set_member(OSyncChange *change, OSyncMember *member)
+{
+ g_assert(change);
+ change->member = member;
+ change->conv_env = member->group->conv_env;
+}
+
+/*! @brief Sets the conversion environment of a change
+ *
+ * @param change The change
+ * @param env The conversion environment
+ *
+ */
+void osync_change_set_conv_env(OSyncChange *change, OSyncFormatEnv *env)
+{
+ g_assert(change);
+ change->conv_env = env;
+}
+
+/*! @brief Gets the object type of a change
+ *
+ * @param change The change
+ * @returns The object type
+ *
+ */
+OSyncObjType *osync_change_get_objtype(OSyncChange *change)
+{
+ g_assert(change);
+
+ if (change->objtype)
+ return change->objtype;
+
+ if (!change->objtype_name) {
+ OSyncObjFormat *format = osync_change_get_objformat(change);
+ if (!format)
+ return NULL;
+ change->objtype = format->objtype;
+ return format->objtype;
+ }
+
+ osync_assert_msg(change->conv_env, "The conv env of the change must be set by calling member_set or conv_env_set");
+ change->objtype = osync_conv_find_objtype(change->conv_env, change->objtype_name);
+ return change->objtype;
+}
+
+/*! @brief Sets the object type of a change
+ *
+ * @param change The change
+ * @param type The object type
+ *
+ */
+void osync_change_set_objtype(OSyncChange *change, OSyncObjType *type)
+{
+ g_assert(change);
+ change->objtype = type;
+}
+
+/*! @brief Sets the object type of a change from the name
+ *
+ * @param change The change
+ * @param name The object type name
+ *
+ */
+void osync_change_set_objtype_string(OSyncChange *change, const char *name)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, change, name);
+
+ g_assert(change);
+ if (change->objtype_name)
+ g_free(change->objtype_name);
+ change->objtype_name = g_strdup(name);
+ //Invalidate the previous object type
+ change->objtype = NULL;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Gets the object format of a change
+ *
+ * @param change The change
+ * @returns The object format
+ *
+ */
+OSyncObjFormat *osync_change_get_objformat(OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, change);
+ g_assert(change);
+
+ if (change->format) {
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, change->format);
+ return change->format;
+ }
+
+ if (!change->format_name) {
+ osync_trace(TRACE_EXIT, "%s: No name yet", __func__);
+ return NULL;
+ }
+
+ osync_assert_msg(change->conv_env, "The conv env of the change must be set by calling member_set or conv_env_set");
+ change->format = osync_conv_find_objformat(change->conv_env, change->format_name);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, change->format);
+ return change->format;
+}
+
+/*! @brief Sets the object format of a change
+ *
+ * @param change The change
+ * @param objformat The object format
+ *
+ */
+void osync_change_set_objformat(OSyncChange *change, OSyncObjFormat *objformat)
+{
+ g_assert(change);
+ change->format = objformat;
+ if (objformat)
+ change->objtype = objformat->objtype;
+ else
+ change->objtype = NULL;
+}
+
+/*! @brief Sets the object format of a change from the name
+ *
+ * @param change The change
+ * @param name The object format name
+ *
+ */
+void osync_change_set_objformat_string(OSyncChange *change, const char *name)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, change, name);
+
+ g_assert(change);
+ if (change->format_name)
+ g_free(change->format_name);
+ change->format_name = g_strdup(name);
+ //Invalidate the previous format
+ change->format = NULL;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Gets the changetype of a change
+ *
+ * @param change The change
+ * @returns The changetype
+ *
+ */
+OSyncChangeType osync_change_get_changetype(OSyncChange *change)
+{
+ if (!change)
+ return CHANGE_UNKNOWN;
+
+ return change->changetype;
+}
+
+/*! @brief Sets the changetype of a change
+ *
+ * @param change The change
+ * @param type The changetype to set
+ *
+ */
+void osync_change_set_changetype(OSyncChange *change, OSyncChangeType type)
+{
+ g_assert(change);
+ change->changetype = type;
+}
+
+/*! @brief Sets the hash of a change that is used to decide wether a change is new, modifed etc
+ *
+ * @param change The change
+ * @param hash The hash to set
+ *
+ */
+void osync_change_set_hash(OSyncChange *change, const char *hash)
+{
+ g_assert(change);
+ if (change->hash)
+ g_free(change->hash);
+ change->hash = g_strdup(hash);
+}
+
+/*! @brief Gets the hash of a change
+ *
+ * @param change The change
+ * @returns The hash
+ *
+ */
+const char *osync_change_get_hash(OSyncChange *change)
+{
+ g_assert(change);
+ return change->hash;
+}
+
+/*! @brief Sets the uid of a change
+ *
+ * @param change The change
+ * @param uid The uid to set
+ *
+ */
+void osync_change_set_uid(OSyncChange *change, const char *uid)
+{
+ g_assert(change);
+ if (change->uid)
+ g_free(change->uid);
+ change->uid = g_strdup(uid);
+}
+
+/*! @brief Gets the uid of a change
+ *
+ * @param change The change
+ * @returns The uid
+ *
+ */
+const char *osync_change_get_uid(OSyncChange *change)
+{
+ g_assert(change);
+ return change->uid;
+}
+
+/*! @brief Sets the data of a change
+ *
+ * @param change The change
+ * @param data The data to set
+ * @param size The size of the data to set
+ * @param has_data Set this to TRUE of this already is the complete data
+ *
+ */
+void osync_change_set_data(OSyncChange *change, char *data, int size, osync_bool has_data)
+{
+ change->data = data;
+ change->size = size;
+ change->has_data = has_data;
+}
+
+/*! @brief Returns wether the complete data already has been set
+ *
+ * @param change The change
+ * @returns TRUE if the change has the complete data set
+ *
+ */
+osync_bool osync_change_has_data(OSyncChange *change)
+{
+ g_assert(change);
+ return change->has_data;
+}
+
+/*! @brief Gets the data of a change
+ *
+ * @param change The change
+ * @returns The data
+ *
+ */
+char *osync_change_get_data(OSyncChange *change)
+{
+ g_assert(change);
+ return change->data;
+}
+
+/*! @brief Gets the size of the data of a change
+ *
+ * @param change The change
+ * @returns The size of the data
+ *
+ */
+int osync_change_get_datasize(OSyncChange *change)
+{
+ g_assert(change);
+ return change->size;
+}
+
+/*! @brief Gets the mappingid of a change
+ *
+ * @param change The change
+ * @returns The mappingid of the data
+ *
+ */
+long long int osync_change_get_mappingid(OSyncChange *change)
+{
+ g_assert(change);
+ return change->mappingid;
+}
+
+/*! @brief Sets the mappingid of a change
+ *
+ * @param change The change
+ * @param mappingid The mappingid to set
+ *
+ */
+void osync_change_set_mappingid(OSyncChange *change, long long int mappingid)
+{
+ g_assert(change);
+ change->mappingid = mappingid;
+}
+
+/*! @brief Gets data that can be used privately by the engine
+ *
+ * @param change The change
+ * @returns The data of the engine
+ *
+ */
+void *osync_change_get_engine_data(OSyncChange *change)
+{
+ g_assert(change);
+ return change->engine_data;
+}
+
+/*! @brief Sets the data of the engine
+ *
+ * @param change The change
+ * @param engine_data The data
+ *
+ */
+void osync_change_set_engine_data(OSyncChange *change, void *engine_data)
+{
+ g_assert(change);
+ change->engine_data = engine_data;
+}
+
+/*! @brief Gets the id of the change which is always unique
+ *
+ * @param change The change
+ * @returns The id
+ *
+ */
+long long int osync_change_get_id(OSyncChange *change)
+{
+ g_assert(change);
+ return change->id;
+}
+
+/*! @brief Updated one change from another change
+ *
+ * This function can be used to "merge" the information from 2
+ * changes into one. The uid, hash, data of the target change
+ * are overwriten by those of the source change if they are not set already
+ * on the target. The data of the source change is copied.
+ *
+ * @param source The source change
+ * @param target The target change
+ *
+ */
+void osync_change_update(OSyncChange *source, OSyncChange *target)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_update(%p, %p)", source, target);
+ //FIXME free stuff
+ g_assert(source);
+ g_assert(target);
+ if (!target->uid)
+ target->uid = g_strdup(source->uid);
+ target->hash = g_strdup(source->hash);
+
+ OSyncError *error = NULL;
+ if (!osync_change_copy_data(source, target, &error)) {
+ osync_trace(TRACE_INTERNAL, "unable to copy change: %s", osync_error_print(&error));
+ osync_error_free(&error);
+ }
+
+ target->has_data = source->has_data;
+ target->changetype = source->changetype;
+ if (source->format)
+ target->format = osync_change_get_objformat(source);
+ if (source->objtype) {
+ target->objtype = osync_change_get_objtype(source);
+ target->sourceobjtype = g_strdup(osync_change_get_objtype(source)->name);
+ }
+
+ target->changes_db = source->changes_db;
+
+ osync_trace(TRACE_EXIT, "osync_change_update");
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_change.h b/debian/opensync/opensync-0.22/opensync/opensync_change.h
new file mode 100644
index 00000000..4dbd2c00
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_change.h
@@ -0,0 +1,41 @@
+#ifndef _OPENSYNC_CHANGE_H_
+#define _OPENSYNC_CHANGE_H_
+
+OSyncChange *osync_change_new(void);
+OSyncChangeType osync_change_get_changetype(OSyncChange *change);
+void osync_change_set_hash(OSyncChange *change, const char *hash);
+void osync_change_set_uid(OSyncChange *change, const char *uid);
+void osync_change_set_data(OSyncChange *change, char *data, int size, osync_bool has_data);
+void osync_change_set_objformat(OSyncChange *change, OSyncObjFormat *format);
+OSyncObjType *osync_change_get_objtype(OSyncChange *change);
+const char *osync_change_get_sourceobjtype(OSyncChange *change);
+void osync_change_set_changetype(OSyncChange *change, OSyncChangeType type);
+const char *osync_change_get_hash(OSyncChange *change);
+const char *osync_change_get_uid(OSyncChange *change);
+char *osync_change_get_data(OSyncChange *change);
+int osync_change_get_datasize(OSyncChange *change);
+OSyncObjFormat *osync_change_get_objformat(OSyncChange *change);
+long long int osync_change_get_mappingid(OSyncChange *entry);
+void *osync_change_get_engine_data(OSyncChange *change);
+void osync_change_set_engine_data(OSyncChange *change, void *engine_data);
+OSyncMember *osync_change_get_member(OSyncChange *change);
+void osync_change_update(OSyncChange *source, OSyncChange *target);
+void osync_change_set_objtype(OSyncChange *change, OSyncObjType *type);
+void osync_change_set_objtype_string(OSyncChange *change, const char *name);
+void osync_change_set_member(OSyncChange *change, OSyncMember *member);
+void osync_change_set_objformat_string(OSyncChange *change, const char *name);
+void osync_change_prepend_objformat(OSyncChange *change, OSyncObjFormat *objformat);
+long long int osync_change_get_id(OSyncChange *change);
+osync_bool osync_change_has_data(OSyncChange *change);
+void osync_change_free(OSyncChange *change);
+void osync_change_reset(OSyncChange *change);
+char *osync_change_get_printable(OSyncChange *change);
+osync_bool osync_change_save(OSyncChange *change, osync_bool save_format, OSyncError **error);
+osync_bool osync_change_delete(OSyncChange *change, OSyncError **error);
+osync_bool osync_changes_load(OSyncGroup *group, OSyncChange ***changes, OSyncError **error);
+void osync_changes_close(OSyncGroup *group);
+void osync_change_free_data(OSyncChange *change);
+void osync_change_set_mappingid(OSyncChange *change, long long int mappingid);
+void osync_change_set_conv_env(OSyncChange *change, OSyncFormatEnv *env);
+
+#endif //_OPENSYNC_CHANGE_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_change_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_change_internals.h
new file mode 100644
index 00000000..7176477f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_change_internals.h
@@ -0,0 +1,61 @@
+#ifndef _OPENSYNC_CHANGE_INTERNALS_H_
+#define _OPENSYNC_CHANGE_INTERNALS_H_
+
+/*! @ingroup OSyncChangePrivate
+ * @brief A change object */
+struct OSyncChange {
+ /** The uid of this change */
+ char *uid;
+ /** The hash of this change*/
+ char *hash; //Hash value to identify changes
+ /** The data reported from the plugin */
+ char *data; //The data of the object
+ /** The size of the data from the plugin */
+ int size;
+ /** Is the set data already the "real" data */
+ osync_bool has_data;
+
+ /** The object type of the change */
+ OSyncObjType *objtype;
+ /** The name of the object type */
+ char *objtype_name;
+ /** The format of the change */
+ OSyncObjFormat *format;
+ /** The name of the format */
+ char *format_name;
+
+ /** The format that was initialy reported */
+ OSyncObjFormat *initial_format;
+ /** The name of the initial format */
+ char *initial_format_name;
+
+ /** The conversion environment of this change */
+ OSyncFormatEnv *conv_env;
+
+ /** The parent of this change */
+ OSyncMember *member;
+ /** The change type */
+ OSyncChangeType changetype;
+ /** The data associated by the engine with this change */
+ void *engine_data;
+ /** The unique id */
+ long long int id;
+ /** The reference counter for this object */
+ int refcount;
+ /** The id of the mapping for this change */
+ long long int mappingid;
+ /** The database where this change is stored */
+ OSyncDB *changes_db;
+
+ //For the filters
+ /** The name of the destination object type for the filter */
+ char *destobjtype;
+ /** the name of the source object type for the filter */
+ char *sourceobjtype;
+ /** the member where this change originated */
+ OSyncMember *sourcemember;
+};
+
+OSyncObjFormat *osync_change_get_initial_objformat(OSyncChange *change);
+
+#endif //_OPENSYNC_CHANGE_INTERNALS_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_changecmds.c b/debian/opensync/opensync-0.22/opensync/opensync_changecmds.c
new file mode 100644
index 00000000..7dace0e3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_changecmds.c
@@ -0,0 +1,603 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+
+/** Function used on a path search for a format name array
+ *
+ * @see osync_conv_find_path_fn(), osync_change_convert_fmtnames()
+ */
+static osync_bool target_fn_fmtnames(const void *data, OSyncObjFormat *fmt)
+{
+ const char * const *list = data;
+ const char * const *i;
+ for (i = list; *i; i++) {
+ if (!strcmp(fmt->name, *i))
+ /* Found */
+ return TRUE;
+ }
+
+ /* Not found */
+ return FALSE;
+}
+
+/** Function used on path searchs for a single format
+ *
+ * @see osync_conv_find_path_fn(), osync_change_convert()
+ */
+static osync_bool target_fn_simple(const void *data, OSyncObjFormat *fmt)
+{
+ const OSyncObjFormat *target = data;
+ return target == fmt;
+}
+
+/** Function used on path searchs for a single format name
+ *
+ * @see osync_conv_find_path_fn(), osync_change_convert_fmtname()
+ */
+static osync_bool target_fn_fmtname(const void *data, OSyncObjFormat *fmt)
+{
+ const char *name = data;
+ return !strcmp(name, fmt->name);
+}
+
+/** Function used on path searchs for a sink on a member
+ *
+ * @see osync_conv_find_path_fn(), osync_change_convert_member_sink()
+ */
+static osync_bool target_fn_membersink(const void *data, OSyncObjFormat *fmt)
+{
+ const OSyncMember *memb = data;
+ GList *i;
+ for (i = memb->format_sinks; i; i = i->next) {
+ OSyncObjFormatSink *sink = i->data;
+ if (sink->format == fmt)
+ return TRUE;
+ }
+
+ /* Not found */
+ return FALSE;
+}
+
+/**
+ * @defgroup OSyncChangeCmds OpenSync Change Commands
+ * @ingroup OSyncPublic
+ * @brief High level functions to manipulate changes
+ */
+/*@{*/
+
+/*! @brief Returns a string describing a change object
+ *
+ * Some formats cannot be printed directly. To be able to print these
+ * objects they should specify a print function.
+ *
+ * @param change The change to get printable
+ * @returns A string describing the object
+ *
+ */
+char *osync_change_get_printable(OSyncChange *change)
+{
+ g_assert(change);
+ if (!change->has_data)
+ return NULL;
+
+ OSyncObjFormat *format = osync_change_get_objformat(change);
+ g_assert(format);
+
+ if (!format->print_func)
+ return g_strndup(change->data, change->size);
+
+ return format->print_func(change);
+}
+
+/*! @brief Returns the revision of the object
+ *
+ * @param change The change to get the revision from
+ * @param error A error struct
+ * @returns The revision of the object in seconds since the epoch in zulu time
+ *
+ */
+time_t osync_change_get_revision(OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, change, error);
+
+ g_assert(change);
+ if (!change->has_data) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "No data set when asking for the timestamp");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return -1;
+ }
+
+ OSyncObjFormat *format = osync_change_get_objformat(change);
+ g_assert(format);
+
+ if (!format->revision_func) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "No revision function set");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return -1;
+ }
+
+ time_t time = format->revision_func(change, error);
+
+ osync_trace(osync_error_is_set(error) ? TRACE_EXIT_ERROR : TRACE_EXIT, "%s: %s, %i", __func__, osync_error_print(error), time);
+ return time;
+}
+
+/*! @brief Compares the data of 2 changes
+ *
+ * Compares the two given changes and returns:
+ * CONV_DATA_MISMATCH if they are not the same
+ * CONV_DATA_SIMILAR if the are not the same but look similar
+ * CONV_DATA_SAME if they are exactly the same
+ *
+ * @param leftchange The left change to compare
+ * @param rightchange The right change to compare
+ * @returns The result of the comparison
+ *
+ */
+OSyncConvCmpResult osync_change_compare_data(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_compare_data(%p, %p)", leftchange, rightchange);
+
+ g_assert(rightchange);
+ g_assert(leftchange);
+
+ OSyncError *error = NULL;
+ if (!osync_change_convert_to_common(leftchange, &error)) {
+ osync_trace(TRACE_INTERNAL, "osync_change_compare_data: %s", osync_error_print(&error));
+ osync_error_free(&error);
+ osync_trace(TRACE_EXIT, "osync_change_compare_data: MISMATCH: Could not convert leftchange to common format");
+ return CONV_DATA_MISMATCH;
+ }
+ if (!osync_change_convert_to_common(rightchange, &error)) {
+ osync_trace(TRACE_INTERNAL, "osync_change_compare_data: %s", osync_error_print(&error));
+ osync_error_free(&error);
+ osync_trace(TRACE_EXIT, "osync_change_compare_data: MISMATCH: Could not convert rightchange to common format");
+ return CONV_DATA_MISMATCH;
+ }
+
+ if (!(rightchange->data == leftchange->data)) {
+ if (!(osync_change_get_objtype(leftchange) == osync_change_get_objtype(rightchange))) {
+ osync_trace(TRACE_EXIT, "osync_change_compare_data: MISMATCH: Objtypes do not match");
+ return CONV_DATA_MISMATCH;
+ }
+ if (leftchange->format != rightchange->format) {
+ osync_trace(TRACE_EXIT, "osync_change_compare_data: MISMATCH: Objformats do not match");
+ return CONV_DATA_MISMATCH;
+ }
+ if (!rightchange->data || !leftchange->data) {
+ osync_trace(TRACE_EXIT, "osync_change_compare_data: MISMATCH: One change has no data");
+ return CONV_DATA_MISMATCH;
+ }
+ OSyncObjFormat *format = osync_change_get_objformat(leftchange);
+ g_assert(format);
+
+ OSyncConvCmpResult ret = format->cmp_func(leftchange, rightchange);
+ osync_trace(TRACE_EXIT, "osync_change_compare_data: %i", ret);
+ return ret;
+ } else {
+ osync_trace(TRACE_EXIT, "osync_change_compare_data: SAME: OK. data point to same memory");
+ return CONV_DATA_SAME;
+ }
+}
+
+/*! @brief Compares 2 changes
+ *
+ * Compares the two given changes and returns:
+ * CONV_DATA_MISMATCH if they are not the same
+ * CONV_DATA_SIMILAR if the are not the same but look similar
+ * CONV_DATA_SAME if they are exactly the same
+ * This function does also compare changetypes etc unlike
+ * osync_change_compare_data()
+ *
+ * @param leftchange The left change to compare
+ * @param rightchange The right change to compare
+ * @returns The result of the comparison
+ *
+ */
+OSyncConvCmpResult osync_change_compare(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_compare(%p, %p)", leftchange, rightchange);
+
+ g_assert(rightchange);
+ g_assert(leftchange);
+
+ OSyncError *error = NULL;
+ if (!osync_change_convert_to_common(leftchange, &error)) {
+ osync_trace(TRACE_INTERNAL, "osync_change_compare: %s", osync_error_print(&error));
+ osync_error_free(&error);
+ osync_trace(TRACE_EXIT, "osync_change_compare: MISMATCH: Could not convert leftchange to common format");
+ return CONV_DATA_MISMATCH;
+ }
+ if (!osync_change_convert_to_common(rightchange, &error)) {
+ osync_trace(TRACE_INTERNAL, "osync_change_compare: %s", osync_error_print(&error));
+ osync_error_free(&error);
+ osync_trace(TRACE_EXIT, "osync_change_compare: MISMATCH: Could not convert leftchange to common format");
+ return CONV_DATA_MISMATCH;
+ }
+
+ if (rightchange->changetype == leftchange->changetype) {
+ OSyncConvCmpResult ret = osync_change_compare_data(leftchange, rightchange);
+ osync_trace(TRACE_EXIT, "osync_change_compare: Compare data: %i", ret);
+ return ret;
+ } else {
+ osync_trace(TRACE_EXIT, "osync_change_compare: MISMATCH: Change types do not match");
+ return CONV_DATA_MISMATCH;
+ }
+}
+
+/*! @brief Copies the data from one change to another change
+ *
+ * @param source The change to copy from
+ * @param target The change to copy to
+ * @param error A error struct
+ * @returns TRUE if the copy was successfull
+ *
+ */
+osync_bool osync_change_copy_data(OSyncChange *source, OSyncChange *target, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_copy_data(%p, %p, %p)", source, target, error);
+
+ OSyncObjFormat *format = NULL;
+ format = source->format;
+ if (!format)
+ format = target->format;
+
+ if (target->data)
+ osync_change_free_data(target);
+
+ if (!source->data) {
+ target->data = NULL;
+ target->size = 0;
+ osync_trace(TRACE_EXIT, "%s: Source had not data", __func__);
+ return TRUE;
+ }
+
+ if (!format || !format->copy_func) {
+ osync_trace(TRACE_INTERNAL, "We cannot copy the change, falling back to memcpy");
+ target->data = g_malloc0(sizeof(char) * (source->size + 1));
+ memcpy(target->data, source->data, source->size);
+
+ /* Make sure that its null terminated */
+ target->data[source->size] = 0;
+ target->size = source->size;
+ } else {
+ if (!format->copy_func(source->data, source->size, &(target->data), &(target->size))) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Something went wrong during copying");
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_copy_data: %s", osync_error_print(error));
+ return FALSE;
+ }
+ }
+
+ osync_trace(TRACE_EXIT, "osync_change_copy_data");
+ return TRUE;
+}
+
+/*! @brief Makes a exact copy of change
+ *
+ * @param source The change to copy from
+ * @param error A error struct
+ * @returns A new change that is the copy, NULL on error
+ *
+ */
+OSyncChange *osync_change_copy(OSyncChange *source, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_copy(%p, %p)", source, error);
+ g_assert(source);
+
+ OSyncChange *newchange = osync_change_new();
+ newchange->uid = g_strdup(source->uid);
+ newchange->hash = g_strdup(source->hash);
+
+ newchange->has_data = source->has_data;
+ newchange->changetype = source->changetype;
+ newchange->format = osync_change_get_objformat(source);
+ newchange->objtype = osync_change_get_objtype(source);
+ newchange->sourceobjtype = g_strdup(osync_change_get_objtype(source)->name);
+ newchange->changes_db = source->changes_db;
+ newchange->member = source->member;
+
+ if (!osync_change_copy_data(source, newchange, error)) {
+ osync_change_free(newchange);
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_copy: %s", osync_error_print(error));
+ return NULL;
+ }
+
+ osync_trace(TRACE_EXIT, "osync_change_copy: %p", newchange);
+ return newchange;
+}
+
+/*! @brief Duplicates the uid of the change
+ *
+ * This will call the duplicate function of a format.
+ * This is used if a uid is not unique.
+ *
+ * @param change The change to duplicate
+ * @returns TRUE if the uid was duplicated successfull
+ *
+ */
+osync_bool osync_change_duplicate(OSyncChange *change)
+{
+ g_assert(change);
+ OSyncObjFormat *format = osync_change_get_objformat(change);
+ osync_debug("OSCONV", 3, "Duplicating change %s with format %s\n", change->uid, format->name);
+ if (!format || !format->duplicate_func)
+ return FALSE;
+ format->duplicate_func(change);
+ return TRUE;
+}
+
+/*! @brief Convert a change to a specific format with a specific extension
+ *
+ * This will convert the change with its data to the specified format
+ * if possible. And this will also convert the data to the specified format
+ * extension.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to convert
+ * @param targetformat To which format you want to convert to
+ * @param extension_name The name of the extension
+ * @param error The error-return location
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_change_convert_extension(OSyncFormatEnv *env, OSyncChange *change, OSyncObjFormat *targetformat, const char *extension_name, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_convert(%p, %p, %p:%s, %s, %p)", env, change, targetformat, targetformat ? targetformat->name : "NONE", extension_name, error);
+ if (osync_conv_convert_fn(env, change, target_fn_simple, targetformat, extension_name, error)) {
+ osync_trace(TRACE_EXIT, "osync_change_convert: TRUE");
+ return TRUE;
+ } else {
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_convert: %s", osync_error_print(error));
+ return FALSE;
+ }
+}
+
+/*! @brief Convert a change to a specific format
+ *
+ * This will convert the change with its data to the specified format
+ * if possible.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to convert
+ * @param targetformat To which format you want to convert to
+ * @param error The error-return location
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_change_convert(OSyncFormatEnv *env, OSyncChange *change, OSyncObjFormat *targetformat, OSyncError **error)
+{
+ return osync_change_convert_extension(env, change, targetformat, NULL, error);
+}
+
+/*! @brief Convert a change to the specified common format
+ *
+ * @param change The change to convert
+ * @param error The error-return location
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_change_convert_to_common(OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_convert_to_common(%p, %p)", change, error);
+
+ if (!osync_change_get_objtype(change)) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "The change has no objtype");
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_convert_to_common: %s", osync_error_print(error));
+ return FALSE;
+ }
+ OSyncFormatEnv *env = osync_change_get_objtype(change)->env;
+
+ if (!osync_change_get_objtype(change)->common_format) {
+ osync_trace(TRACE_EXIT, "osync_change_convert_to_common: No common format set");
+ return TRUE;
+ }
+
+ osync_trace(TRACE_INTERNAL, "Converting from %s to %s", osync_change_get_objformat(change)->name, osync_change_get_objtype(change)->common_format->name);
+
+ if (osync_change_convert(env, change, osync_change_get_objtype(change)->common_format, error)) {
+ osync_trace(TRACE_EXIT, "osync_change_convert_to_common: TRUE");
+ return TRUE;
+ } else {
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_convert_to_common: %s", osync_error_print(error));
+ return FALSE;
+ }
+}
+
+/*! @brief Convert a change to a specific format with the given name
+ *
+ * This will convert the change with its data to the specified format
+ * if possible.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to convert
+ * @param targetname To which format you want to convert to
+ * @param error The error-return location
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_change_convert_fmtname(OSyncFormatEnv *env, OSyncChange *change, const char *targetname, OSyncError **error)
+{
+ return osync_conv_convert_fn(env, change, target_fn_fmtname, targetname, NULL, error);
+}
+
+/*! @brief Convert a change to some formats
+ *
+ * This will convert the change with its data to one of the specified formats
+ * if possible.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to convert
+ * @param targetnames NULL-Terminated array of formatnames
+ * @param error The error-return location
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_change_convert_fmtnames(OSyncFormatEnv *env, OSyncChange *change, const char **targetnames, OSyncError **error)
+{
+ return osync_conv_convert_fn(env, change, target_fn_fmtnames, targetnames, NULL, error);
+}
+
+/*! @brief Convert a change to the nearest sink on a member
+ *
+ *
+ * @param env The conversion environment to use
+ * @param change The change to convert
+ * @param member The member that will receive the change
+ * @param error The error-return location
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_change_convert_member_sink(OSyncFormatEnv *env, OSyncChange *change, OSyncMember *member, OSyncError **error)
+{
+ if (!osync_member_require_sink_info(member, error))
+ return FALSE;
+
+ return osync_conv_convert_fn(env, change, target_fn_membersink, member, member->extension, error);
+}
+
+/*! @brief Tries to detect the object type of the given change
+ *
+ * This will try to detect the object type of the data on the change
+ * and return it, but not set it.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to detect
+ * @param error The error-return location
+ * @returns The objecttype on success, NULL otherwise
+ *
+ */
+OSyncObjType *osync_change_detect_objtype(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error)
+{
+ OSyncObjFormat *format = NULL;
+ if (!(format = osync_change_detect_objformat(env, change, error)))
+ return NULL;
+ return format->objtype;
+}
+
+/*! @brief Tries to detect the encapsulated object type of the given change
+ *
+ * This will try to detect the encapsulated object type of the data on the change
+ * and return it, but not set it. This will try to detect the change, deencapsulate
+ * it, detect again etc until it cannot deencapsulate further.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to detect
+ * @param error The error-return location
+ * @returns The objecttype on success, NULL otherwise
+ *
+ */
+OSyncObjType *osync_change_detect_objtype_full(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error)
+{
+ OSyncObjFormat *format = NULL;
+ if (!(format = osync_change_detect_objformat_full(env, change, error)))
+ return NULL;
+ return format->objtype;
+}
+
+/*! @brief Tries to detect the format of the given change
+ *
+ * This will try to detect the format of the data on the change
+ * and return it, but not set it.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to detect
+ * @param error The error-return location
+ * @returns The format on success, NULL otherwise
+ *
+ */
+OSyncObjFormat *osync_change_detect_objformat(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_detect_objformat(%p, %p, %p)", env, change, error);
+ if (!change->has_data) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "The change has no data");
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_detect_objformat: %s", osync_error_print(error));
+ return NULL;
+ }
+
+ //Run all datadetectors for our source type
+ GList *d = NULL;
+ for (d = env->converters; d; d = d->next) {
+ OSyncFormatConverter *converter = d->data;
+ osync_trace(TRACE_INTERNAL, "running detector %s for format %s\n", converter->source_format->name, osync_change_get_objformat(change)->name);
+ if (!strcmp(converter->source_format->name, osync_change_get_objformat(change)->name)) {
+ if (converter->detect_func && converter->detect_func(env, change->data, change->size)) {
+ osync_trace(TRACE_EXIT, "osync_change_detect_objformat: %p:%s", converter->target_format, converter->target_format->name);
+ return converter->target_format;
+ }
+ }
+ }
+
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "None of the detectors was able to recognize this data");
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_detect_objformat: %s", osync_error_print(error));
+ return NULL;
+}
+
+/*! @brief Tries to detect the encapsulated format of the given change
+ *
+ * This will try to detect the encapsulated format of the data on the change
+ * and return it, but not set it. This will try to detect the change, deencapsulate
+ * it, detect again etc until it cannot deencapsulate further.
+ *
+ * @param env The conversion environment to use
+ * @param change The change to detect
+ * @param error The error-return location
+ * @returns The format on success, NULL otherwise
+ *
+ */
+OSyncObjFormat *osync_change_detect_objformat_full(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_change_detect_objformat_full(%p, %p, %p)", env, change, error);
+ if (!change->has_data) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "The change has no data");
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_detect_objformat: %s", osync_error_print(error));
+ return NULL;
+ }
+ OSyncChange *new_change = change;
+
+ //Try to decap the change as far as possible
+ while (1) {
+ GList *d = NULL;
+ for (d = env->converters; d; d = d->next) {
+ OSyncFormatConverter *converter = d->data;
+ if (!strcmp(converter->source_format->name, osync_change_get_objformat(change)->name) && converter->type == CONVERTER_DECAP) {
+ osync_bool free_output = FALSE;
+ if (!(new_change = osync_converter_invoke_decap(converter, new_change, &free_output))) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to decap the change");
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_detect_objformat_full: %s", osync_error_print(error));
+ return NULL;
+ }
+ continue;
+ }
+ }
+ break;
+ }
+
+ OSyncObjFormat *ret = osync_change_detect_objformat(env, new_change, error);
+ if (!ret)
+ osync_trace(TRACE_EXIT_ERROR, "osync_change_detect_objformat_full: %s", osync_error_print(error));
+ else
+ osync_trace(TRACE_EXIT, "osync_change_detect_objformat_full: %p:%s", ret, ret->name);
+ return ret;
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_changecmds.h b/debian/opensync/opensync-0.22/opensync/opensync_changecmds.h
new file mode 100644
index 00000000..fbcbd871
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_changecmds.h
@@ -0,0 +1,24 @@
+#ifndef _OPENSYNC_CHANGECMDS_H_
+#define _OPENSYNC_CHANGECMDS_H_
+
+osync_bool osync_change_duplicate(OSyncChange *change);
+OSyncConvCmpResult osync_change_compare(OSyncChange *leftchange, OSyncChange *rightchange);
+OSyncConvCmpResult osync_change_compare_data(OSyncChange *leftchange, OSyncChange *rightchange);
+time_t osync_change_get_revision(OSyncChange *change, OSyncError **error);
+
+OSyncObjFormat *osync_change_detect_objformat(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error);
+OSyncObjFormat *osync_change_detect_objformat_full(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error);
+OSyncObjType *osync_change_detect_objtype(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error);
+OSyncObjType *osync_change_detect_objtype_full(OSyncFormatEnv *env, OSyncChange *change, OSyncError **error);
+
+osync_bool osync_change_convert(OSyncFormatEnv *env, OSyncChange *change, OSyncObjFormat *fmt, OSyncError **error);
+osync_bool osync_change_convert_fmtname(OSyncFormatEnv *env, OSyncChange *change, const char *fmtname, OSyncError **error);
+osync_bool osync_change_convert_fmtnames(OSyncFormatEnv *env, OSyncChange *change, const char **names, OSyncError **error);
+osync_bool osync_change_convert_to_common(OSyncChange *change, OSyncError **error);
+osync_bool osync_change_convert_extension(OSyncFormatEnv *env, OSyncChange *change, OSyncObjFormat *targetformat, const char *extension_name, OSyncError **error);
+osync_bool osync_change_convert_member_sink(OSyncFormatEnv *env, OSyncChange *change, OSyncMember *memb, OSyncError **error);
+
+osync_bool osync_change_copy_data(OSyncChange *source, OSyncChange *target, OSyncError **error);
+OSyncChange *osync_change_copy(OSyncChange *source, OSyncError **error);
+
+#endif //_OPENSYNC_CHANGECMDS_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_context.c b/debian/opensync/opensync-0.22/opensync/opensync_context.c
new file mode 100644
index 00000000..875e1187
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_context.c
@@ -0,0 +1,144 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync.h>
+#include "opensync_internals.h"
+
+OSyncContext *osync_context_new(OSyncMember *member)
+{
+ OSyncContext *ctx = g_malloc0(sizeof(OSyncContext));
+ ctx->member = member;
+ return ctx;
+}
+
+void osync_context_free(OSyncContext *context)
+{
+ g_assert(context);
+ //FIXME Do we need to free the user_data?
+ g_free(context);
+}
+
+void *osync_context_get_plugin_data(OSyncContext *context)
+{
+ g_assert(context);
+ g_assert(context->member);
+ return context->member->plugindata;
+}
+
+void osync_context_report_osyncerror(OSyncContext *context, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p:(%s))", __func__, context, error, osync_error_print(error));
+ g_assert(context);
+ if (context->callback_function)
+ (context->callback_function)(context->member, context->calldata, error);
+ osync_context_free(context);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_context_report_error(OSyncContext *context, OSyncErrorType type, const char *format, ...)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %s)", __func__, context, type, format);
+ g_assert(context);
+ OSyncError *error = NULL;
+ va_list args;
+ va_start(args, format);
+ osync_error_set_vargs(&error, type, format, args);
+ osync_trace(TRACE_INTERNAL, "ERROR is: %s", osync_error_print(&error));
+ if (context->callback_function)
+ (context->callback_function)(context->member, context->calldata, &error);
+ va_end (args);
+ osync_context_free(context);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_context_report_success(OSyncContext *context)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, context);
+ g_assert(context);
+ if (context->callback_function)
+ (context->callback_function)(context->member, context->calldata, NULL);
+ osync_context_free(context);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_context_report_change(OSyncContext *context, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, context, change);
+ g_assert(context);
+ OSyncMember *member = context->member;
+ g_assert(member);
+ osync_change_set_member(change, member);
+
+ osync_assert_msg(change->uid, "You forgot to set a uid on the change you reported!");
+ osync_assert_msg(change->data || change->changetype == CHANGE_DELETED, "You need to report some data unless you report CHANGE_DELETED");
+ osync_assert_msg((!(change->data) && change->size == 0) || (change->data && change->size != 0), "No data and datasize was not 0!");
+ osync_assert_msg((!change->data && change->changetype == CHANGE_DELETED) || (change->data && change->changetype != CHANGE_DELETED), "You cannot report data if you report CHANGE_DELETED. Just report the uid");
+
+ osync_assert_msg((osync_change_get_objformat(change) != NULL) || change->changetype == CHANGE_DELETED, "The reported change did not have a format set");
+ osync_assert_msg((osync_change_get_objtype(change) != NULL) || change->changetype == CHANGE_DELETED, "The reported change did not have a objtype set");
+ osync_assert_msg((osync_change_get_changetype(change) != CHANGE_UNKNOWN), "The reported change did not have a changetype set");
+
+
+ if (change->changetype == CHANGE_DELETED)
+ change->has_data = TRUE;
+
+ change->initial_format = osync_change_get_objformat(change);
+
+ osync_trace(TRACE_INTERNAL, "Reporting change with uid %s, changetype %i, data %p, objtype %s and format %s", osync_change_get_uid(change), osync_change_get_changetype(change), osync_change_get_data(change), osync_change_get_objtype(change) ? osync_objtype_get_name(osync_change_get_objtype(change)) : "None", osync_change_get_objformat(change) ? osync_objformat_get_name(osync_change_get_objformat(change)) : "None");
+
+ osync_assert_msg(member->memberfunctions->rf_change, "The engine must set a callback to receive changes");
+ member->memberfunctions->rf_change(member, change, context->calldata);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_context_send_log(OSyncContext *ctx, const char *message, ...)
+{
+ g_assert(ctx);
+ OSyncMember *member = ctx->member;
+ g_assert(member);
+
+ va_list arglist;
+ char buffer[1024];
+ memset(buffer, 0, sizeof(buffer));
+ va_start(arglist, message);
+ g_vsnprintf(buffer, 1024, message, arglist);
+
+ osync_debug("OSYNC", 3, "Sending logmessage \"%s\"", buffer);
+ if (member->memberfunctions->rf_log)
+ member->memberfunctions->rf_log(member, buffer);
+
+ va_end(arglist);
+}
+
+void osync_report_message(OSyncMember *member, const char *message, void *data)
+{
+ member->memberfunctions->rf_message(member, message, data, FALSE);
+}
+
+void *osync_report_message_sync(OSyncMember *member, const char *message, void *data)
+{
+ return member->memberfunctions->rf_message(member, message, data, TRUE);
+}
+
+OSyncMember *osync_context_get_member(OSyncContext *ctx)
+{
+ g_assert(ctx);
+ return ctx->member;
+}
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_context.h b/debian/opensync/opensync-0.22/opensync/opensync_context.h
new file mode 100644
index 00000000..2e93cd33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_context.h
@@ -0,0 +1,11 @@
+OSyncContext *osync_context_new(OSyncMember *member);
+void osync_context_free(OSyncContext *context);
+void osync_context_report_error(OSyncContext *context, OSyncErrorType type, const char *format, ...);
+void osync_context_report_success(OSyncContext *context);
+void osync_context_report_change(OSyncContext *context, OSyncChange *change);
+void osync_report_message(OSyncMember *member, const char *message, void *data);
+void *osync_report_message_sync(OSyncMember *member, const char *message, void *data);
+void *osync_context_get_plugin_data(OSyncContext *context);
+void osync_context_send_log(OSyncContext *ctx, const char *message, ...);
+OSyncMember *osync_context_get_member(OSyncContext *ctx);
+void osync_context_report_osyncerror(OSyncContext *context, OSyncError **error);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_context_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_context_internals.h
new file mode 100644
index 00000000..4a725669
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_context_internals.h
@@ -0,0 +1,13 @@
+#ifndef _OPENSYNC_CONTEXT_INTERNALS_H_
+#define _OPENSYNC_CONTEXT_INTERNALS_H_
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct OSyncContext {
+ OSyncEngCallback callback_function;
+ void *calldata;
+ OSyncMember *member;
+ osync_bool success;
+};
+#endif
+
+#endif //_OPENSYNC_CONTEXT_INTERNALS_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_convert.c b/debian/opensync/opensync-0.22/opensync/opensync_convert.c
new file mode 100644
index 00000000..d9af65bf
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_convert.c
@@ -0,0 +1,896 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @ingroup OSyncConvPrivate
+ */
+/*@{*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct conv_tree {
+ OSyncFormatEnv *env;
+ OSyncObjType *type;
+
+ /* The converters that weren't reached yet */
+ GList *unused;
+ /* The search queue for the Breadth-first search */
+ GList *search;
+} conv_tree;
+
+typedef struct vertice {
+ OSyncObjFormat *format;
+
+ /* The invoke_decap will return a new change everytime
+ * we run it so that the original change does not get
+ * changed. We also need to track if the data of this change
+ * should be freed or if it contains a reference into data of
+ * a previous change */
+ OSyncChange *change;
+ osync_bool free_change_data;
+ osync_bool free_change;
+
+ /** Keep reference counts because
+ * the data returned by converters
+ * can be references to other data,
+ * and we can't free them too early
+ */
+ size_t references;
+
+ /** The path of converters */
+ GList *path;
+
+ unsigned losses;
+ unsigned objtype_changes;
+ unsigned conversions;
+
+} vertice;
+#endif
+
+static OSyncFormatConverter *osync_conv_find_converter_objformat(OSyncFormatEnv *env, OSyncObjFormat *fmt_src, OSyncObjFormat *fmt_trg)
+{
+ GList *element = NULL;
+ for (element = env->converters; element; element = element->next) {
+ OSyncFormatConverter *converter = element->data;
+ if (fmt_src == converter->source_format && fmt_trg == converter->target_format)
+ return converter;
+ }
+ return NULL;
+}
+
+osync_bool osync_converter_invoke(OSyncFormatConverter *converter, OSyncChange *change, void *converter_data, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_converter_invoke(%p, %p, %p)", converter, change, error);
+ osync_trace(TRACE_INTERNAL, "converter: Type: %i, source: %s, target %s", converter->type, converter->source_format->name, converter->target_format->name);
+ char *data = NULL;
+ int datasize = 0;
+ osync_bool ret = TRUE;
+ if (converter->type == CONVERTER_DETECTOR && !converter->convert_func) {
+ change->format = converter->target_format;
+ change->objtype = osync_change_get_objformat(change)->objtype;
+ osync_trace(TRACE_EXIT, "osync_converter_invoke: TRUE: Detector path");
+ return TRUE;
+ }
+
+ if (!converter->convert_func) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Invalid converter");
+ osync_trace(TRACE_EXIT_ERROR, "osync_converter_invoke: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ if (change->data) {
+ //Invoke the converter and all extensions
+ //osync_conv_invoke_extensions(converter->source_format, FALSE, change);
+ osync_bool free_input = FALSE;
+ if ((ret = converter->convert_func(converter_data, change->data, change->size, &data, &datasize, &free_input, error))) {
+
+ if (converter->type == CONVERTER_DECAP) {
+ if (!free_input) {
+ /* Duplicate the returned data, as the original data will be destroyed */
+ if (!converter->target_format->copy_func) {
+ /* There is nothing we can do, here. The returned data is a reference, but
+ * we can't copy the data before destroying it
+ */
+ osync_debug("OSYNC", 0, "Format %s don't have a copy function, but a no-copy converter was registered", converter->target_format->name);
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Format %s don't have a copy function, but a no-copy converter was registered", converter->target_format->name);
+ osync_trace(TRACE_EXIT_ERROR, "osync_converter_invoke: %s", osync_error_print(error));
+ return FALSE;
+ }
+ converter->target_format->copy_func(data, datasize, &data, &datasize);
+ }
+ }
+ /* Free the data, unless the converter took the ownership of the data */
+ if (free_input) {
+ if (converter->source_format->destroy_func) {
+ converter->source_format->destroy_func(change->data, change->size);
+ } else
+ osync_debug("OSYNC", 1, "Format %s don't have a destroy function. Possible memory leak", converter->source_format->name);
+ }
+ change->data = data;
+ change->size = datasize;
+
+ //osync_conv_invoke_extensions(converter->target_format, TRUE, change);
+ }
+ }
+
+ if (ret) {
+ osync_debug("OSYNC", 3, "Converting! replacing format %s with %s", converter->source_format->name, converter->target_format->name);
+ change->format = converter->target_format;
+ change->objtype = osync_change_get_objformat(change)->objtype;
+ osync_trace(TRACE_EXIT, "osync_converter_invoke: TRUE");
+ } else
+ osync_trace(TRACE_EXIT_ERROR, "osync_converter_invoke: %s", osync_error_print(error));
+ return ret;
+}
+
+OSyncChange *osync_converter_invoke_decap(OSyncFormatConverter *converter, OSyncChange *change, osync_bool *free_output)
+{
+ osync_trace(TRACE_ENTRY, "osync_converter_invoke_decap(%p, %p, %p)", converter, change, free_output);
+
+ *free_output = FALSE;
+
+ if (!converter->convert_func) {
+ osync_trace(TRACE_EXIT_ERROR, "osync_converter_invoke_decap: No convert function");
+ return NULL;
+ }
+
+ if (converter->type != CONVERTER_DECAP) {
+ osync_trace(TRACE_EXIT_ERROR, "osync_converter_invoke_decap: Not a decap");
+ return NULL;
+ }
+
+ OSyncChange *new_change = osync_change_new();
+
+
+ if (change->changetype != CHANGE_DELETED && change->data) {
+ //Invoke the converter and all extensions
+ OSyncError *error = NULL;
+ if (!converter->convert_func(NULL, change->data, change->size, &(new_change->data), &(new_change->size), free_output, &error)) {
+ osync_trace(TRACE_EXIT_ERROR, "osync_converter_invoke_decap: %s", osync_error_print(&error));
+ osync_error_free(&error);
+ return NULL;
+ }
+ new_change->has_data = change->has_data;
+ }
+ osync_debug("OSYNC", 3, "Converting! replacing format %s with %s", converter->source_format->name, converter->target_format->name);
+ new_change->format = converter->target_format;
+ new_change->objtype = osync_change_get_objformat(new_change)->objtype;
+ new_change->changetype = change->changetype;
+ osync_trace(TRACE_EXIT, "osync_converter_invoke_decap: %p", new_change);
+ return new_change;
+}
+
+/** Compare the distance of two vertices
+ *
+ * First, try to minimize the losses. Then,
+ * try to minimize the conversions between
+ * different objtypes. Then, try to minimize
+ * the total number of conversions.
+ */
+int compare_vertice_distance(const void *a, const void *b)
+{
+ const vertice *va = a;
+ const vertice *vb = b;
+ if (va->losses < vb->losses)
+ return -1;
+ else if (va->losses > vb->losses)
+ return 1;
+ else if (va->objtype_changes < vb->objtype_changes)
+ return -1;
+ else if (va->objtype_changes > vb->objtype_changes)
+ return 1;
+ else if (va->conversions < vb->conversions)
+ return -1;
+ else if (va->conversions > vb->conversions)
+ return 1;
+ else
+ return 0;
+}
+
+/** Increment a vertice reference count */
+/*static void ref_vertice(vertice *v)
+{
+ v->references++;
+}*/
+
+/** Dereference an vertice
+ */
+static void deref_vertice(vertice *vertice)
+{
+ /* Decrement the reference count,
+ * and just return if we still
+ * have a reference
+ */
+ if (--vertice->references > 0)
+ return;
+
+ g_list_free(vertice->path);
+ if (vertice->change && vertice->free_change) {
+ if (vertice->free_change_data)
+ osync_change_free_data(vertice->change);
+ osync_change_free(vertice->change);
+ }
+
+ g_free(vertice);
+}
+
+/** Returns a neighbour of the vertice ve
+ *
+ * Returns a new reference to te vertice. The reference
+ * should be dropped using deref_vertice(), later.
+ */
+vertice *get_next_vertice_neighbour(OSyncFormatEnv *env, conv_tree *tree, vertice *ve)
+{
+ GList *c = NULL;
+ osync_trace(TRACE_ENTRY, "get_next_vertice_neighbour(%p, %p, %p:%s)", env, tree, ve, ve->format ? ve->format->name : "None");
+
+ for (c = tree->unused; c; c = c->next) {
+ OSyncFormatConverter *converter = c->data;
+ OSyncObjFormat *fmt_target = converter->target_format;
+
+ /* Check only valid converters, from the right format */
+ if (strcmp(converter->source_format->name, ve->format->name))
+ continue;
+
+ // If the converter type is a detector we need to know wether the input is correct
+ if (converter->detect_func) {
+ if (!ve->change) {
+ osync_trace(TRACE_INTERNAL,
+ "We would call a converter to %s, but there is no change data on vertice", fmt_target->name);
+ continue;
+ }
+
+ if (ve->change->changetype != CHANGE_DELETED) {
+ if (!converter->detect_func(env, ve->change->data, ve->change->size)) {
+ osync_trace(TRACE_INTERNAL, "Invoked detector for converter from %s to %s: FALSE", converter->source_format->name, converter->target_format->name);
+ continue;
+ }
+ }
+
+ osync_trace(TRACE_INTERNAL, "Invoked detector for converter from %s to %s: TRUE", converter->source_format->name, converter->target_format->name);
+ }
+
+ OSyncChange *new_change = NULL;
+ osync_bool free_output = TRUE;
+ if (converter->type == CONVERTER_DECAP) {
+ if (!ve->change) {
+ osync_trace(TRACE_INTERNAL, "A desencapsulator to %s would be called, but we can't because the data on this vertice wasn't converted", fmt_target->name);
+ continue;
+ }
+
+ if (!(new_change = osync_converter_invoke_decap(converter, ve->change, &free_output)))
+ continue;
+ }
+
+ /* From this point, we already found an edge (i.e. a converter) that may
+ * be used
+ */
+
+ /* Remove the converter from the unused list */
+ tree->unused = g_list_remove(tree->unused, converter);
+
+ /* Allocate the new neighbour */
+ vertice *neigh = g_malloc0(sizeof(vertice));
+ /* Start with a reference count = 1 */
+ neigh->references = 1;
+ neigh->format = fmt_target;
+ neigh->path = g_list_copy(ve->path);
+ neigh->path = g_list_append(neigh->path, converter);
+
+ if (new_change) {
+ neigh->change = new_change;
+ neigh->free_change = TRUE;
+ neigh->free_change_data = free_output;
+ } else {
+ neigh->change = NULL;
+ neigh->free_change = FALSE;
+ neigh->free_change_data = FALSE;
+ }
+
+ /* Distance calculation */
+ neigh->conversions = ve->conversions + 1;
+ neigh->losses = ve->losses;
+ if (converter->type == CONVERTER_DECAP)
+ neigh->losses++;
+ neigh->objtype_changes = ve->objtype_changes;
+ if (converter->source_format->objtype != converter->target_format->objtype)
+ neigh->objtype_changes++;
+
+ osync_trace(TRACE_EXIT, "get_next_vertice_neighbour: %p:%s", neigh, neigh->format ? neigh->format->name : "None");
+ return neigh;
+ }
+ osync_trace(TRACE_EXIT, "get_next_vertice_neighbour: None found");
+ return NULL;
+}
+
+/** Search for the shortest path of conversions to one or more formats
+ *
+ * This function search for the shortest path of conversions
+ * that can be made to a change, considering possible detections
+ * that may be necessary. The target is given by a function
+ * that check if a given format is a 'target vertice' or not. The
+ * function is used to allow the search path code to be used
+ * to search for 'objtype detection', search for the path
+ * for an available sink for a format, and maybe other uses.
+ *
+ * The list returned on path_edges should be freed by the caller.
+ *
+ * Note: NEVER use the detection/conversion functions on
+ * CHANGE_DELETED changes. Converting and detecting data
+ * on changes that have no data doesn't make sense
+ *
+ * @see osync_conv_convert_fn(), osync_change_convert(),
+ * osync_conv_convert_fmtlist(), osync_change_convert_member_sink()
+ *
+ * @see target_fn_fmtlist(), target_fn_fmtnames(),
+ * target_fn_simple(), target_fn_fmtname(),
+ * target_fn_membersink(), target_fn_no_any()
+ */
+static osync_bool osync_conv_find_path_fn(OSyncFormatEnv *env, OSyncChange *start, OSyncPathTargetFn target_fn, const void *fndata, GList/* OSyncConverter * */ **path_edges)
+{
+ osync_trace(TRACE_ENTRY, "osync_conv_find_path_fn(%p, %p(%s, %s), %p, %p, %p)", env, start, start ? start->uid : "None", start ? start->format->name : "None", target_fn, fndata, path_edges);
+
+ g_assert(start->format);
+
+ *path_edges = NULL;
+ osync_bool ret = FALSE;
+ vertice *result = NULL;
+
+ //Vertice = Spitze = Format
+ //edge = Kante = Converter
+
+ //Make a new search tree
+ conv_tree *tree = g_malloc0(sizeof(conv_tree));
+ tree->unused = g_list_copy(env->converters);
+
+ //We make our starting point (which is the current format of the
+ //change of course
+ vertice *begin = g_malloc0(sizeof(vertice));
+ begin->format = start->format;
+ begin->path = NULL;
+ begin->references = 1;
+ begin->change = start;
+ begin->free_change_data = FALSE;
+ begin->free_change = FALSE;
+
+ tree->search = g_list_append(NULL, begin);
+
+ while (g_list_length(tree->search)) {
+ vertice *neighbour = NULL;
+
+ //Get the first vertice and remove it from the queue
+ vertice *current = tree->search->data;
+ tree->search = g_list_remove(tree->search, current);
+
+ osync_debug("OSCONV", 4, "Next vertice: %s.", current->format->name);
+ /* Check if we have reached a target format */
+ if (target_fn(fndata, current->format)) {
+ /* Done. return the result */
+ result = current;
+ break;
+ }
+ osync_debug("OSCONV", 4, "Looking at %s's neighbours.", current->format->name);
+ while ((neighbour = get_next_vertice_neighbour(env, tree, current))) {
+ osync_debug("OSCONV", 4, "%s's neighbour: %s", current->format->name, neighbour->format->name);
+ tree->search = g_list_insert_sorted(tree->search, neighbour, compare_vertice_distance);
+ }
+ /* Done, drop the reference to the vertice */
+ deref_vertice(current);
+ }
+ /* Remove the references on the search queue */
+ g_list_foreach(tree->search, (GFunc)deref_vertice, NULL);
+
+ if (result) {
+ /* Found it. Copy the conversion path */
+ *path_edges = g_list_copy(result->path);
+ /* Drop the reference to the result vertice */
+ deref_vertice(result);
+ ret = TRUE;
+ goto free_tree;
+ }
+
+free_tree:
+ g_list_free(tree->unused);
+ g_list_free(tree->search);
+ g_free(tree);
+ if (ret)
+ osync_trace(TRACE_EXIT, "osync_conv_find_path_fn: TRUE");
+ else
+ osync_trace(TRACE_EXIT_ERROR, "osync_conv_find_path_fn: FALSE");
+ return ret;
+}
+
+osync_bool osync_conv_convert_fn(OSyncFormatEnv *env, OSyncChange *change, OSyncPathTargetFn target_fn, const void *fndata, const char *extension_name, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_conv_convert_fn(%p, %p, %p, %p, %p)", env, change, target_fn, fndata, error);
+ g_assert(change);
+ g_assert(target_fn);
+ OSyncObjFormat *source = osync_change_get_objformat(change);
+ osync_assert_msg(source, "Cannot convert! change has no objformat!");
+ GList *path = NULL;
+ osync_bool ret = TRUE;
+
+ /* Optimization: check if the format is already valid */
+ if (target_fn(fndata, source)) {
+ osync_trace(TRACE_EXIT, "osync_conv_convert_fn: Target already valid");
+ return TRUE;
+ }
+
+ //We can convert the deleted change directly since it has no data
+ /*if (change->changetype == CHANGE_DELETED) {
+ change->format = osync_change_get_initial_objformat(change);
+ change->objtype = osync_change_get_objformat(change)->objtype;
+ if (!target_fn(fndata, source)) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "converted delete target would not be valid");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+ osync_trace(TRACE_EXIT, "osync_conv_convert_fn: converted deleted change");
+ return TRUE;
+ }*/
+
+ ret = FALSE;
+ if (!osync_conv_find_path_fn(env, change, target_fn, fndata, &path)) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to find a conversion path to the format requested");
+ osync_trace(TRACE_EXIT_ERROR, "osync_conv_convert_fn: %s", osync_error_print(error));
+ goto out;
+ }
+
+ if (change->changetype == CHANGE_DELETED) {
+ OSyncFormatConverter *converter = g_list_last(path)->data;
+ change->format = converter->target_format;
+ change->objtype = osync_change_get_objformat(change)->objtype;
+ } else {
+ for (; path; path = path->next) {
+ OSyncFormatConverter *converter = path->data;
+
+ osync_trace(TRACE_INTERNAL, "initialize converter: %p", converter->init_func);
+
+ //Initialize the converter
+ void *converter_data = NULL;
+ if (converter->init_func)
+ converter_data = converter->init_func();
+
+ if (extension_name) {
+ osync_trace(TRACE_INTERNAL, "initialize extension: %s", extension_name);
+
+ //Initialize the requested extension
+ OSyncFormatExtension *extension = osync_conv_find_extension(env, converter->source_format, converter->target_format, extension_name);
+ osync_trace(TRACE_INTERNAL, "extension: %p", extension);
+ if (extension)
+ extension->init_func(converter_data);
+ } else {
+
+ osync_trace(TRACE_INTERNAL, "initialize all extensions");
+ //Initialize all available from extensions
+ GList *e;
+ for (e = env->extensions; e; e = e->next) {
+ OSyncFormatExtension *extension = e->data;
+ osync_trace(TRACE_INTERNAL, "extension: %s", extension->name);
+ osync_trace(TRACE_INTERNAL, "%p:%p %p:%p", extension->from_format, converter->source_format, extension->to_format, converter->target_format);
+ if (extension->from_format == converter->source_format && extension->to_format == converter->target_format)
+ extension->init_func(converter_data);
+ }
+ }
+
+ if (!osync_converter_invoke(converter, change, converter_data, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "osync_conv_convert_fn: %s", osync_error_print(error));
+ goto out_free_path;
+ }
+
+ //Finalize the converter data
+ if (converter->fin_func)
+ converter->fin_func(converter_data);
+
+ }
+ }
+ ret = TRUE;
+
+ osync_trace(TRACE_EXIT, "osync_conv_convert_fn: TRUE");
+out_free_path:
+ g_list_free(path);
+out:
+ return ret;
+}
+
+/** Function used on path searchs for a format list
+ *
+ * @see osync_conv_find_path_fn(), osync_conv_convert_fmtlist()
+ */
+static osync_bool target_fn_fmtlist(const void *data, OSyncObjFormat *fmt)
+{
+ const GList/*OSyncObjFormat * */ *l = data;
+ const GList *i;
+ for (i = l; i; i = i->next) {
+ OSyncObjFormat *f = i->data;
+ if (!strcmp(fmt->name, f->name))
+ return TRUE;
+ }
+ /* else */
+ return FALSE;
+}
+
+/** Convert a change to the nearest format on a list of formats
+ */
+osync_bool osync_conv_convert_fmtlist(OSyncFormatEnv *env, OSyncChange *change, GList/*OSyncObjFormat * */ *targets)
+{
+ return osync_conv_convert_fn(env, change, target_fn_fmtlist, targets, NULL, NULL);
+}
+
+osync_bool osync_conv_find_path_fmtlist(OSyncFormatEnv *env, OSyncChange *start, GList/*OSyncObjFormat * */ *targets, GList **retlist)
+{
+ return osync_conv_find_path_fn(env, start, target_fn_fmtlist, targets, retlist);
+}
+
+osync_bool osync_conv_objtype_is_any(const char *objstr)
+{
+ if (!strcmp(objstr, "data"))
+ return TRUE;
+ return FALSE;
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSyncConvAPI OpenSync Conversion
+ * @ingroup OSyncPublic
+ * @brief Used to convert, compare and detect changes
+ *
+ */
+/*@{*/
+
+/*! @brief This will create a new opensync format environment
+ *
+ * The environment will hold all information about plugins, formats etc
+ *
+ * @returns A pointer to a newly allocated environment. NULL on error.
+ *
+ */
+OSyncFormatEnv *osync_conv_env_new(OSyncEnv *env)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, env);
+ OSyncFormatEnv *conv_env = g_malloc0(sizeof(OSyncFormatEnv));
+ GList *o;
+
+ //Now we resolve all format plugin stuff for the conv env
+ //First the objecttypes
+ OSyncObjType *type = NULL;
+ for (o = env->objtype_templates; o; o = o->next) {
+ OSyncObjTypeTemplate *otempl = o->data;
+ type = g_malloc0(sizeof(OSyncObjType));
+ type->name = g_strdup(otempl->name);
+ type->env = conv_env;
+ conv_env->objtypes = g_list_append(conv_env->objtypes, type);
+ }
+
+ //The formats
+ GList *f = NULL;
+ for (f = env->format_templates; f; f = f->next) {
+ OSyncObjFormatTemplate *ftempl = f->data;
+ OSyncObjType *type = osync_conv_find_objtype(conv_env, ftempl->objtype);
+ g_assert(type);
+ OSyncObjFormat *format = g_malloc0(sizeof(OSyncObjFormat));
+ format->env = conv_env;
+ format->name = g_strdup(ftempl->name);
+ format->objtype = type;
+
+ format->cmp_func = ftempl->cmp_func;
+ format->merge_func = ftempl->merge_func;
+ format->duplicate_func = ftempl->duplicate_func;
+ format->copy_func = ftempl->copy_func;
+ format->create_func = ftempl->create_func;
+ format->destroy_func = ftempl->destroy_func;
+ format->print_func = ftempl->print_func;
+ format->revision_func = ftempl->revision_func;
+ format->marshall_func = ftempl->marshall_func;
+ format->demarshall_func = ftempl->demarshall_func;
+ type->formats = g_list_append(type->formats, format);
+ conv_env->objformats = g_list_append(conv_env->objformats, format);
+ }
+
+ //The extension
+ GList *i;
+ for (i = env->extension_templates; i; i = i->next) {
+ OSyncFormatExtensionTemplate *extension_template = i->data;
+ OSyncObjFormat *from_format = osync_conv_find_objformat(conv_env, extension_template->from_formatname);
+ OSyncObjFormat *to_format = osync_conv_find_objformat(conv_env, extension_template->to_formatname);
+ if (!from_format || !to_format)
+ continue;
+
+ OSyncFormatExtension *extension = g_malloc0(sizeof(OSyncFormatExtension));
+ extension->name = g_strdup(extension_template->name);
+ extension->init_func = extension_template->init_func;
+ extension->from_format = from_format;
+ extension->to_format = to_format;
+
+ conv_env->extensions = g_list_append(conv_env->extensions, extension);
+ }
+
+ //Converter templates
+ for (i = env->converter_templates; i; i = i->next) {
+ OSyncConverterTemplate *convtmpl = i->data;
+
+ osync_trace(TRACE_INTERNAL, "New converter from %s to %s", convtmpl->source_format, convtmpl->target_format);
+
+ OSyncObjFormat *fmt_src = osync_conv_find_objformat(conv_env, convtmpl->source_format);
+ OSyncObjFormat *fmt_trg = osync_conv_find_objformat(conv_env, convtmpl->target_format);
+ if (!fmt_src || !fmt_trg)
+ continue;
+ OSyncFormatConverter *converter = g_malloc0(sizeof(OSyncFormatConverter));
+ converter->source_format = fmt_src;
+ converter->target_format = fmt_trg;
+ converter->convert_func = convtmpl->convert_func;
+ converter->type = convtmpl->type;
+ converter->init_func = convtmpl->init_func;
+
+ conv_env->converters = g_list_append(conv_env->converters, converter);
+ }
+
+ //The detectors
+ for (i = env->data_detectors; i; i = i->next) {
+ OSyncDataDetector *detector = i->data;
+ OSyncFormatConverter *converter = osync_conv_find_converter(conv_env, detector->sourceformat, detector->targetformat);
+ if (!converter) {
+ OSyncObjFormat *fmt_src = osync_conv_find_objformat(conv_env, detector->sourceformat);
+ OSyncObjFormat *fmt_trg = osync_conv_find_objformat(conv_env, detector->targetformat);
+ if (!fmt_src || !fmt_trg)
+ continue;
+ converter = g_malloc0(sizeof(OSyncFormatConverter));
+ converter->source_format = fmt_src;
+ converter->target_format = fmt_trg;
+ converter->type = CONVERTER_DETECTOR;
+ }
+ converter->detect_func = detector->detect_func;
+ conv_env->converters = g_list_append(conv_env->converters, converter);
+ }
+
+ //The filters
+ conv_env->filter_functions = g_list_copy(env->filter_functions);
+
+ osync_conv_set_common_format(conv_env, "contact", "xml-contact", NULL);
+ osync_conv_set_common_format(conv_env, "event", "xml-event", NULL);
+ osync_conv_set_common_format(conv_env, "todo", "xml-todo", NULL);
+ osync_conv_set_common_format(conv_env, "note", "xml-note", NULL);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, conv_env);
+ return conv_env;
+}
+
+/*! @brief Frees a osync format environment
+ *
+ * Frees a osync format environment and all resources.
+ *
+ * @param env Pointer to the environment to free
+ *
+ */
+void osync_conv_env_free(OSyncFormatEnv *env)
+{
+ g_assert(env);
+
+ //We need to go through the loaded objtypes and free them.
+
+ g_free(env);
+}
+
+/*! @brief Sets the common format for a object type
+ *
+ * @param env Pointer to the environment
+ * @param objtypestr The object type name for which to set the common format
+ * @param formatname The name of the format
+ * @param error Pointer to a error struct
+ * @returns TRUE if the format was successfully set
+ *
+ */
+osync_bool osync_conv_set_common_format(OSyncFormatEnv *env, const char *objtypestr, const char *formatname, OSyncError **error)
+{
+ OSyncObjType *type = osync_conv_find_objtype(env, objtypestr);
+ if (!type) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to set a common format: Unable to find the object-type \"%s\"", objtypestr);
+ return FALSE;
+ }
+ OSyncObjFormat *format = osync_conv_find_objformat(env, formatname);
+ if (!format) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to set a common format: Unable to find the format \"%s\"", formatname);
+ return FALSE;
+ }
+ type->common_format = format;
+ return TRUE;
+}
+
+/*! @brief Finds the object type with the given name
+ *
+ * @param env Pointer to the environment
+ * @param name Name of the object type to find
+ * @returns The object type, or NULL if not found
+ *
+ */
+OSyncObjType *osync_conv_find_objtype(OSyncFormatEnv *env, const char *name)
+{
+ g_assert(env);
+ g_assert(name);
+
+ GList *element = NULL;
+ for (element = env->objtypes; element; element = element->next) {
+ OSyncObjType *type = element->data;
+ if (!strcmp(type->name, name))
+ return type;
+ }
+ osync_debug("CONV", 1, "Unable to find the requested objtype \"%s\"", name);
+ return NULL;
+}
+
+/*! @brief Returns the number of available object types
+ *
+ * @param env Pointer to the environment
+ * @returns The number of object types
+ *
+ */
+int osync_conv_num_objtypes(OSyncFormatEnv *env)
+{
+ g_assert(env);
+ return g_list_length(env->objtypes);
+}
+
+/*! @brief Gets the nth object type
+ *
+ * @param env Pointer to the environment
+ * @param nth The number
+ * @returns The object type, or NULL if there is no such object type
+ *
+ */
+OSyncObjType *osync_conv_nth_objtype(OSyncFormatEnv *env, int nth)
+{
+ g_assert(env);
+ return g_list_nth_data(env->objtypes, nth);
+}
+
+/*! @brief Finds the object format with the given name
+ *
+ * @param env Pointer to the environment
+ * @param name Name of the format type to find
+ * @returns The object format, or NULL if not found
+ *
+ */
+OSyncObjFormat *osync_conv_find_objformat(OSyncFormatEnv *env, const char *name)
+{
+ g_assert(env);
+ g_assert(name);
+
+ GList *element = NULL;
+ for (element = env->objformats; element; element = element->next) {
+ OSyncObjFormat *format = element->data;
+ if (!strcmp(format->name, name))
+ return format;
+ }
+ return NULL;
+}
+
+/*! @brief Returns the number of available object formats
+ *
+ * @param type The object type for whih to lookup the formats
+ * @returns The number of object formats
+ *
+ */
+int osync_conv_num_objformats(OSyncObjType *type)
+{
+ g_assert(type);
+ return g_list_length(type->formats);
+}
+
+/*! @brief Gets the nth object format
+ *
+ * @param type The object for which to get the nth format
+ * @param nth The number
+ * @returns The object format, or NULL if there is no such object type
+ *
+ */
+OSyncObjFormat *osync_conv_nth_objformat(OSyncObjType *type, int nth)
+{
+ g_assert(type);
+ return g_list_nth_data(type->formats, nth);
+}
+
+/*! @brief Finds the converter with the given source and target format
+ *
+ * @param env Pointer to the environment
+ * @param sourcename Name of the source format
+ * @param targetname Name of the target format
+ * @returns The converter, or NULL if not found
+ *
+ */
+OSyncFormatConverter *osync_conv_find_converter(OSyncFormatEnv *env, const char *sourcename, const char *targetname)
+{
+ g_assert(env);
+ g_assert(sourcename);
+ g_assert(targetname);
+
+ OSyncObjFormat *fmt_src = osync_conv_find_objformat(env, sourcename);
+ if (!fmt_src)
+ return NULL;
+ OSyncObjFormat *fmt_trg = osync_conv_find_objformat(env, targetname);
+ if (!fmt_trg)
+ return NULL;
+
+ return osync_conv_find_converter_objformat(env, fmt_src, fmt_trg);
+}
+
+/*! @brief Finds the extension that will be invoked when going from the given source to the target format with the given name
+ *
+ * @param env Pointer to the environment
+ * @param from_format From Format
+ * @param to_format To Format
+ * @param extension_name The name of the extension to search
+ * @returns The extension, or NULL if not found
+ *
+ */
+OSyncFormatExtension *osync_conv_find_extension(OSyncFormatEnv *env, OSyncObjFormat *from_format, OSyncObjFormat *to_format, const char *extension_name)
+{
+ g_assert(env);
+ g_assert(extension_name);
+
+ GList *i = NULL;
+ for (i = env->extensions; i; i = i->next) {
+ OSyncFormatExtension *extension = i->data;
+ osync_trace(TRACE_INTERNAL, "comparing format %p:%p %p:%p name %s:%s", extension->from_format, from_format, extension->to_format, to_format, extension->name, extension_name);
+ if ((extension->from_format == from_format || !from_format) && (extension->to_format == to_format || !to_format) && !strcmp(extension->name, extension_name))
+ return extension;
+ }
+ return NULL;
+}
+
+/*! @brief Returns the name of a object type
+ *
+ * @param type The object type
+ * @returns The name of the object type
+ *
+ */
+const char *osync_objtype_get_name(OSyncObjType *type)
+{
+ g_assert(type);
+ return type->name;
+}
+
+/*! @brief Returns the name of a object format
+ *
+ * @param format The object format
+ * @returns The name of the object format
+ *
+ */
+const char *osync_objformat_get_name(OSyncObjFormat *format)
+{
+ g_assert(format);
+ return format->name;
+}
+
+/*! @brief Returns the object type of a format
+ *
+ * @param format The object format
+ * @returns The object type
+ *
+ */
+OSyncObjType *osync_objformat_get_objtype(OSyncObjFormat *format)
+{
+ g_assert(format);
+ return format->objtype;
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_convert.h b/debian/opensync/opensync-0.22/opensync/opensync_convert.h
new file mode 100644
index 00000000..a99ee4ac
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_convert.h
@@ -0,0 +1,57 @@
+
+typedef enum {
+ /** Simple converter */
+ CONVERTER_CONV = 1,
+ /** Encapsulator */
+ CONVERTER_ENCAP = 2,
+ /** Desencapsulator */
+ CONVERTER_DECAP = 3,
+ /** Detector */
+ CONVERTER_DETECTOR = 4
+} ConverterType;
+
+/*! @ingroup OSyncChangeCmds
+ * @brief The possible returns of a change comparison
+ */
+typedef enum {
+ /** The result is unknown, there was a error */
+ CONV_DATA_UNKNOWN = 0,
+ /** The changes are not the same */
+ CONV_DATA_MISMATCH = 1,
+ /** The changs are not the same but look similar */
+ CONV_DATA_SIMILAR = 2,
+ /** The changes are exactly the same */
+ CONV_DATA_SAME = 3
+} OSyncConvCmpResult;
+
+typedef OSyncConvCmpResult (* OSyncFormatCompareFunc) (OSyncChange *leftchange, OSyncChange *rightchange);
+typedef osync_bool (* OSyncFormatConvertFunc) (void *init_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error);
+typedef osync_bool (* OSyncFormatCopyFunc) (const char *input, int inpsize, char **output, int *outpsize);
+typedef osync_bool (* OSyncFormatDetectDataFunc) (OSyncFormatEnv *env, const char *data, int size);
+typedef void (* OSyncFormatDuplicateFunc) (OSyncChange *change);
+typedef void (* OSyncFormatCreateFunc) (OSyncChange *change);
+typedef void (* OSyncFormatMergeFunc) (OSyncChange *leftchange, OSyncChange *rightchange, OSyncError **);
+typedef void (* OSyncFormatDestroyFunc) (char *data, size_t size);
+typedef char *(* OSyncFormatPrintFunc) (OSyncChange *change);
+typedef void *(* OSyncFormatConverterInitFunc) (void);
+typedef void (* OSyncFormatConverterFinalizeFunc) (void *);
+typedef osync_bool (* OSyncFormatExtInitFunc) (void *);
+typedef time_t (* OSyncFormatRevisionFunc) (OSyncChange *change, OSyncError **error);
+typedef osync_bool (* OSyncFormatMarshallFunc) (const char *nput, int inpsize, char **output, int *outpsize, OSyncError **);
+typedef osync_bool (* OSyncFormatDemarshallFunc) (const char *nput, int inpsize, char **output, int *outpsize, OSyncError **);
+
+OSyncFormatEnv *osync_conv_env_new(OSyncEnv *env);
+void osync_conv_env_free(OSyncFormatEnv *env);
+osync_bool osync_conv_set_common_format(OSyncFormatEnv *env, const char *objtypestr, const char *formatname, OSyncError **error);
+
+OSyncObjType *osync_conv_find_objtype(OSyncFormatEnv *env, const char *name);
+OSyncObjFormat *osync_conv_find_objformat(OSyncFormatEnv *env, const char *name);
+int osync_conv_num_objtypes(OSyncFormatEnv *env);
+OSyncObjType *osync_conv_nth_objtype(OSyncFormatEnv *env, int nth);
+int osync_conv_num_objformats(OSyncObjType *type);
+OSyncObjFormat *osync_conv_nth_objformat(OSyncObjType *type, int nth);
+OSyncFormatConverter *osync_conv_find_converter(OSyncFormatEnv *env, const char *sourcename, const char *targetname);
+
+const char *osync_objtype_get_name(OSyncObjType *type);
+const char *osync_objformat_get_name(OSyncObjFormat *format);
+OSyncObjType *osync_objformat_get_objtype(OSyncObjFormat *format);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_convreg.c b/debian/opensync/opensync-0.22/opensync/opensync_convreg.c
new file mode 100644
index 00000000..b030b0ba
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_convreg.c
@@ -0,0 +1,263 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @defgroup OSyncConvRegPrivate OpenSync Registration Internals
+ * @ingroup OSyncPrivate
+ * @brief The private API for registering plugin
+ *
+ */
+/*@{*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+OSyncObjFormatTemplate *osync_env_find_format_template(OSyncEnv *env, const char *name)
+{
+ GList *o;
+ for (o = env->format_templates; o; o = o->next) {
+ OSyncObjFormatTemplate *tmpl = o->data;
+ if (!strcmp(tmpl->name, name))
+ return tmpl;
+ }
+ return NULL;
+}
+
+OSyncObjTypeTemplate *osync_env_find_objtype_template(OSyncEnv *env, const char *name)
+{
+ GList *o;
+ for (o = env->objtype_templates; o; o = o->next) {
+ OSyncObjTypeTemplate *tmpl = o->data;
+ if (!strcmp(tmpl->name, name))
+ return tmpl;
+ }
+ return NULL;
+}
+
+OSyncDataDetector *osync_env_find_detector(OSyncEnv *env, const char *sourcename, const char *targetname)
+{
+ GList *o;
+ for (o = env->data_detectors; o; o = o->next) {
+ OSyncDataDetector *tmpl = o->data;
+ if (!strcmp(tmpl->sourceformat, sourcename) && !strcmp(tmpl->targetformat, targetname))
+ return tmpl;
+ }
+ return NULL;
+}
+
+OSyncConverterTemplate *osync_env_find_converter_template(OSyncEnv *env, const char *sourcename, const char *targetname)
+{
+ GList *o;
+ for (o = env->converter_templates; o; o = o->next) {
+ OSyncConverterTemplate *tmpl = o->data;
+ if (!strcmp(tmpl->source_format, sourcename) && !strcmp(tmpl->target_format, targetname))
+ return tmpl;
+ }
+ return NULL;
+}
+#endif
+
+/*@}*/
+
+void osync_env_register_detector(OSyncEnv *env, const char *sourceformat, const char *format, OSyncFormatDetectDataFunc detect_func)
+{
+ g_assert(detect_func);
+ OSyncDataDetector *detector = g_malloc0(sizeof(OSyncDataDetector));
+ detector->sourceformat = strdup(sourceformat);
+ detector->targetformat = strdup(format);
+ detector->detect_func = detect_func;
+
+ //Register the "inverse" detector which of course will always work
+ env->data_detectors = g_list_append(env->data_detectors, detector);
+ detector = g_malloc0(sizeof(OSyncDataDetector));
+ detector->sourceformat = strdup(format);
+ detector->targetformat = strdup(sourceformat);
+ detector->detect_func = NULL;
+
+ env->data_detectors = g_list_append(env->data_detectors, detector);
+}
+
+void osync_env_register_filter_function(OSyncEnv *env, const char *name, const char *objtype, const char *format, OSyncFilterFunction hook)
+{
+ OSyncCustomFilter *function = g_malloc0(sizeof(OSyncCustomFilter));
+ function->name = g_strdup(name);
+ function->objtype = g_strdup(objtype);
+ function->format = g_strdup(format);
+ function->hook = hook;
+
+ env->filter_functions = g_list_append(env->filter_functions, function);
+}
+
+void osync_env_register_objformat(OSyncEnv *env, const char *typename, const char *name)
+{
+ OSyncObjFormatTemplate *format = NULL;
+ if (!(format = osync_env_find_format_template(env, name))) {
+ format = g_malloc0(sizeof(OSyncObjFormatTemplate));
+ format->name = strdup(name);
+ format->objtype = g_strdup(typename);
+ //We default to malloc style!
+ //format->copy_func = osync_format_malloced_copy;
+ //format->destroy_func = osync_format_malloced_destroy;
+ env->format_templates = g_list_append(env->format_templates, format);
+ }
+}
+
+void osync_env_register_objtype(OSyncEnv *env, const char *name)
+{
+ OSyncObjTypeTemplate *type = NULL;
+ if (!(type = osync_env_find_objtype_template(env, name))) {
+ type = g_malloc0(sizeof(OSyncObjTypeTemplate));
+ type->name = g_strdup(name);
+ env->objtype_templates = g_list_append(env->objtype_templates, type);
+ }
+}
+
+void osync_env_register_converter(OSyncEnv *env, ConverterType type, const char *sourcename, const char *targetname, OSyncFormatConvertFunc convert_func)
+{
+ OSyncConverterTemplate *converter = g_malloc0(sizeof(OSyncConverterTemplate));
+
+ converter->source_format = sourcename;
+ converter->target_format = targetname;
+ converter->convert_func = convert_func;
+ converter->type = type;
+ env->converter_templates = g_list_append(env->converter_templates, converter);
+}
+
+void osync_env_converter_set_init(OSyncEnv *env, const char *sourcename, const char *targetname, OSyncFormatConverterInitFunc init_func, OSyncFormatConverterFinalizeFunc fin_func)
+{
+ OSyncConverterTemplate *converter = osync_env_find_converter_template(env, sourcename, targetname);
+ osync_assert_msg(converter != NULL, "You need to register the converter first");
+
+ converter->init_func = init_func;
+ converter->fin_func = fin_func;
+}
+
+void osync_env_register_extension(OSyncEnv *env, const char *from_format, const char *to_format, const char *extension_name, OSyncFormatExtInitFunc init_func)
+{
+ OSyncFormatExtensionTemplate *ext = g_malloc0(sizeof(OSyncFormatExtensionTemplate));
+ ext->from_formatname = g_strdup(from_format);
+ ext->to_formatname = g_strdup(to_format);
+ ext->name = g_strdup(extension_name);
+ ext->init_func = init_func;
+
+ env->extension_templates = g_list_append(env->extension_templates, ext);
+}
+
+void osync_env_format_set_demarshall_func(OSyncEnv *env, const char *formatname, OSyncFormatDemarshallFunc demarshall_func)
+{
+ osync_trace(TRACE_INTERNAL, "osync_env_format_set_demarshall_func(%p, %s, %p)", env, formatname, demarshall_func);
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->demarshall_func = demarshall_func;
+}
+
+void osync_env_format_set_marshall_func(OSyncEnv *env, const char *formatname, OSyncFormatMarshallFunc marshall_func)
+{
+ osync_trace(TRACE_INTERNAL, "osync_env_format_set_marshall_func(%p, %s, %p)", env, formatname, marshall_func);
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->marshall_func = marshall_func;
+}
+
+void osync_env_format_set_compare_func(OSyncEnv *env, const char *formatname, OSyncFormatCompareFunc cmp_func)
+{
+ osync_trace(TRACE_INTERNAL, "osync_env_format_set_compare_func(%p, %s, %p)", env, formatname, cmp_func);
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->cmp_func = cmp_func;
+}
+
+void osync_env_format_set_destroy_func(OSyncEnv *env, const char *formatname, OSyncFormatDestroyFunc destroy_func)
+{
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->destroy_func = destroy_func;
+}
+
+void osync_env_format_set_copy_func(OSyncEnv *env, const char *formatname, OSyncFormatCopyFunc copy_func)
+{
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->copy_func = copy_func;
+}
+
+/** Set the detector function for this type
+ *
+ * A detector function for a given format is different from a the detectors registered
+ * using osync_env_register_data_detector().
+ *
+ * The osync_env_format_set_detect_func() is a function designed to return the lower
+ * objformat of the data, by looking at it.
+ *
+ * The osync_env_register_data_detector() function is a function that checks if a
+ * given block of data can be converting to a given format.
+ *
+ * The osync_env_format_set_detect_func() is more useful for
+ * 'encapsulator'-like formats * that can tell the format of the data below,
+ * by just looking at the data. The osync_env_register_data_detector() functions
+ * is more useful for 'generic' formats (like the "plain" format) that each
+ * format to which it can be converted to (vcard, vcalendar, etc.) knows
+ * how to detect the data by looking into the "plain" block.
+ */
+/*void osync_env_format_set_detect_func(OSyncEnv *env, const char *formatname, OSyncFormatDetectFunc detect_func)
+{
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->detect_func = detect_func;
+}*/
+
+void osync_env_format_set_duplicate_func(OSyncEnv *env, const char *formatname, OSyncFormatDuplicateFunc dupe_func)
+{
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->duplicate_func = dupe_func;
+}
+
+void osync_env_format_set_create_func(OSyncEnv *env, const char *formatname, OSyncFormatCreateFunc create_func)
+{
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->create_func = create_func;
+}
+
+void osync_env_format_set_print_func(OSyncEnv *env, const char *formatname, OSyncFormatPrintFunc print_func)
+{
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->print_func = print_func;
+}
+
+void osync_env_format_set_revision_func(OSyncEnv *env, const char *formatname, OSyncFormatRevisionFunc revision_func)
+{
+ g_assert(env);
+ OSyncObjFormatTemplate *format = osync_env_find_format_template(env, formatname);
+ osync_assert_msg(format, "You need to register the formattype first");
+ format->revision_func = revision_func;
+}
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_convreg.h b/debian/opensync/opensync-0.22/opensync/opensync_convreg.h
new file mode 100644
index 00000000..0698827e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_convreg.h
@@ -0,0 +1,21 @@
+#ifndef _OPENSYNC_CONVREG_H_
+#define _OPENSYNC_CONVREG_H_
+
+void osync_env_register_detector(OSyncEnv *env, const char *sourceformat, const char *format, OSyncFormatDetectDataFunc detect_func);
+void osync_env_register_filter_function(OSyncEnv *env, const char *name, const char *objtype, const char *format, OSyncFilterFunction hook);
+void osync_env_register_objformat(OSyncEnv *env, const char *objtypename, const char *name);
+void osync_env_register_objtype(OSyncEnv *env, const char *name);
+void osync_env_register_converter(OSyncEnv *env, ConverterType type, const char *sourcename, const char *targetname, OSyncFormatConvertFunc convert_func);
+void osync_env_converter_set_init(OSyncEnv *env, const char *sourcename, const char *targetname, OSyncFormatConverterInitFunc init_func, OSyncFormatConverterFinalizeFunc fin_func);
+void osync_env_register_extension(OSyncEnv *env, const char *from_format, const char *to_format, const char *extension_name, OSyncFormatExtInitFunc init_func);
+void osync_env_format_set_compare_func(OSyncEnv *env, const char *formatname, OSyncFormatCompareFunc cmp_func);
+void osync_env_format_set_destroy_func(OSyncEnv *env, const char *formatname, OSyncFormatDestroyFunc destroy_func);
+void osync_env_format_set_copy_func(OSyncEnv *env, const char *formatname, OSyncFormatCopyFunc copy_func);
+void osync_env_format_set_duplicate_func(OSyncEnv *env, const char *formatname, OSyncFormatDuplicateFunc dupe_func);
+void osync_env_format_set_create_func(OSyncEnv *env, const char *formatname, OSyncFormatCreateFunc create_func);
+void osync_env_format_set_print_func(OSyncEnv *env, const char *formatname, OSyncFormatPrintFunc print_func);
+void osync_env_format_set_revision_func(OSyncEnv *env, const char *formatname, OSyncFormatRevisionFunc revision_func);
+void osync_env_format_set_marshall_func(OSyncEnv *env, const char *formatname, OSyncFormatMarshallFunc marshall_func);
+void osync_env_format_set_demarshall_func(OSyncEnv *env, const char *formatname, OSyncFormatDemarshallFunc marshall_func);
+
+#endif //_OPENSYNC_CONVREG_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_db.c b/debian/opensync/opensync-0.22/opensync/opensync_db.c
new file mode 100644
index 00000000..331f11e9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_db.c
@@ -0,0 +1,706 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+void osync_db_trace(void *data, const char *query)
+{
+ osync_trace(TRACE_INTERNAL, "query executed: %s", query);
+}
+
+OSyncDB *osync_db_open(char *filename, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, filename, error);
+
+ OSyncDB *db = osync_try_malloc0(sizeof(OSyncDB), error);
+ if (!db)
+ goto error;
+
+ int rc = sqlite3_open(filename, &(db->db));
+ if (rc) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Cannot open database: %s", sqlite3_errmsg(db->db));
+ goto error_close;
+ }
+ sqlite3_trace(db->db, osync_db_trace, NULL);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, db);
+ return db;
+
+error_close:
+ osync_db_close(db);
+//error_free:
+ g_free(db);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+}
+
+void osync_db_close(OSyncDB *db)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, db);
+
+ int ret = sqlite3_close(db->db);
+ if (ret != SQLITE_OK)
+ osync_trace(TRACE_INTERNAL, "Can't close database: %s", sqlite3_errmsg(db->db));
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+int osync_db_count(OSyncDB *db, char *query)
+{
+ int ret = 0;
+
+ sqlite3_stmt *ppStmt = NULL;
+ if (sqlite3_prepare(db->db, query, -1, &ppStmt, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 3, "Unable prepare count! %s", sqlite3_errmsg(db->db));
+ ret = sqlite3_step(ppStmt);
+ if (ret != SQLITE_DONE && ret != SQLITE_ROW)
+ osync_debug("OSDB", 3, "Unable step count! %s", sqlite3_errmsg(db->db));
+ if (ret == SQLITE_DONE)
+ osync_debug("OSDB", 3, "No row found!");
+ ret = sqlite3_column_int64(ppStmt, 0);
+ sqlite3_finalize(ppStmt);
+ return ret;
+}
+
+OSyncDB *_open_changelog(OSyncGroup *group, OSyncError **error)
+{
+ g_assert(group);
+ OSyncDB *log_db;
+
+ char *filename = g_strdup_printf("%s/changelog.db", group->configdir);
+ if (!(log_db = osync_db_open(filename, error))) {
+ osync_error_update(error, "Unable to load changelog: %s", osync_error_print(error));
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+ }
+ osync_debug("OSDB", 3, "Preparing to changelog from file %s", filename);
+ g_free(filename);
+
+ sqlite3 *sdb = log_db->db;
+
+ if (sqlite3_exec(sdb, "CREATE TABLE tbl_log (uid VARCHAR, objtype VARCHAR, memberid INTEGER, changetype INTEGER)", NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 2, "Unable create log table! %s", sqlite3_errmsg(sdb));
+ return log_db;
+}
+
+osync_bool osync_db_open_changelog(OSyncGroup *group, char ***uids, char ***objtype, long long int **memberids, int **changetypes, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, group, uids, changetypes, error);
+
+ OSyncDB *log_db = _open_changelog(group, error);
+ if (!log_db) {
+ goto error;
+ }
+ sqlite3 *sdb = log_db->db;
+
+ int count = osync_db_count(log_db, "SELECT count(*) FROM tbl_log");
+
+ *uids = g_malloc0(sizeof(char *) * (count + 1));
+ *objtype = g_malloc0(sizeof(char *) * (count + 1));
+ *memberids = g_malloc0(sizeof(long long int) * (count + 1));
+ *changetypes = g_malloc0(sizeof(int) * (count + 1));
+
+ sqlite3_stmt *ppStmt = NULL;
+ sqlite3_prepare(sdb, "SELECT uid, objtype, memberid, changetype FROM tbl_log", -1, &ppStmt, NULL);
+ int i = 0;
+ while (sqlite3_step(ppStmt) == SQLITE_ROW) {
+ (*uids)[i] = g_strdup((gchar*)sqlite3_column_text(ppStmt, 0));
+ (*objtype)[i] = g_strdup((gchar*)sqlite3_column_text(ppStmt, 1));
+ (*memberids)[i] = sqlite3_column_int64(ppStmt, 2);
+ (*changetypes)[i] = sqlite3_column_int(ppStmt, 3);
+ i++;
+ }
+ (*uids)[i] = NULL;
+ (*objtype)[i] = NULL;
+ (*memberids)[i] = 0;
+ (*changetypes)[i] = 0;
+ sqlite3_finalize(ppStmt);
+
+ char *query = g_strdup_printf("DELETE FROM tbl_log");
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to remove all logs! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+ goto error_db_close;
+ }
+ g_free(query);
+
+ osync_db_close(log_db);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_db_close:
+ osync_db_close(log_db);
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_db_save_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, group, change, error);
+
+ OSyncDB *log_db = _open_changelog(group, error);
+ if (!log_db) {
+ goto error;
+ }
+ sqlite3 *sdb = log_db->db;
+
+ char *escaped_uid = osync_db_sql_escape(change->uid);
+ char *query = g_strdup_printf("INSERT INTO tbl_log (uid, objtype, memberid, changetype) VALUES('%s', '%s', '%lli', '%i')", escaped_uid, osync_change_get_objtype(change)->name, change->member->id, change->changetype);
+ g_free(escaped_uid);
+
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to insert log! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+ goto error_db_close;
+ }
+ g_free(query);
+
+ osync_db_close(log_db);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_db_close:
+ osync_db_close(log_db);
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+
+}
+
+osync_bool osync_db_remove_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, group, change, error);
+
+ OSyncDB *log_db = _open_changelog(group, error);
+ if (!log_db) {
+ goto error;
+ }
+ sqlite3 *sdb = log_db->db;
+
+ char *escaped_uid = osync_db_sql_escape(change->uid);
+ char *query = g_strdup_printf("DELETE FROM tbl_log WHERE uid='%s' AND memberid='%lli' AND objtype='%s'",
+ escaped_uid, change->member->id, osync_change_get_objtype(change)->name);
+ g_free(escaped_uid);
+
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to remove log! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+ goto error_db_close;
+ }
+ g_free(query);
+
+ osync_db_close(log_db);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_db_close:
+ osync_db_close(log_db);
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_db_open_changes(OSyncGroup *group, OSyncChange ***changes, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, group, changes, error);
+ g_assert(group);
+
+ group->changes_path = g_strdup(group->configdir);
+ char *filename = g_strdup_printf("%s/change.db", group->changes_path);
+ if (!(group->changes_db = osync_db_open(filename, error))) {
+ osync_error_update(error, "Unable to load changes: %s", osync_error_print(error));
+ goto error;
+ }
+ osync_debug("OSDB", 3, "Preparing to load changes from file %s", filename);
+ g_free(filename);
+
+ sqlite3 *sdb = group->changes_db->db;
+
+ if (sqlite3_exec(sdb, "CREATE TABLE tbl_changes (id INTEGER PRIMARY KEY, uid VARCHAR, objtype VARCHAR, format VARCHAR, memberid INTEGER, mappingid INTEGER)", NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 2, "Unable create changes table! %s", sqlite3_errmsg(sdb));
+
+ int count = osync_db_count(group->changes_db, "SELECT count(*) FROM tbl_changes");
+ *changes = g_malloc0(sizeof(OSyncChange *) * (count + 1));
+
+ sqlite3_stmt *ppStmt = NULL;
+ sqlite3_prepare(sdb, "SELECT id, uid, objtype, format, memberid, mappingid FROM tbl_changes ORDER BY mappingid", -1, &ppStmt, NULL);
+ int i = 0;
+ while (sqlite3_step(ppStmt) == SQLITE_ROW) {
+ OSyncChange *change = osync_change_new();
+ change->id = sqlite3_column_int64(ppStmt, 0);
+ change->uid = g_strdup((gchar*)sqlite3_column_text(ppStmt, 1));
+ change->objtype_name = g_strdup((gchar*)sqlite3_column_text(ppStmt, 2));
+ change->format_name = g_strdup((gchar*)sqlite3_column_text(ppStmt, 3));
+ change->initial_format_name = g_strdup(change->format_name);
+ change->mappingid = sqlite3_column_int64(ppStmt, 5);
+ long long int memberid = sqlite3_column_int64(ppStmt, 4);
+ change->changes_db = group->changes_db;
+ osync_change_set_member(change, osync_member_from_id(group, memberid));
+ osync_trace(TRACE_INTERNAL, "Loaded change with uid %s, changetype %i, data %p, size %i, objtype %s and format %s from member %lli", osync_change_get_uid(change), osync_change_get_changetype(change), osync_change_get_data(change), osync_change_get_datasize(change), osync_change_get_objtype(change) ? osync_objtype_get_name(osync_change_get_objtype(change)) : "None", osync_change_get_objformat(change) ? osync_objformat_get_name(osync_change_get_objformat(change)) : "None", memberid);
+ (*changes)[i] = change;
+ i++;
+ }
+ (*changes)[i] = NULL;
+ sqlite3_finalize(ppStmt);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_db_save_change(OSyncChange *change, osync_bool save_format, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %p) (Table: %p)", __func__, change, save_format, error, change->changes_db);
+ osync_assert_msg(change, "Need to set change");
+ osync_assert_msg(osync_change_get_objtype(change), "change->objtype was NULL while saving");
+ osync_assert_msg(osync_change_get_objformat(change), "change->objformat was NULL while saving");
+
+ if (!change || !change->changes_db) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "osync_db_save_change was called with wrong parameters");
+ goto error;
+ }
+ sqlite3 *sdb = change->changes_db->db;
+
+ char *query = NULL;
+ if (!change->id) {
+ char *escaped_uid = osync_db_sql_escape(change->uid);
+ query = g_strdup_printf("INSERT INTO tbl_changes (uid, objtype, format, memberid, mappingid) VALUES('%s', '%s', '%s', '%lli', '%lli')", escaped_uid, osync_change_get_objtype(change)->name, osync_change_get_objformat(change)->name, change->member->id, change->mappingid);
+ g_free(escaped_uid);
+
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to insert change! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+ goto error;
+ }
+ change->id = sqlite3_last_insert_rowid(sdb);
+ } else {
+ char *escaped_uid = osync_db_sql_escape(change->uid);
+ if (save_format)
+ query = g_strdup_printf("UPDATE tbl_changes SET uid='%s', objtype='%s', format='%s', memberid='%lli', mappingid='%lli' WHERE id=%lli", escaped_uid, osync_change_get_objtype(change)->name, osync_change_get_objformat(change)->name, change->member->id, change->mappingid, change->id);
+ else
+ query = g_strdup_printf("UPDATE tbl_changes SET uid='%s', memberid='%lli', mappingid='%lli' WHERE id=%lli", escaped_uid, change->member->id, change->mappingid, change->id);
+ g_free(escaped_uid);
+
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to update change! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+ goto error;
+ }
+ }
+ g_free(query);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+
+}
+
+osync_bool osync_db_delete_change(OSyncChange *change, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, change, error);
+
+ if (!change || !change->changes_db) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "osync_db_delete_change was called with wrong parameters");
+ goto error;
+ }
+ sqlite3 *sdb = change->changes_db->db;
+
+ char *query = g_strdup_printf("DELETE FROM tbl_changes WHERE id=%lli", change->id);
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to delete change! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+ goto error;
+ }
+ g_free(query);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_db_reset_changes(OSyncGroup *group, const char *objtype, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, group, objtype, error);
+
+ if (!group || !objtype) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "osync_db_reset_changes was called with wrong parameters");
+ goto error;
+ }
+ sqlite3 *sdb = group->changes_db->db;
+
+ char *query = NULL;
+ if (osync_conv_objtype_is_any(objtype)) {
+ query = g_strdup_printf("DELETE FROM tbl_changes");
+ } else {
+ query = g_strdup_printf("DELETE FROM tbl_changes WHERE objtype='%s'", objtype);
+ }
+
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to reset changes! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+ goto error;
+ }
+
+ g_free(query);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+
+}
+
+osync_bool osync_db_reset_group(OSyncGroup *group, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, group, error);
+ OSyncDB *db = NULL;
+
+ if (!group) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "osync_db_reset_group was called with wrong parameters");
+ goto error;
+ }
+
+ char *changesdb = g_strdup_printf("%s/change.db", group->configdir);
+ if (!(db = osync_db_open(changesdb, error))) {
+ g_free(changesdb);
+ goto error;
+ }
+
+ if (sqlite3_exec(db->db, "DELETE FROM tbl_changes", NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to reset changes! %s", sqlite3_errmsg(db->db));
+ g_free(changesdb);
+ goto error_db_close;
+ }
+
+ osync_db_close(db);
+ g_free(changesdb);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_db_close:
+ osync_db_close(db);
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_db_reset_member(OSyncMember *member, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, member, error);
+ OSyncDB *db = NULL;
+
+ if (!member) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "osync_db_reset_member was called with wrong parameters");
+ goto error;
+ }
+
+ char *hashtable = g_strdup_printf("%s/hash.db", member->configdir);
+ if (g_file_test(hashtable, G_FILE_TEST_EXISTS)) {
+ if (!(db = osync_db_open(hashtable, error))) {
+ g_free(hashtable);
+ goto error;
+ }
+
+ if (sqlite3_exec(db->db, "DELETE FROM tbl_hash", NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to reset hashtable! %s", sqlite3_errmsg(db->db));
+ g_free(hashtable);
+ goto error_db_close;
+ }
+
+ osync_db_close(db);
+ }
+ g_free(hashtable);
+
+ char *anchordb = g_strdup_printf("%s/anchor.db", member->configdir);
+ if (g_file_test(anchordb, G_FILE_TEST_EXISTS)) {
+ if (!(db = osync_db_open(anchordb, error))) {
+ g_free(anchordb);
+ goto error;
+ }
+
+ if (sqlite3_exec(db->db, "DELETE FROM tbl_anchor", NULL, NULL, NULL) != SQLITE_OK) {
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to reset anchors! %s", sqlite3_errmsg(db->db));
+ g_free(anchordb);
+ goto error_db_close;
+ }
+
+ osync_db_close(db);
+ }
+ g_free(anchordb);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_db_close:
+ osync_db_close(db);
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+
+}
+
+void osync_db_close_changes(OSyncGroup *group)
+{
+ if (group->changes_db)
+ osync_db_close(group->changes_db);
+}
+
+OSyncDB *osync_db_open_anchor(OSyncMember *member, OSyncError **error)
+{
+ g_assert(member);
+ OSyncDB *sdb = NULL;
+ char *filename = g_strdup_printf ("%s/anchor.db", member->configdir);
+ if (!(sdb = osync_db_open(filename, error))) {
+ g_free(filename);
+ osync_error_update(error, "Unable to open anchor table: %s", (*error)->message);
+ return NULL;
+ }
+ g_free(filename);
+
+ if (sqlite3_exec(sdb->db, "CREATE TABLE tbl_anchor (id INTEGER PRIMARY KEY, anchor VARCHAR, objtype VARCHAR UNIQUE)", NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 3, "Unable create anchor table! %s", sqlite3_errmsg(sdb->db));
+
+ return sdb;
+}
+
+void osync_db_close_anchor(OSyncDB *db)
+{
+ osync_db_close(db);
+}
+
+void osync_db_get_anchor(OSyncDB *sdb, const char *objtype, char **retanchor)
+{
+ sqlite3_stmt *ppStmt = NULL;
+ char *query = g_strdup_printf("SELECT anchor FROM tbl_anchor WHERE objtype='%s'", objtype);
+ if (sqlite3_prepare(sdb->db, query, -1, &ppStmt, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 3, "Unable prepare anchor! %s", sqlite3_errmsg(sdb->db));
+ int ret = sqlite3_step(ppStmt);
+ if (ret != SQLITE_DONE && ret != SQLITE_ROW)
+ osync_debug("OSDB", 3, "Unable step count! %s", sqlite3_errmsg(sdb->db));
+ if (ret == SQLITE_DONE)
+ osync_debug("OSDB", 3, "No row found!");
+ *retanchor = g_strdup((gchar*)sqlite3_column_text(ppStmt, 0));
+ sqlite3_finalize(ppStmt);
+ g_free(query);
+}
+
+void osync_db_put_anchor(OSyncDB *sdb, const char *objtype, const char *anchor)
+{
+ char *escaped_anchor = osync_db_sql_escape(anchor);
+ char *query = g_strdup_printf("REPLACE INTO tbl_anchor (objtype, anchor) VALUES('%s', '%s')", objtype, escaped_anchor);
+ g_free(escaped_anchor);
+
+ if (sqlite3_exec(sdb->db, query, NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 1, "Unable put anchor! %s", sqlite3_errmsg(sdb->db));
+
+ g_free(query);
+}
+
+
+osync_bool osync_db_open_hashtable(OSyncHashTable *table, OSyncMember *member, OSyncError **error)
+{
+ g_assert(member);
+ char *filename = g_strdup_printf ("%s/hash.db", member->configdir);
+ if (!(table->dbhandle = osync_db_open(filename, error))) {
+ g_free(filename);
+ osync_error_update(error, "Unable to open hashtable: %s", (*error)->message);
+ return FALSE;
+ }
+ g_free(filename);
+
+ sqlite3 *db = table->dbhandle->db;
+
+ if (sqlite3_exec(db, "CREATE TABLE tbl_hash (id INTEGER PRIMARY KEY, uid VARCHAR, hash VARCHAR, objtype VARCHAR)", NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 3, "Unable create hash table! %s", sqlite3_errmsg(db));
+
+ return TRUE; //FIXME
+}
+
+void osync_db_close_hashtable(OSyncHashTable *table)
+{
+ osync_db_close(table->dbhandle);
+}
+
+int exists_hashtable_id(OSyncHashTable *table, const char *uid, const char *objtype)
+{
+ g_assert(table->dbhandle);
+ sqlite3 *sdb = table->dbhandle->db;
+
+ int id = -1;
+
+ char *exist = g_strdup_printf("SELECT id FROM tbl_hash WHERE uid='%s' AND objtype='%s'",uid, objtype);
+
+ sqlite3_stmt *ppStmt = NULL;
+ if (sqlite3_prepare(sdb, exist, -1, &ppStmt, NULL) != SQLITE_OK)
+ {
+ osync_debug("OSDB", 3, "Unable prepare get id! %s", sqlite3_errmsg(sdb));
+ return (id);
+ }
+ int ret = sqlite3_step(ppStmt);
+ if (ret != SQLITE_DONE && ret != SQLITE_ROW)
+ return (id);
+ if (ret == SQLITE_DONE)
+ return (id);
+
+ id = sqlite3_column_int64(ppStmt, 0);
+ sqlite3_finalize(ppStmt);
+ g_free(exist);
+
+ return(id);
+}
+
+void osync_db_save_hash(OSyncHashTable *table, const char *uid, const char *hash, const char *objtype)
+{
+ g_assert(table->dbhandle);
+ sqlite3 *sdb = table->dbhandle->db;
+
+ char *escaped_uid = osync_db_sql_escape(uid);
+ char *escaped_hash = osync_db_sql_escape(hash);
+ char *escaped_objtype = osync_db_sql_escape(objtype);
+ int id = exists_hashtable_id(table, escaped_uid, escaped_objtype);
+ char *query = NULL;
+ if(id < 0){
+ query = g_strdup_printf(
+ "REPLACE INTO tbl_hash ('uid', 'hash', 'objtype') VALUES('%s', '%s', '%s')",
+ escaped_uid, escaped_hash, escaped_objtype);
+ }else{
+ query = g_strdup_printf(
+ "REPLACE INTO tbl_hash ('id', 'uid', 'hash', 'objtype') VALUES('%i', '%s', '%s', '%s')",
+ id, escaped_uid, escaped_hash, escaped_objtype);
+ }
+
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 1, "Unable to insert hash! uid = %s, hash = %s, error = %s", escaped_uid, escaped_hash, sqlite3_errmsg(sdb));
+
+ g_free(escaped_uid);
+ g_free(escaped_hash);
+ g_free(escaped_objtype);
+ g_free(query);
+}
+
+
+void osync_db_delete_hash(OSyncHashTable *table, const char *uid)
+{
+ g_assert(table->dbhandle);
+ sqlite3 *sdb = table->dbhandle->db;
+
+ char *escaped_uid = osync_db_sql_escape(uid);
+ char *query = g_strdup_printf("DELETE FROM tbl_hash WHERE uid='%s'", escaped_uid);
+ g_free(escaped_uid);
+
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 1, "Unable to delete hash! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+}
+
+char **osync_db_get_deleted_hash(OSyncHashTable *table, const char *objtype)
+{
+ g_assert(table->dbhandle);
+ sqlite3 *sdb = table->dbhandle->db;
+
+ char **azResult = NULL;
+ int numrows = 0;
+ char *query = NULL;
+
+ if (osync_conv_objtype_is_any(objtype)) {
+ query = g_strdup_printf("SELECT uid, hash FROM tbl_hash");
+ } else {
+ query = g_strdup_printf("SELECT uid, hash FROM tbl_hash WHERE objtype='%s'", objtype);
+ }
+ sqlite3_get_table(sdb, query, &azResult, &numrows, NULL, NULL);
+ g_free(query);
+
+ char **ret = g_malloc0((numrows + 1) * sizeof(char *));
+
+ int i;
+ int ccell = 2;
+ int num = 0;
+ for (i = 0; i < numrows; i++) {
+ char *uid = azResult[ccell];
+ ccell += 2;
+
+ if (!g_hash_table_lookup(table->used_entries, uid)) {
+ ret[num] = g_strdup(uid);
+ num++;
+ }
+ }
+ sqlite3_free_table(azResult);
+ return ret;
+}
+
+void osync_db_get_hash(OSyncHashTable *table, const char *uid, const char *objtype, char **rethash)
+{
+ sqlite3 *sdb = table->dbhandle->db;
+ sqlite3_stmt *ppStmt = NULL;
+ char *escaped_uid = osync_db_sql_escape(uid);
+ char *escaped_objtype = osync_db_sql_escape(objtype);
+ char *query = g_strdup_printf("SELECT hash FROM tbl_hash WHERE uid='%s' AND objtype='%s'", escaped_uid, escaped_objtype);
+ g_free(escaped_uid);
+ g_free(escaped_objtype);
+
+ if (sqlite3_prepare(sdb, query, -1, &ppStmt, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 3, "Unable prepare get hash! %s", sqlite3_errmsg(sdb));
+ int ret = sqlite3_step(ppStmt);
+ if (ret != SQLITE_DONE && ret != SQLITE_ROW)
+ osync_debug("OSDB", 3, "Unable step get hash! %s", sqlite3_errmsg(sdb));
+ if (ret == SQLITE_DONE)
+ osync_debug("OSDB", 3, "No row found!");
+ *rethash = g_strdup((gchar*)sqlite3_column_text(ppStmt, 0));
+ sqlite3_finalize(ppStmt);
+ g_free(query);
+}
+
+void osync_db_reset_hash(OSyncHashTable *table, const char *objtype)
+{
+ sqlite3 *sdb = table->dbhandle->db;
+ char *query = NULL;
+ if (osync_conv_objtype_is_any(objtype)) {
+ query = g_strdup_printf("DELETE FROM tbl_hash");
+ } else {
+ query = g_strdup_printf("DELETE FROM tbl_hash WHERE objtype='%s'", objtype);
+ }
+ if (sqlite3_exec(sdb, query, NULL, NULL, NULL) != SQLITE_OK)
+ osync_debug("OSDB", 1, "Unable to reset hash! %s", sqlite3_errmsg(sdb));
+ g_free(query);
+}
+
+char *osync_db_sql_escape(const char *s)
+{
+ return osync_strreplace(s, "'", "''");
+}
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_db_bdb.h b/debian/opensync/opensync-0.22/opensync/opensync_db_bdb.h
new file mode 100644
index 00000000..511abf7c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_db_bdb.h
@@ -0,0 +1,16 @@
+DB *osync_db_open(char *filename, char *dbname, int type, DB_ENV *dbenv);
+osync_bool osync_db_put(DB *dbp, void *key, int keysize, void *data, int datasize);
+osync_bool osync_db_del(DB *dbp, void *key, int keysize);
+void osync_db_close(DB *dbp);
+DBC *osync_db_cursor_new(DB *dbp);
+osync_bool osync_db_cursor_next(DBC *dbcp, void **key, void **data);
+osync_bool osync_db_get(DB *dbp, void *key, int keysize, void **target);
+void osync_db_cursor_close(DBC *dbcp);
+osync_bool osync_db_cursor_next_sec(DBC *dbcp, void **pkey, void **skey, void **data);
+DB *osync_db_open_secondary(DB *firstdb, char *filename, char *dbname, int (*callback)(DB *, const DBT *, const DBT *, DBT *), DB_ENV *dbenv);
+//u_long osync_db_create_unique_id(DB *dbp);
+void osync_db_sync(DB *dbp);
+osync_bool osync_db_put_dbt(DB *dbp, DBT *key, DBT *data);
+DB_ENV *osync_db_setup(char *configdir, FILE *errfp);
+void osync_db_empty(DB *db);
+void osync_db_tear_down(DB_ENV *dbenv);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_db_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_db_internals.h
new file mode 100644
index 00000000..0cf52684
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_db_internals.h
@@ -0,0 +1,38 @@
+#include <sqlite3.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct OSyncDB {
+ sqlite3 *db;
+};
+#endif
+
+OSyncDB *osync_db_open(char *filename, OSyncError **error);
+void osync_db_close(OSyncDB *db);
+int osync_db_count(OSyncDB *db, char *table);
+
+osync_bool osync_db_open_changes(OSyncGroup *group, OSyncChange ***changes, OSyncError **error);
+osync_bool osync_db_save_change(OSyncChange *change, osync_bool save_format, OSyncError **error);
+osync_bool osync_db_delete_change(OSyncChange *change, OSyncError **error);
+osync_bool osync_db_reset_changes(OSyncGroup *group, const char *objtype, OSyncError **error);
+void osync_db_close_changes(OSyncGroup *group);
+
+OSyncDB *osync_db_open_anchor(OSyncMember *member, OSyncError **error);
+void osync_db_close_anchor(OSyncDB *db);
+void osync_db_get_anchor(OSyncDB *sdb, const char *objtype, char **retanchor);
+void osync_db_put_anchor(OSyncDB *sdb, const char *objtype, const char *anchor);
+
+osync_bool osync_db_open_hashtable(OSyncHashTable *table, OSyncMember *member, OSyncError **error);
+void osync_db_close_hashtable(OSyncHashTable *table);
+void osync_db_save_hash(OSyncHashTable *table, const char *uid, const char *hash, const char *objtype);
+void osync_db_delete_hash(OSyncHashTable *table, const char *uid);
+void osync_db_get_hash(OSyncHashTable *table, const char *uid, const char *objtype, char **rethash);
+char *osync_db_sql_escape(const char *s);
+void osync_db_reset_hash(OSyncHashTable *table, const char *objtype);
+char **osync_db_get_deleted_hash(OSyncHashTable *table, const char *objtype);
+
+osync_bool osync_db_reset_member(OSyncMember *member, OSyncError **error);
+osync_bool osync_db_reset_group(OSyncGroup *group, OSyncError **error);
+
+osync_bool osync_db_open_changelog(OSyncGroup *group, char ***uids, char ***objtype, long long int **memberids, int **changetypes, OSyncError **error);
+osync_bool osync_db_save_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error);
+osync_bool osync_db_remove_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_debug.c b/debian/opensync/opensync-0.22/opensync/opensync_debug.c
new file mode 100644
index 00000000..7bd89b7f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_debug.c
@@ -0,0 +1,261 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+#include <pthread.h>
+GPrivate* current_tabs = NULL;
+/**
+ * @defgroup OSyncDebugAPI OpenSync Debug
+ * @ingroup OSyncPublic
+ * @brief Debug functions used by opensync
+ *
+ */
+/*@{*/
+
+/** This function will reset the indentation of the trace function. use this
+ * after you forked your process. the new process should call this function */
+void osync_trace_reset_indent(void)
+{
+ g_private_set(current_tabs, GINT_TO_POINTER(0));
+}
+
+
+/*! @brief Used for tracing the application
+ *
+ * use this function to trace calls. The call graph will be saved into
+ * the file that is given in the OSYNC_TRACE environment variable
+ *
+ * @param type The type of the trace
+ * @param message The message to save
+ *
+ */
+
+void osync_trace(OSyncTraceType type, const char *message, ...)
+{
+#if defined ENABLE_TRACE
+
+ va_list arglist;
+ char *buffer = NULL;
+
+ const char *trace = g_getenv("OSYNC_TRACE");
+ const char *sensitive = g_getenv("OSYNC_PRIVACY");
+
+
+ if (!trace)
+ return;
+
+ if (!g_file_test(trace, G_FILE_TEST_IS_DIR)) {
+ printf("OSYNC_TRACE argument is no directory\n");
+ return;
+ }
+
+ if (!g_thread_supported ()) g_thread_init (NULL);
+ int tabs = 0;
+
+ if (!current_tabs)
+ current_tabs = g_private_new (NULL);
+ else
+ tabs = GPOINTER_TO_INT(g_private_get(current_tabs));
+
+ unsigned long int id = (unsigned long int)pthread_self();
+ pid_t pid = getpid();
+ char *logfile = g_strdup_printf("%s/Thread%lu-%i.log", trace, id, (int)pid);
+
+ va_start(arglist, message);
+ buffer = g_strdup_vprintf(message, arglist);
+
+ GString *tabstr = g_string_new("");
+ int i = 0;
+ for (i = 0; i < tabs; i++) {
+ tabstr = g_string_append(tabstr, "\t");
+ }
+
+ GTimeVal curtime;
+ g_get_current_time(&curtime);
+ char *logmessage = NULL;
+ switch (type) {
+ case TRACE_ENTRY:
+ logmessage = g_strdup_printf("[%li.%li]\t%s>>>>>>> %s\n", curtime.tv_sec, curtime.tv_usec, tabstr->str, buffer);
+ tabs++;
+ break;
+ case TRACE_INTERNAL:
+ logmessage = g_strdup_printf("[%li.%li]\t%s%s\n", curtime.tv_sec, curtime.tv_usec, tabstr->str, buffer);
+ break;
+ case TRACE_SENSITIVE:
+ if (!sensitive)
+ logmessage = g_strdup_printf("[%li.%li]\t%s[SENSITIVE] %s\n", curtime.tv_sec, curtime.tv_usec, tabstr->str, buffer);
+ else
+ logmessage = g_strdup_printf("[%li.%li]\t%s[SENSITIVE CONTENT HIDDEN]\n", curtime.tv_sec, curtime.tv_usec, tabstr->str);
+ break;
+ case TRACE_EXIT:
+ logmessage = g_strdup_printf("[%li.%li]%s<<<<<<< %s\n", curtime.tv_sec, curtime.tv_usec, tabstr->str, buffer);
+ tabs--;
+ if (tabs < 0)
+ tabs = 0;
+ break;
+ case TRACE_EXIT_ERROR:
+ logmessage = g_strdup_printf("[%li.%li]%s<--- ERROR --- %s\n", curtime.tv_sec, curtime.tv_usec, tabstr->str, buffer);
+ tabs--;
+ if (tabs < 0)
+ tabs = 0;
+ break;
+ case TRACE_ERROR:
+ logmessage = g_strdup_printf("[%li.%li]%sERROR: %s\n", curtime.tv_sec, curtime.tv_usec, tabstr->str, buffer);
+ break;
+ }
+ g_free(buffer);
+ g_private_set(current_tabs, GINT_TO_POINTER(tabs));
+ va_end(arglist);
+
+ g_string_free(tabstr, TRUE);
+
+ GError *error = NULL;
+ GIOChannel *chan = g_io_channel_new_file(logfile, "a", &error);
+ if (!chan) {
+ printf("unable to open %s for writing: %s\n", logfile, error->message);
+ return;
+ }
+
+ gsize writen;
+ g_io_channel_set_encoding(chan, NULL, NULL);
+ if (g_io_channel_write_chars(chan, logmessage, strlen(logmessage), &writen, NULL) != G_IO_STATUS_NORMAL) {
+ printf("unable to write trace to %s\n", logfile);
+ } else
+ g_io_channel_flush(chan, NULL);
+
+ g_io_channel_shutdown(chan, TRUE, NULL);
+ g_io_channel_unref(chan);
+ g_free(logmessage);
+ g_free(logfile);
+
+#endif
+}
+
+/*! @brief Used for debugging
+ *
+ * Used for debugging. Severity ranges from 0=Error to 4=Full Debug
+ *
+ * @param subpart String to identify the subpart (and filter on it)
+ * @param level The severity of the message
+ * @param message The message to display
+ *
+ */
+void osync_debug(const char *subpart, int level, const char *message, ...)
+{
+#if defined ENABLE_DEBUG
+ osync_assert_msg(level <= 4 && level >= 0, "The debug level must be between 0 and 4.");
+ va_list arglist;
+ char buffer[1024];
+ memset(buffer, 0, sizeof(buffer));
+ int debug = -1;
+
+ va_start(arglist, message);
+ g_vsnprintf(buffer, 1024, message, arglist);
+
+ char *debugstr = NULL;
+ switch (level) {
+ case 0:
+ //Error
+ debugstr = g_strdup_printf("[%s] ERROR: %s", subpart, buffer);
+ break;
+ case 1:
+ // Warning
+ debugstr = g_strdup_printf("[%s] WARNING: %s", subpart, buffer);
+ break;
+ case 2:
+ //Information
+ debugstr = g_strdup_printf("[%s] INFORMATION: %s", subpart, buffer);
+ break;
+ case 3:
+ //debug
+ debugstr = g_strdup_printf("[%s] DEBUG: %s", subpart, buffer);
+ break;
+ case 4:
+ //fulldebug
+ debugstr = g_strdup_printf("[%s] FULL DEBUG: %s", subpart, buffer);
+ break;
+ }
+ g_assert(debugstr);
+ va_end(arglist);
+
+ osync_trace(TRACE_INTERNAL, debugstr);
+
+ const char *dbgstr = g_getenv("OSYNC_DEBUG");
+ if (dbgstr) {
+ debug = atoi(dbgstr);
+ if (debug >= level)
+ printf("%s\n", debugstr);
+ }
+
+ g_free(debugstr);
+#endif
+}
+
+/*! @brief Used for printing binary data
+ *
+ * Unprintable character will be printed in hex, printable are just printed
+ *
+ * @param data The data to print
+ * @param len The length to print
+ *
+ */
+char *osync_print_binary(const unsigned char *data, int len)
+{
+ int t;
+ GString *str = g_string_new("");
+ for (t = 0; t < len; t++) {
+ if (data[t] >= ' ' && data[t] <= 'z')
+ g_string_append_c(str, data[t]);
+ else
+ g_string_append_printf(str, " %02x ", data[t]);
+ }
+ return g_string_free(str, FALSE);
+}
+
+/*! @brief Creates a random string
+ *
+ * Creates a random string of given length or less
+ *
+ * @param maxlength The maximum length of the string
+ * @returns The random string
+ *
+ */
+char *osync_rand_str(int maxlength)
+{
+ char *randchars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIKLMNOPQRSTUVWXYZ1234567890";
+
+ int length;
+ char *retchar;
+ int i = 0;
+
+ length = g_random_int_range(1, maxlength + 1);
+ retchar = malloc(length * sizeof(char) + 1);
+ retchar[0] = 0;
+
+ for (i = 0; i < length; i++) {
+ retchar[i] = randchars[g_random_int_range(0, strlen(randchars))];
+ retchar[i + 1] = 0;
+ }
+
+ return retchar;
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_debug.h b/debian/opensync/opensync-0.22/opensync/opensync_debug.h
new file mode 100644
index 00000000..f977d9f4
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_debug.h
@@ -0,0 +1,26 @@
+#ifndef _OPENSYNC_DEBUG_H_
+#define _OPENSYNC_DEBUG_H_
+
+/*! @ingroup OSyncDebugAPI
+ * @brief The type of the trace */
+typedef enum {
+ /** Used when entering a function. This will indent the callgraph */
+ TRACE_ENTRY,
+ /** Used when exiting a function. This will unindent the callgraph */
+ TRACE_EXIT,
+ /** Used for traces inside a function. Does not indent. */
+ TRACE_INTERNAL,
+ /** Used for traces with sensitive content inside a function. Does not indent. */
+ TRACE_SENSITIVE,
+ /** Used when exiting a function with a error. This will unindent the callgraph */
+ TRACE_EXIT_ERROR,
+ TRACE_ERROR
+} OSyncTraceType;
+
+char *osync_rand_str(int maxlength);
+void osync_debug(const char *subpart, int level, const char *message, ...);
+char *osync_print_binary(const unsigned char *data, int len);
+void osync_trace_reset_indent(void);
+void osync_trace(OSyncTraceType type, const char *message, ...);
+
+#endif //_OPENSYNC_DEBUG_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_env.c b/debian/opensync/opensync-0.22/opensync/opensync_env.c
new file mode 100755
index 00000000..32e8b83a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_env.c
@@ -0,0 +1,952 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @defgroup PrivateAPI Private APIs
+ * @brief Available private APIs
+ *
+ */
+
+/**
+ * @defgroup OSyncPrivate OpenSync Private API
+ * @ingroup PrivateAPI
+ * @brief The private API of opensync
+ *
+ * This gives you an insight in the private API of opensync.
+ *
+ */
+
+/**
+ * @defgroup OSyncEnvPrivate OpenSync Environment Internals
+ * @ingroup OSyncPrivate
+ * @brief The internals of the opensync environment
+ *
+ */
+/*@{*/
+
+/* Get the value of a an OSyncEnv option
+ *
+ * Search order:
+ * - options set using osync_env_set_option()
+ * - OSYNC_* environment variables
+ */
+static const char *osync_env_query_option(OSyncEnv *env, const char *name)
+{
+ const char *value;
+ value = g_hash_table_lookup(env->options, name);
+ if (value)
+ return value;
+
+ gchar *env_name = g_strdup_printf("OSYNC_%s", name);
+ value = getenv(env_name);
+ g_free(env_name);
+
+ if (value)
+ return value;
+
+ return NULL;
+}
+
+static osync_bool osync_env_query_option_bool(OSyncEnv *env, const char *name)
+{
+ const char *get_value;
+ if (!(get_value = osync_env_query_option(env, name)))
+ return FALSE;
+ if (!strcmp(get_value, "TRUE"))
+ return TRUE;
+ return FALSE;
+}
+
+/** Export the list of loaded plugins through the OSYNC_LOADED_PLUGINS environment variable
+ *
+ */
+void osync_env_export_loaded_modules(OSyncEnv *env)
+{
+ int num_modules = g_list_length(env->modules);
+
+ /* build an array for g_strjoinv() */
+ gchar **path_array = g_malloc0(sizeof(gchar*)*(num_modules + 1));
+ int i;
+ for (i = 0; i < num_modules; i++) {
+ GModule *module = g_list_nth_data(env->modules, i);
+ const gchar *path = g_module_name(module);
+ /*XXX: casting to non-const, here. Ugly.
+ *
+ * We know the elements pointed by path_array won't
+ * be touched. But isn't g_strjoinv() supposed to get a
+ * 'const gchar **' instead of a 'gchar **'?
+ */
+ path_array[i] = (gchar*)path;
+ }
+
+ /* Build a ':'-separated list */
+ gchar *list_str = g_strjoinv(":", path_array);
+ setenv("OSYNC_FORMAT_LIST", list_str, 1);
+ g_free(list_str);
+}
+
+static void export_option_to_env(gpointer key, gpointer data, gpointer user_data)
+{
+ const char *name = (const char*)key;
+ const char *value = (const char*)data;
+ gchar *env_name = g_strdup_printf("OSYNC_%s", name);
+ setenv(env_name, value, 1);
+ g_free(env_name);
+}
+
+/** Export all options set through osync_env_set_option() to environment variables
+ *
+ */
+void osync_env_export_all_options(OSyncEnv *env)
+{
+ g_hash_table_foreach(env->options, export_option_to_env, NULL);
+}
+
+static void free_hash(char *key, char *value, void *data)
+{
+ g_free(key);
+ g_free(value);
+}
+
+/*! @brief Returns the next free number for a group in the environments configdir
+ *
+ * Returns the next free number for a group in the environments configdir
+ *
+ * @param env The osync environment
+ * @returns The next free number
+ *
+ */
+long long int _osync_env_create_group_id(OSyncEnv *env)
+{
+ char *filename = NULL;
+ long long int i = 0;
+ do {
+ i++;
+ if (filename)
+ g_free(filename);
+ filename = g_strdup_printf("%s/group%lli", env->groupsdir, i);
+ } while (g_file_test(filename, G_FILE_TEST_EXISTS));
+ g_free(filename);
+ return i;
+}
+
+/*@}*/
+
+/**
+ * @defgroup PublicAPI Public APIs
+ * @brief Available public APIs
+ *
+ */
+
+/**
+ * @defgroup OSyncPublic OpenSync Public API
+ * @ingroup PublicAPI
+ * @brief The public API of opensync
+ *
+ * This gives you an insight in the public API of opensync.
+ *
+ */
+
+/**
+ * @defgroup OSyncEnvAPI OpenSync Environment
+ * @ingroup OSyncPublic
+ * @brief The public API of the opensync environment
+ *
+ */
+/*@{*/
+
+
+/*! @brief This will create a new opensync environment
+ *
+ * The environment will hold all information about plugins, groups etc
+ *
+ * @returns A pointer to a newly allocated environment. NULL on error.
+ *
+ */
+OSyncEnv *osync_env_new(void)
+{
+ OSyncEnv *env = g_malloc0(sizeof(OSyncEnv));
+ env->is_initialized = FALSE;
+ env->options = g_hash_table_new(g_str_hash, g_str_equal);
+
+ //Set some defaults
+ osync_env_set_option(env, "LOAD_GROUPS", "TRUE");
+ osync_env_set_option(env, "LOAD_FORMATS", "TRUE");
+ osync_env_set_option(env, "LOAD_PLUGINS", "TRUE");
+
+ return env;
+}
+
+/*! @brief Frees a osync environment
+ *
+ * Frees a osync environment and all resources.
+ *
+ * @param env Pointer to the environment to free
+ *
+ */
+void osync_env_free(OSyncEnv *env)
+{
+ g_assert(env);
+ g_hash_table_foreach(env->options, (GHFunc)free_hash, NULL);
+ g_hash_table_destroy(env->options);
+ g_free(env);
+}
+
+/*! @brief Sets a options on the environment
+ *
+ * @param env Pointer to the environment
+ * @param name Name of the option to set
+ * @param value Value to set
+ *
+ */
+void osync_env_set_option(OSyncEnv *env, const char *name, const char *value)
+{
+ if (value)
+ g_hash_table_insert(env->options, g_strdup(name), g_strdup(value));
+ else
+ g_hash_table_remove(env->options, name);
+}
+
+/*! @brief Initializes the environment (loads plugins)
+ *
+ * This will load all available plugins from disk. You can configure the location to look
+ * for plugins before calling this function
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param error Pointer to a error struct to return a error
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_env_initialize(OSyncEnv *env, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_env_initialize(%p, %p)", env, error);
+ g_assert(env);
+
+ if (env->is_initialized) {
+ osync_error_set(error, OSYNC_ERROR_INITIALIZATION, "Cannot initialize the same environment twice");
+ osync_trace(TRACE_EXIT_ERROR, "osync_env_initialize: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ //Load the normal plugins
+ if (osync_env_query_option_bool(env, "LOAD_PLUGINS")) {
+ if (!osync_env_load_plugins(env, osync_env_query_option(env, "PLUGINS_DIRECTORY"), error)) {
+ osync_trace(TRACE_EXIT_ERROR, "osync_env_initialize: %s", osync_error_print(error));
+ return FALSE;
+ }
+ }
+
+ //Load the format plugins
+ if (osync_env_query_option_bool(env, "LOAD_FORMATS")) {
+ if (!osync_env_load_formats(env, osync_env_query_option(env, "FORMATS_DIRECTORY"), error)) {
+ osync_trace(TRACE_EXIT_ERROR, "osync_env_initialize: %s", osync_error_print(error));
+ return FALSE;
+ }
+ }
+
+ //Load groups
+ if (osync_env_query_option_bool(env, "LOAD_GROUPS")) {
+ if (!osync_env_load_groups(env, osync_env_query_option(env, "GROUPS_DIRECTORY"), error)) {
+ osync_trace(TRACE_EXIT_ERROR, "osync_env_initialize: %s", osync_error_print(error));
+ return FALSE;
+ }
+ }
+
+ env->is_initialized = TRUE;
+ osync_trace(TRACE_EXIT, "osync_env_initialize");
+ return TRUE;
+}
+
+/*! @brief Finalizes the environment
+ *
+ * This will finalize the environment and unload and free all loaded plugins
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param error Pointer to a error struct to return a error
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_env_finalize(OSyncEnv *env, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_env_finalize(%p, %p)", env, error);
+ g_assert(env);
+
+ if (!env->is_initialized) {
+ osync_error_set(error, OSYNC_ERROR_INITIALIZATION, "Environment has to be initialized before");
+ return FALSE;
+ }
+
+ while (osync_env_nth_group(env, 0))
+ osync_group_free(osync_env_nth_group(env, 0));
+
+ GList *plugins = g_list_copy(env->plugins);
+ GList *p;
+ for (p = plugins; p; p = p->next) {
+ OSyncPlugin *plugin = p->data;
+ osync_plugin_free(plugin);
+ }
+ g_list_free(plugins);
+
+ //Unload all loaded modules
+ GList *modules = g_list_copy(env->modules);
+ for (p = modules; p; p = p->next) {
+ GModule *module = p->data;
+ osync_module_unload(env, module);
+ }
+ g_list_free(modules);
+
+ osync_trace(TRACE_EXIT, "osync_env_finalize");
+ return TRUE;
+}
+
+/*! @brief Loads all format and conversion plugins
+ *
+ * This command will load all plugins for the conversion system.
+ * If you dont change the path before it will load the plugins
+ * from the default location
+ *
+ * @param env The format environment
+ * @param path The path to load from or NULL if to load from default path
+ * @param error The location to return a error to
+ * @returns TRUE if successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_env_load_formats(OSyncEnv *env, const char *path, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, env, path, error);
+ osync_bool must_exist = TRUE;
+
+ if (!path) {
+ path = OPENSYNC_FORMATSDIR;
+ must_exist = FALSE;
+ }
+
+ if (!osync_module_load_dir(env, path, must_exist, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/*! @brief Loads the sync modules from a given directory
+ *
+ * Loads all sync modules from a directory into a osync environment
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param path The path where to look for plugins
+ * @param error Pointer to a error struct to return a error
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_env_load_plugins(OSyncEnv *env, const char *path, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, env, path, error);
+ osync_bool must_exist = TRUE;
+
+ if (!path) {
+ path = OPENSYNC_PLUGINDIR;
+ must_exist = FALSE;
+ }
+
+ if (!osync_module_load_dir(env, path, must_exist, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/*! @brief Finds the plugin with the given name
+ *
+ * Finds the plugin with the given name
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param name The name to search for
+ * @returns The plugin or NULL if not found
+ *
+ */
+OSyncPlugin *osync_env_find_plugin(OSyncEnv *env, const char *name)
+{
+ g_assert(env);
+ OSyncPlugin *plugin;
+ int i;
+ for (i = 0; i < osync_env_num_plugins(env); i++) {
+ plugin = osync_env_nth_plugin(env, i);
+ if (g_ascii_strcasecmp(plugin->info.name, name) == 0) {
+ return plugin;
+ }
+ }
+ return NULL;
+}
+
+/*! @brief Returns the number of loaded plugins
+ *
+ * Returns the number of loaded plugins. 0 if used before initialization
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @returns Number of plugins
+ *
+ */
+int osync_env_num_plugins(OSyncEnv *env)
+{
+ return g_list_length(env->plugins);
+}
+
+/*! @brief Returns pointer to nth plugin
+ *
+ * Returns pointer to nth plugin
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param nth Which plugin to return
+ * @returns Pointer to plugin
+ *
+ */
+OSyncPlugin *osync_env_nth_plugin(OSyncEnv *env, int nth)
+{
+ return (OSyncPlugin *)g_list_nth_data(env->plugins, nth);
+}
+
+/*! @brief Checks if a plugin is available and usable
+ *
+ * @param env The environment in which the plugin should be loaded
+ * @param pluginname The name of the plugin to check for
+ * @param error If the return was FALSE, will contain the information why the plugin is not available
+ * @returns TRUE if plugin was found and is usable, FALSE otherwise
+ *
+ */
+osync_bool osync_env_plugin_is_usable(OSyncEnv *env, const char *pluginname, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, env, pluginname, error);
+
+ OSyncPlugin *plugin = osync_env_find_plugin(env, pluginname);
+ if (!plugin) {
+ osync_error_set(error, OSYNC_ERROR_PLUGIN_NOT_FOUND, "Unable to find plugin \"%s\". This can be caused by unresolved symbols", pluginname);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (plugin->info.functions.is_available) {
+ osync_bool ret = plugin->info.functions.is_available(error);
+ osync_trace(ret ? TRACE_EXIT : TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return ret;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: TRUE: No is_available function", __func__);
+ return TRUE;
+}
+
+/*! @brief Loads the plugins from a given directory
+ *
+ * Loads all plugins from a directory into a osync environment.
+ * The directory must exist prior to opening.
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param path The path where to look for groups
+ * @param error Pointer to a error struct to return a error
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_env_load_groups(OSyncEnv *env, const char *p, OSyncError **error)
+{
+ GDir *dir;
+ GError *gerror = NULL;
+ char *filename = NULL;
+ char *real_path = NULL;
+ char *path = g_strdup(p);
+
+ if (!path) {
+ OSyncUserInfo *user = osync_user_new(error);
+ if (!user)
+ return FALSE;
+ path = g_strdup(osync_user_get_confdir(user));
+
+ if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
+ if (mkdir(path, 0700) == -1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to create group directory at %s: %s", path, strerror(errno));
+ g_free(path);
+ return FALSE;
+ }
+ char *enginepath = g_strdup_printf("%s/engines", path);
+ if (mkdir(enginepath, 0700) == -1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to create engine group directory at %s: %s", enginepath, strerror(errno));
+ g_free(path);
+ g_free(enginepath);
+ return FALSE;
+ }
+ g_free(enginepath);
+ osync_debug("OSGRP", 3, "Created groups configdir %s\n", path);
+ }
+ osync_user_free(user);
+ }
+
+ if (!g_path_is_absolute(path)) {
+ real_path = g_strdup_printf("%s/%s", g_get_current_dir(), path);
+ } else {
+ real_path = g_strdup(path);
+ }
+
+ if (!g_file_test(real_path, G_FILE_TEST_IS_DIR)) {
+ osync_debug("OSGRP", 0, "%s exists, but is no dir", real_path);
+ osync_error_set(error, OSYNC_ERROR_INITIALIZATION, "%s exists, but is no dir", real_path);
+ g_free(real_path);
+ g_free(path);
+ return FALSE;
+ }
+
+ dir = g_dir_open(real_path, 0, &gerror);
+ if (!dir) {
+ osync_debug("OSGRP", 0, "Unable to open main configdir %s: %s", real_path, gerror->message);
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to open main configdir %s: %s", real_path, gerror->message);
+ g_error_free (gerror);
+ g_free(real_path);
+ g_free(path);
+ return FALSE;
+ }
+
+ const gchar *de = NULL;
+ while ((de = g_dir_read_name(dir))) {
+ filename = g_strdup_printf ("%s/%s", real_path, de);
+
+ if (!g_file_test(filename, G_FILE_TEST_IS_DIR) || g_file_test(filename, G_FILE_TEST_IS_SYMLINK) || !g_pattern_match_simple("group*", de)) {
+ g_free(filename);
+ continue;
+ }
+
+ /* Try to open the confdir*/
+ OSyncError *error = NULL;
+ if (!osync_group_load(env, filename, &error)) {
+ osync_debug("OSGRP", 0, "Unable to load group from %s: %s", filename, error->message);
+ osync_error_free(&error);
+ }
+
+ g_free(filename);
+ }
+ g_free(real_path);
+ g_dir_close(dir);
+
+ env->groupsdir = path;
+ return TRUE;
+}
+
+/*! @brief Finds the group with the given name
+ *
+ * Finds the group with the given name
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param name Name of the group to search
+ * @returns Pointer to group. NULL if not found
+ *
+ */
+OSyncGroup *osync_env_find_group(OSyncEnv *env, const char *name)
+{
+ OSyncGroup *group;
+ int i;
+ for (i = 0; i < osync_env_num_groups(env); i++) {
+ group = osync_env_nth_group(env, i);
+ if (g_ascii_strcasecmp(group->name, name) == 0) {
+ return group;
+ }
+ }
+ osync_debug("OSPLG", 0, "Couldnt find the group with the name %s", name);
+ return NULL;
+}
+
+/*! @brief Adds the given group to the environment
+ *
+ * Adds the given group to the environment
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param group The group to add
+ *
+ */
+void osync_env_append_group(OSyncEnv *env, OSyncGroup *group)
+{
+ env->groups = g_list_append(env->groups, group);
+}
+
+/*! @brief Removes the given group from the enviroment
+ *
+ * Removes the given group from the environment
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param group The group to add
+ *
+ */
+void osync_env_remove_group(OSyncEnv *env, OSyncGroup *group)
+{
+ env->groups = g_list_remove(env->groups, group);
+}
+
+/*! @brief Counts the groups in the environment
+ *
+ * Returns the number of groups
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @returns Number of groups
+ *
+ */
+int osync_env_num_groups(OSyncEnv *env)
+{
+ return g_list_length(env->groups);
+}
+
+/*! @brief Returns the nth group
+ *
+ * Returns the nth groups from the environment
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param nth Which group to return
+ * @returns Pointer to the group
+ *
+ */
+OSyncGroup *osync_env_nth_group(OSyncEnv *env, int nth)
+{
+ return (OSyncGroup *)g_list_nth_data(env->groups, nth);;
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSyncEnvAPIMisc OpenSync Misc
+ * @ingroup OSyncPublic
+ * @brief Some helper functions
+ *
+ */
+/*@{*/
+
+/*! @brief Opens a xml document
+ *
+ * Opens a xml document
+ *
+ * @param doc Pointer to a xmldoc
+ * @param cur The pointer to the first node
+ * @param path The path of the document
+ * @param topentry the name of the top node
+ * @param error Pointer to a error struct
+ * @returns TRUE if successfull, FALSE otherwise
+ *
+ */
+osync_bool _osync_open_xml_file(xmlDocPtr *doc, xmlNodePtr *cur, const char *path, const char *topentry, OSyncError **error)
+{
+ if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
+ osync_debug("OSXML", 1, "File %s does not exist", path);
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "File %s does not exist", path);
+ return FALSE;
+ }
+
+ *doc = xmlParseFile(path);
+
+ if (!*doc) {
+ osync_debug("OSXML", 1, "Could not open: %s", path);
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Could not open: %s", path);
+ return FALSE;
+ }
+
+ *cur = xmlDocGetRootElement(*doc);
+
+ if (!*cur) {
+ osync_debug("OSXML", 0, "%s seems to be empty", path);
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "%s seems to be empty", path);
+ xmlFreeDoc(*doc);
+ return FALSE;
+ }
+
+ if (xmlStrcmp((*cur)->name, (const xmlChar *) topentry)) {
+ osync_debug("OSXML", 0, "%s seems not to be a valid configfile.\n", path);
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "%s seems not to be a valid configfile.\n", path);
+ xmlFreeDoc(*doc);
+ return FALSE;
+ }
+
+ *cur = (*cur)->xmlChildrenNode;
+ return TRUE;
+}
+
+/*! @brief Writes data to a file
+ *
+ * Writes data to a file
+ *
+ * @param filename Where to save the data
+ * @param data Pointer to the data
+ * @param size Size of the data
+ * @param mode The mode to set on the file
+ * @param oserror Pointer to a error struct
+ * @returns TRUE if successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_file_write(const char *filename, const char *data, int size, int mode, OSyncError **oserror)
+{
+ osync_bool ret = FALSE;
+ GError *error = NULL;
+ GIOChannel *chan = g_io_channel_new_file(filename, "w", &error);
+ if (!chan) {
+ osync_debug("OSYNC", 3, "Unable to open file %s for writing: %s", filename, error->message);
+ osync_error_set(oserror, OSYNC_ERROR_IO_ERROR, "Unable to open file %s for writing: %s", filename, error->message);
+ return FALSE;
+ }
+ if (mode) {
+ int fd = g_io_channel_unix_get_fd(chan);
+ if (fchmod(fd, mode)) {
+ osync_debug("OSYNC", 3, "Unable to set file permissions %i for file %s", mode, filename);
+ osync_error_set(oserror, OSYNC_ERROR_IO_ERROR, "Unable to set file permissions %i for file %s", mode, filename);
+ return FALSE;
+ }
+ }
+ gsize writen;
+ g_io_channel_set_encoding(chan, NULL, NULL);
+ if (g_io_channel_write_chars(chan, data, size, &writen, &error) != G_IO_STATUS_NORMAL) {
+ osync_debug("OSYNC", 3, "Unable to write contents of file %s: %s", filename, error->message);
+ osync_error_set(oserror, OSYNC_ERROR_IO_ERROR, "Unable to write contents of file %s: %s", filename, error->message);
+ } else {
+ g_io_channel_flush(chan, NULL);
+ ret = TRUE;
+ }
+ g_io_channel_shutdown(chan, FALSE, NULL);
+ g_io_channel_unref(chan);
+ return ret;
+}
+
+/*! @brief Reads a file
+ *
+ * Reads a file
+ *
+ * @param filename Where to read the data from
+ * @param data Pointer to the data
+ * @param size Size of the data
+ * @param oserror Pointer to a error struct
+ * @returns TRUE if successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_file_read(const char *filename, char **data, int *size, OSyncError **oserror)
+{
+ osync_bool ret = FALSE;
+ GError *error = NULL;
+ gsize sz = 0;
+
+ if (!filename) {
+ osync_debug("OSYNC", 3, "No file open specified");
+ osync_error_set(oserror, OSYNC_ERROR_IO_ERROR, "No file to open specified");
+ return FALSE;
+ }
+ GIOChannel *chan = g_io_channel_new_file(filename, "r", &error);
+ if (!chan) {
+ osync_debug("OSYNC", 3, "Unable to read file %s: %s", filename, error->message);
+ osync_error_set(oserror, OSYNC_ERROR_IO_ERROR, "Unable to open file %s for reading: %s", filename, error->message);
+ return FALSE;
+ }
+ g_io_channel_set_encoding(chan, NULL, NULL);
+ if (g_io_channel_read_to_end(chan, data, &sz, &error) != G_IO_STATUS_NORMAL) {
+ osync_debug("OSYNC", 3, "Unable to read contents of file %s: %s", filename, error->message);
+ osync_error_set(oserror, OSYNC_ERROR_IO_ERROR, "Unable to read contents of file %s: %s", filename, error->message);
+ } else {
+ ret = TRUE;
+ *size = (int)sz;
+ }
+ g_io_channel_shutdown(chan, FALSE, NULL);
+ g_io_channel_unref(chan);
+ return ret;
+}
+
+/*! @brief Returns the version of opensync
+ *
+ * Returns a string identifying the major and minor version
+ * of opensync (something like "0.11")
+ *
+ * @returns String with version
+ *
+ */
+const char *osync_get_version(void)
+{
+ return VERSION;
+}
+
+/*! @brief Safely tries to malloc memory
+ *
+ * Tries to malloc memory but returns an error in an OOM situation instead
+ * of aborting
+ *
+ * @param size The size in bytes to malloc
+ * @param error The error which will hold the info in case of an error
+ * @returns A pointer to the new memory or NULL in case of error
+ *
+ */
+void *osync_try_malloc0(unsigned int size, OSyncError **error)
+{
+ void *result = g_try_malloc(size);
+ if (!result) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "No memory left");
+ return NULL;
+ }
+ memset(result, 0, size);
+ return result;
+}
+
+char *osync_strreplace(const char *input, const char *delimiter, const char *replacement)
+{
+ osync_return_val_if_fail(input != NULL, NULL);
+ osync_return_val_if_fail(delimiter != NULL, NULL);
+ osync_return_val_if_fail(replacement != NULL, NULL);
+
+ gchar **array = g_strsplit(input, delimiter, 0);
+ gchar *ret = g_strjoinv(replacement, array);
+ g_strfreev(array);
+
+ return ret;
+}
+
+/*@}*/
+
+OSyncThread *osync_thread_new(GMainContext *context, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, context, error);
+
+ OSyncThread *thread = osync_try_malloc0(sizeof(OSyncThread), error);
+ if (!thread)
+ goto error;
+
+ if (!g_thread_supported ()) g_thread_init (NULL);
+
+ thread->started_mutex = g_mutex_new();
+ thread->started = g_cond_new();
+ thread->context = context;
+ if (thread->context)
+ g_main_context_ref(thread->context);
+ thread->loop = g_main_loop_new(thread->context, FALSE);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, thread);
+ return thread;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+}
+
+void osync_thread_free(OSyncThread *thread)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, thread);
+ osync_assert(thread);
+
+ if (thread->started_mutex)
+ g_mutex_free(thread->started_mutex);
+
+ if (thread->started)
+ g_cond_free(thread->started);
+
+ if (thread->loop)
+ g_main_loop_unref(thread->loop);
+
+ if (thread->context)
+ g_main_context_unref(thread->context);
+
+ g_free(thread);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*static gpointer osyncThreadStartCallback(gpointer data)
+{
+ OSyncThread *thread = data;
+
+ g_mutex_lock(thread->started_mutex);
+ g_cond_signal(thread->started);
+ g_mutex_unlock(thread->started_mutex);
+
+ g_main_loop_run(thread->loop);
+
+ return NULL;
+}*/
+
+static gboolean osyncThreadStopCallback(gpointer data)
+{
+ OSyncThread *thread = data;
+
+ g_main_loop_quit(thread->loop);
+
+ return FALSE;
+}
+
+/*void osync_thread_start(OSyncThread *thread)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, thread);
+ osync_assert(thread);
+
+ //Start the thread
+ g_mutex_lock(thread->started_mutex);
+ thread->thread = g_thread_create (osyncThreadStartCallback, thread, TRUE, NULL);
+ g_cond_wait(thread->started, thread->started_mutex);
+ g_mutex_unlock(thread->started_mutex);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}*/
+
+static gboolean osyncThreadStartCallback(gpointer data)
+{
+ OSyncThread *thread = data;
+
+ g_mutex_lock(thread->started_mutex);
+ g_cond_signal(thread->started);
+ g_mutex_unlock(thread->started_mutex);
+ return FALSE;
+}
+
+void osync_thread_start(OSyncThread *thread)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, thread);
+
+ g_mutex_lock(thread->started_mutex);
+ GSource *idle = g_idle_source_new();
+ g_source_set_callback(idle, osyncThreadStartCallback, thread, NULL);
+ g_source_attach(idle, thread->context);
+ thread->thread = g_thread_create ((GThreadFunc)g_main_loop_run, thread->loop, TRUE, NULL);
+ g_cond_wait(thread->started, thread->started_mutex);
+ g_mutex_unlock(thread->started_mutex);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_thread_stop(OSyncThread *thread)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, thread);
+ osync_assert(thread);
+
+ GSource *source = g_idle_source_new();
+ g_source_set_callback(source, osyncThreadStopCallback, thread, NULL);
+ g_source_attach(source, thread->context);
+
+ g_thread_join(thread->thread);
+ thread->thread = NULL;
+
+ g_source_unref(source);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+osync_bool osync_pattern_match(const char *pattern, const char *data, int size)
+{
+ GPatternSpec *spec = g_pattern_spec_new(pattern);
+ osync_bool result = g_pattern_match(spec, size, data, NULL);
+ g_pattern_spec_free(spec);
+ return result;
+}
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_env.h b/debian/opensync/opensync-0.22/opensync/opensync_env.h
new file mode 100644
index 00000000..f3bb9957
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_env.h
@@ -0,0 +1,31 @@
+
+void osync_env_free(OSyncEnv *env);
+OSyncEnv *osync_env_new(void);
+osync_bool osync_env_initialize(OSyncEnv *env, OSyncError **error);
+osync_bool osync_env_finalize(OSyncEnv *env, OSyncError **error);
+void osync_env_set_option(OSyncEnv *env, const char *name, const char *value);
+
+int osync_env_num_plugins (OSyncEnv *osstruct);
+OSyncPlugin *osync_env_nth_plugin(OSyncEnv *osstruct, int nth);
+OSyncPlugin *osync_env_find_plugin(OSyncEnv *env, const char *name);
+osync_bool osync_env_plugin_is_usable(OSyncEnv *env, const char *pluginname, OSyncError **error);
+
+void osync_env_remove_group(OSyncEnv *osstruct, OSyncGroup *group);
+OSyncGroup *osync_env_find_group(OSyncEnv *env, const char *name);
+int osync_env_num_groups(OSyncEnv *env);
+void osync_env_append_group(OSyncEnv *os_env, OSyncGroup *group);
+OSyncGroup *osync_env_nth_group(OSyncEnv *osinfo, int nth);
+
+osync_bool osync_env_load_groups(OSyncEnv *osyncinfo, const char *path, OSyncError **error);
+osync_bool osync_env_load_formats(OSyncEnv *env, const char *path, OSyncError **oserror);
+osync_bool osync_env_load_plugins(OSyncEnv *env, const char *path, OSyncError **oserror);
+
+osync_bool osync_file_write(const char *filename, const char *data, int size, int mode, OSyncError **error);
+osync_bool osync_file_read(const char *filename, char **data, int *size, OSyncError **error);
+const char *osync_get_version(void);
+void *osync_try_malloc0(unsigned int size, OSyncError **error);
+char *osync_strreplace(const char *input, const char *delimiter, const char *replacement);
+
+void osync_env_export_all_options(OSyncEnv *env);
+void osync_env_export_loaded_modules(OSyncEnv *env);
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_env_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_env_internals.h
new file mode 100644
index 00000000..20e0d73e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_env_internals.h
@@ -0,0 +1,26 @@
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct OSyncEnv {
+ GList *groups;
+ osync_bool is_initialized;
+ GHashTable *options;
+
+ char *groupsdir;
+
+ GList *plugins; //The registered plugins
+ GList *formatplugins; //The registered formats
+ GList *modules; //The loaded modules
+
+ GList *format_templates;
+ GList *converter_templates;
+ GList *objtype_templates;
+ GList *data_detectors;
+ GList *filter_functions;
+ GList *extension_templates;
+
+ GModule *current_module;
+};
+#endif
+
+osync_bool _osync_open_xml_file(xmlDocPtr *doc, xmlNodePtr *cur, const char *path, const char *topentry, OSyncError **error);
+long long int _osync_env_create_group_id(OSyncEnv *env);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_error.c b/debian/opensync/opensync-0.22/opensync/opensync_error.c
new file mode 100644
index 00000000..61e397d1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_error.c
@@ -0,0 +1,261 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @defgroup OSyncErrorPrivateAPI OpenSync Error Internals
+ * @ingroup OSyncPrivate
+ * @brief The public API of opensync
+ *
+ * This gives you an insight in the public API of opensync.
+ *
+ */
+/*@{*/
+
+/*! @brief Translate a error type into something human readable
+ *
+ * @param type The error type to look up
+ * @returns The name of the error type
+ *
+ */
+static const char *osync_error_name_from_type(OSyncErrorType type)
+{
+ switch (type) {
+ case OSYNC_NO_ERROR:
+ return "NoError";
+ case OSYNC_ERROR_GENERIC:
+ return "UnknownError";
+ case OSYNC_ERROR_IO_ERROR:
+ return "IOError";
+ case OSYNC_ERROR_NOT_SUPPORTED:
+ return "NotSupported";
+ case OSYNC_ERROR_TIMEOUT:
+ return "Timeout";
+ case OSYNC_ERROR_DISCONNECTED:
+ return "Disconnected";
+ case OSYNC_ERROR_FILE_NOT_FOUND:
+ return "FileNotFound";
+ default:
+ return "UnspecifiedError";
+ }
+}
+
+/*! @brief Sets a error from a va_list
+ *
+ * @param error A pointer to a error struct
+ * @param type The type to set
+ * @param format The message
+ * @param args The arguments to the message
+ *
+ */
+void osync_error_set_vargs(OSyncError **error, OSyncErrorType type, const char *format, va_list args)
+{
+ if (!error || !format)
+ return;
+ if (osync_error_is_set(error))
+ osync_error_free(error);
+ osync_assert(osync_error_is_set(error) == FALSE);
+
+ char buffer[1024];
+ memset(buffer, 0, sizeof(buffer));
+ *error = g_malloc0(sizeof(OSyncError));
+ g_vsnprintf(buffer, 1024, format, args);
+
+ (*error)->message = g_strdup(buffer);
+ (*error)->type = type;
+ return;
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSyncErrorAPI OpenSync Errors
+ * @ingroup OSyncPublic
+ * @brief OpenSync's error reporting facilities
+ *
+ */
+/*@{*/
+
+
+/*! @brief This will return a string describing the type of the error
+ *
+ * @param error A pointer to a error struct
+ * @returns The description, NULL on error
+ *
+ */
+const char *osync_error_get_name(OSyncError **error)
+{
+ osync_return_val_if_fail(error != NULL, NULL);
+ if (!*error)
+ return osync_error_name_from_type(OSYNC_NO_ERROR);
+ return osync_error_name_from_type((*error)->type);
+}
+
+/*! @brief Frees the error so it can be reused
+ *
+ * @param error A pointer to a error struct to free
+ *
+ */
+void osync_error_free(OSyncError **error)
+{
+ osync_return_if_fail(error != NULL);
+ if (*error == NULL)
+ return;
+
+ if ((*error)->message)
+ g_free ((*error)->message);
+
+ g_free(*error);
+ *error = NULL;
+}
+
+/*! @brief Checks if the error is set
+ *
+ * @param error A pointer to a error struct to check
+ * @returns TRUE if the error is set, FALSE otherwise
+ *
+ */
+osync_bool osync_error_is_set (OSyncError **error)
+{
+ if (!error)
+ return FALSE;
+
+ if (*error == NULL)
+ return FALSE;
+
+ if ((*error)->type)
+ return TRUE;
+
+ return FALSE;
+}
+
+/*! @brief Returns the type of the error
+ *
+ * @param error The error
+ * @returns The type of the error or OSYNC_NO_ERROR if no error
+ *
+ */
+OSyncErrorType osync_error_get_type(OSyncError **error)
+{
+ if (!osync_error_is_set(error))
+ return OSYNC_NO_ERROR;
+ return (*error)->type;
+}
+
+/*! @brief Returns the message of the error
+ *
+ * @param error The error to print
+ * @returns The message of the error or NULL if no error
+ *
+ */
+const char *osync_error_print(OSyncError **error)
+{
+ if (!osync_error_is_set(error))
+ return NULL;
+ return (*error)->message;
+}
+
+/*! @brief Updates the error message
+ *
+ * You can use this function to update the error message on
+ * a error. You can use the old error->message as a parameter
+ * for this function.
+ *
+ * @param error A pointer to a error struct to update
+ * @param format The new message
+ *
+ */
+void osync_error_update(OSyncError **error, const char *format, ...)
+{
+ osync_return_if_fail(error != NULL);
+ osync_return_if_fail(*error != NULL);
+
+ va_list args;
+ va_start(args, format);
+
+ char buffer[1024];
+ memset(buffer, 0, sizeof(buffer));
+ g_vsnprintf(buffer, 1024, format, args);
+
+ g_free((*error)->message);
+ (*error)->message = g_strdup(buffer);
+
+ va_end (args);
+}
+
+/*! @brief Duplicates the error into the target
+ *
+ *
+ * @param target The target error to update
+ * @param source The source error which to duplicate
+ *
+ */
+void osync_error_duplicate(OSyncError **target, OSyncError **source)
+{
+ if (!target)
+ return;
+
+ osync_return_if_fail(osync_error_is_set(source));
+
+ if (!osync_error_is_set(source)) {
+ *target = NULL;
+ return;
+ }
+
+ *target = g_malloc0(sizeof(OSyncError));
+ (*target)->message = g_strdup((*source)->message);
+ (*target)->type = (*source)->type;
+}
+
+/*! @brief Sets the error
+ *
+ * You can use this function to set the error to the given type and message
+ *
+ * @param error A pointer to a error struct to set
+ * @param type The Error type to set
+ * @param format The message
+ *
+ */
+void osync_error_set(OSyncError **error, OSyncErrorType type, const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+ osync_error_set_vargs(error, type, format, args);
+ va_end (args);
+}
+
+/*! @brief Sets the type of an error
+ *
+ * @param error A pointer to a error struct to set
+ * @param type The Error type to set
+ *
+ */
+void osync_error_set_type(OSyncError **error, OSyncErrorType type)
+{
+ if (!error)
+ return;
+
+ (*error)->type = type;
+ return;
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_error.h b/debian/opensync/opensync-0.22/opensync/opensync_error.h
new file mode 100644
index 00000000..63c492e6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_error.h
@@ -0,0 +1,33 @@
+
+/*! @ingroup OSyncErrorAPI
+ * @brief Defines the possible error types
+ */
+typedef enum {
+ OSYNC_NO_ERROR = 0,
+ OSYNC_ERROR_GENERIC = 1,
+ OSYNC_ERROR_IO_ERROR = 2,
+ OSYNC_ERROR_NOT_SUPPORTED = 3,
+ OSYNC_ERROR_TIMEOUT = 4,
+ OSYNC_ERROR_DISCONNECTED = 5,
+ OSYNC_ERROR_FILE_NOT_FOUND = 6,
+ OSYNC_ERROR_EXISTS = 7,
+ OSYNC_ERROR_CONVERT = 8,
+ OSYNC_ERROR_MISCONFIGURATION = 9,
+ OSYNC_ERROR_INITIALIZATION = 10,
+ OSYNC_ERROR_PARAMETER = 11,
+ OSYNC_ERROR_EXPECTED = 12,
+ OSYNC_ERROR_NO_CONNECTION = 13,
+ OSYNC_ERROR_TEMPORARY = 14,
+ OSYNC_ERROR_LOCKED = 15,
+ OSYNC_ERROR_PLUGIN_NOT_FOUND = 16
+} OSyncErrorType;
+
+void osync_error_free(OSyncError **error);
+osync_bool osync_error_is_set (OSyncError **error);
+void osync_error_set(OSyncError **error, OSyncErrorType type, const char *format, ...);
+const char *osync_error_get_name(OSyncError **error);
+void osync_error_update(OSyncError **error, const char *format, ...);
+void osync_error_duplicate(OSyncError **target, OSyncError **source);
+const char *osync_error_print(OSyncError **error);
+OSyncErrorType osync_error_get_type(OSyncError **error);
+void osync_error_set_type(OSyncError **error, OSyncErrorType type);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_error_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_error_internals.h
new file mode 100644
index 00000000..eecdb5e5
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_error_internals.h
@@ -0,0 +1,11 @@
+
+/*! @brief Represent an error
+ */
+struct OSyncError {
+ /** The type of the error that occured */
+ OSyncErrorType type;
+ /** The message */
+ char *message;
+};
+
+void osync_error_set_vargs(OSyncError **error, OSyncErrorType type, const char *format, va_list args);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_filter.c b/debian/opensync/opensync-0.22/opensync/opensync_filter.c
new file mode 100644
index 00000000..080ea0c6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_filter.c
@@ -0,0 +1,328 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @defgroup OSyncFilterPrivate OpenSync Filter Internals
+ * @ingroup OSyncPrivate
+ * @brief Private api of the filter system
+ *
+ */
+/*@{*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+OSyncFilter *_osync_filter_add_ids(OSyncGroup *group, long long int sourcememberid, long long int destmemberid, const char *sourceobjtype, const char *destobjtype, const char *detectobjtype, OSyncFilterAction action, const char *function_name)
+{
+ OSyncFilter *filter = osync_filter_new();
+ filter->group = group;
+ filter->sourcememberid = sourcememberid;
+ filter->destmemberid = destmemberid;
+ filter->sourceobjtype = g_strdup(sourceobjtype);
+ filter->destobjtype = g_strdup(destobjtype);
+ filter->detectobjtype = g_strdup(detectobjtype);
+ filter->action = action;
+
+ if (function_name) {
+ osync_filter_update_hook(filter, group, function_name);
+ }
+
+ osync_filter_register(group, filter);
+ return filter;
+}
+
+void osync_filter_update_hook(OSyncFilter *filter, OSyncGroup *group, const char *function_name)
+{
+ g_assert(filter);
+ g_assert(group);
+ g_assert(function_name);
+
+ OSyncFilterFunction hook = NULL;
+ GList *f;
+ for (f = group->conv_env->filter_functions; f; f = f->next) {
+ OSyncCustomFilter *custom = f->data;
+ if (!strcmp(custom->name, function_name))
+ hook = custom->hook;
+ }
+ if (!hook) {
+ osync_trace(TRACE_ERROR, "Unable to add custom filter, hook not found!");
+ return;
+ }
+ filter->hook = hook;
+ filter->function_name = g_strdup(function_name);
+}
+
+
+GList *_osync_filter_find(OSyncMember *member)
+{
+ GList *f = NULL;
+ GList *ret = NULL;
+ for (f = member->group->filters; f; f = f->next) {
+ OSyncFilter *filter = f->data;
+ if (!filter->destmemberid || filter->destmemberid == member->id)
+ ret = g_list_append(ret, filter);
+ }
+ return ret;
+}
+
+OSyncFilterAction osync_filter_invoke(OSyncFilter *filter, OSyncChange *change, OSyncMember *destmember)
+{
+ g_assert(filter);
+ g_assert(change);
+ osync_debug("OSFLT", 3, "Starting to invoke filter for change %s", change->uid);
+ if (filter->sourcememberid && change->sourcemember && filter->sourcememberid != change->sourcemember->id)
+ return OSYNC_FILTER_IGNORE;
+ if (filter->destmemberid && filter->destmemberid != destmember->id)
+ return OSYNC_FILTER_IGNORE;
+ if (filter->sourceobjtype && strcmp(filter->sourceobjtype, change->sourceobjtype))
+ return OSYNC_FILTER_IGNORE;
+ if (filter->destobjtype && change->destobjtype && strcmp(filter->destobjtype, change->destobjtype))
+ return OSYNC_FILTER_IGNORE;
+ if (filter->detectobjtype) {
+ OSyncError *error = NULL;
+ OSyncObjType *objtype = osync_change_detect_objtype_full(osync_member_get_format_env(destmember), change, &error);
+ if (!objtype) {
+ osync_error_free(&error);
+ return OSYNC_FILTER_IGNORE;
+ }
+ if (strcmp(filter->detectobjtype, objtype->name))
+ return OSYNC_FILTER_IGNORE;
+ }
+
+ osync_debug("OSFLT", 3, "Change %s passed the filter!", change->uid);
+ //We passed the filter. Now we can return the action
+ if (!filter->hook)
+ return filter->action;
+
+ //What exactly do we need to pass to the hook?
+ return filter->hook(change, filter->config);
+}
+
+osync_bool osync_filter_change_allowed(OSyncMember *destmember, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "osync_filter_change_allowed(%p, %p)", destmember, change);
+ GList *filters = _osync_filter_find(destmember);
+ GList *f = NULL;
+ int ret = TRUE;
+ osync_debug("OSFLT", 3, "Checking if change %s is allowed for member %lli. Filters to invoke: %i", change->uid, destmember->id, g_list_length(filters));
+ for (f = filters; f; f = f->next) {
+ OSyncFilter *filter = f->data;
+ OSyncFilterAction action = osync_filter_invoke(filter, change, destmember);
+ if (action == OSYNC_FILTER_ALLOW)
+ ret = TRUE;
+ if (action == OSYNC_FILTER_DENY)
+ ret = FALSE;
+ }
+ g_list_free(filters);
+ osync_trace(TRACE_EXIT, "osync_filter_change_allowed: %s", ret ? "TRUE" : "FALSE");
+ return ret;
+}
+
+const char *osync_filter_get_sourceobjtype(OSyncFilter *filter)
+{
+ return filter->sourceobjtype;
+}
+
+const char *osync_filter_get_destobjtype(OSyncFilter *filter)
+{
+ return filter->destobjtype;
+}
+
+const char *osync_filter_get_detectobjtype(OSyncFilter *filter)
+{
+ return filter->detectobjtype;
+}
+
+OSyncFilterAction osync_filter_get_action(OSyncFilter *filter)
+{
+ return filter->action;
+}
+
+OSyncMember *osync_filter_get_sourcemember(OSyncFilter *filter)
+{
+ return osync_member_from_id(filter->group, filter->sourcememberid);
+}
+
+OSyncMember *osync_filter_get_destmember(OSyncFilter *filter)
+{
+ return osync_member_from_id(filter->group, filter->destmemberid);
+}
+#endif
+
+/*@}*/
+
+/**
+ * @defgroup OSyncFilterAPI OpenSync Filter
+ * @ingroup OSyncPublic
+ * @brief Allows filtering of changes and applying hooks to changes as they pass through opensync
+ *
+ */
+/*@{*/
+
+/** @brief Registers a filter with a group
+ *
+ * @param group The group in which to register the filter
+ * @param filter The filter to register
+ **/
+void osync_filter_register(OSyncGroup *group, OSyncFilter *filter)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, group, filter);
+ g_assert(group);
+ group->filters = g_list_append(group->filters, filter);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Creates a new filter
+ *
+ * @returns A newly allocated filter
+ **/
+OSyncFilter *osync_filter_new(void)
+{
+ osync_trace(TRACE_ENTRY, "%s(void)", __func__);
+ OSyncFilter *filter = g_malloc0(sizeof(OSyncFilter));
+ g_assert(filter);
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, filter);
+ return filter;
+}
+
+/** @brief Frees a filter
+ *
+ * @param filter The filter to free
+ **/
+void osync_filter_free(OSyncFilter *filter)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, filter);
+ g_assert(filter);
+ if (filter->sourceobjtype)
+ g_free(filter->sourceobjtype);
+ if (filter->destobjtype)
+ g_free(filter->destobjtype);
+ if (filter->detectobjtype)
+ g_free(filter->detectobjtype);
+
+ g_free(filter);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Register a new filter
+ *
+ * @param group For which group to register the filter
+ * @param sourcemember The member reporting the object. NULL for any
+ * @param destmember The member receiving the object. NULL for any
+ * @param sourceobjtype The objtype as reported by the member without detection. NULL for any
+ * @param destobjtype The objtype as about being saved by the member without detection. NULL for any
+ * @param detectobjtype The objtype as detected. NULL for ignore
+ * @param action Set this to the action the filter should return for the object
+ * @returns The new added Filter
+ */
+OSyncFilter *osync_filter_add(OSyncGroup *group, OSyncMember *sourcemember, OSyncMember *destmember, const char *sourceobjtype, const char *destobjtype, const char *detectobjtype, OSyncFilterAction action)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p:%lli, %p:%lli, %s, %s, %s, %i)", __func__, group, \
+ sourcemember, sourcemember ? sourcemember->id : 0, \
+ destmember, destmember ? destmember->id : 0, \
+ sourceobjtype, destobjtype, detectobjtype, action);
+
+ long long int sourcememberid = 0;
+ long long int destmemberid = 0;
+ if (sourcemember)
+ sourcememberid = sourcemember->id;
+ if (destmember)
+ destmemberid = destmember->id;
+
+ OSyncFilter *filter = _osync_filter_add_ids(group, sourcememberid, destmemberid, sourceobjtype, destobjtype, detectobjtype, action, NULL);
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, filter);
+ return filter;
+}
+
+/*! @brief Removes a filter from a group
+ *
+ * @param group The group to remove from
+ * @param filter The filter to remove
+ **/
+void osync_filter_remove(OSyncGroup *group, OSyncFilter *filter)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, group, filter);
+ g_assert(group);
+ group->filters = g_list_remove(group->filters, filter);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Register a new custom filter
+ *
+ * @param group The group that should store the filter
+ * @param sourcemember The member reporting the object. NULL for any
+ * @param destmember The member receiving the object. NULL for any
+ * @param sourceobjtype The objtype as reported by the member without detection. NULL for any
+ * @param destobjtype The object type has it is being added on the target. NULL for any
+ * @param detectobjtype The objtype as detected. NULL for any
+ * @param function_name The filter function to call to decide if to filter the object.
+ * @returns The new added Filter
+ *
+ */
+OSyncFilter *osync_filter_add_custom(OSyncGroup *group, OSyncMember *sourcemember, OSyncMember *destmember, const char *sourceobjtype, const char *destobjtype, const char *detectobjtype, const char *function_name)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p:%lli, %p:%lli, %s, %s, %s, %s)", __func__, group, \
+ sourcemember, sourcemember ? sourcemember->id : 0, \
+ destmember, destmember ? destmember->id : 0, \
+ sourceobjtype, destobjtype, detectobjtype, function_name);
+ long long int sourcememberid = 0;
+ long long int destmemberid = 0;
+ if (sourcemember)
+ sourcememberid = sourcemember->id;
+ if (destmember)
+ destmemberid = destmember->id;
+
+ OSyncFilter *filter = _osync_filter_add_ids(group, sourcememberid, destmemberid, sourceobjtype, destobjtype, detectobjtype, OSYNC_FILTER_IGNORE, function_name);
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, filter);
+ return filter;
+}
+
+/** @brief Sets the config for a filter
+ *
+ * Config must be a null-terminated string
+ *
+ * @param filter The filter
+ * @param config The new config for this filter
+ **/
+void osync_filter_set_config(OSyncFilter *filter, const char *config)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, filter, config);
+ g_assert(filter);
+ if (filter->config)
+ g_free(filter->config);
+ filter->config = g_strdup(config);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Gets the config of a filter
+ *
+ * @param filter The filter
+ * @returns The config of this filter
+ **/
+const char *osync_filter_get_config(OSyncFilter *filter)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, filter);
+ g_assert(filter);
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, filter->config);
+ return filter->config;
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_filter.h b/debian/opensync/opensync-0.22/opensync/opensync_filter.h
new file mode 100644
index 00000000..1329a6af
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_filter.h
@@ -0,0 +1,29 @@
+
+/*! @brief The action that should be invoked
+ * @ingroup OSyncFilterAPI
+ **/
+typedef enum OSyncFilterAction {
+ /** This filter should be ignored */
+ OSYNC_FILTER_IGNORE = 0,
+ /** The change should be allowed to pass (Overwrites previous action) */
+ OSYNC_FILTER_ALLOW = 1,
+ /** The change should be denied to pass (Overwrites previous action) */
+ OSYNC_FILTER_DENY = 2
+} OSyncFilterAction;
+
+typedef OSyncFilterAction (* OSyncFilterFunction)(OSyncChange *, char *config);
+
+osync_bool osync_filter_change_allowed(OSyncMember *destmember, OSyncChange *change);
+OSyncFilter *osync_filter_add(OSyncGroup *group, OSyncMember *sourcemember, OSyncMember *destmember, const char *sourceobjtype, const char *destobjtype, const char *detectobjtype, OSyncFilterAction action);
+OSyncFilter *osync_filter_add_custom(OSyncGroup *group, OSyncMember *sourcemember, OSyncMember *destmember, const char *sourceobjtype, const char *destobjtype, const char *detectobjtype, const char *function_name);
+void osync_filter_remove(OSyncGroup *group, OSyncFilter *filter);
+void osync_filter_free(OSyncFilter *filter);
+void osync_filter_set_config(OSyncFilter *filter, const char *config);
+const char *osync_filter_get_config(OSyncFilter *filter);
+
+const char *osync_filter_get_sourceobjtype(OSyncFilter *filter);
+const char *osync_filter_get_destobjtype(OSyncFilter *filter);
+const char *osync_filter_get_detectobjtype(OSyncFilter *filter);
+OSyncFilterAction osync_filter_get_action(OSyncFilter *filter);
+OSyncMember *osync_filter_get_sourcemember(OSyncFilter *filter);
+OSyncMember *osync_filter_get_destmember(OSyncFilter *filter);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_filter_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_filter_internals.h
new file mode 100644
index 00000000..476b3289
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_filter_internals.h
@@ -0,0 +1,34 @@
+
+/*! @brief Represents a filter to filter changes
+ * @ingroup OSyncFilterPrivate
+ **/
+struct OSyncFilter {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ OSyncGroup *group;
+ long long int sourcememberid;
+ long long int destmemberid;
+ char *sourceobjtype;
+ char *destobjtype;
+ char *detectobjtype;
+ OSyncFilterAction action;
+ OSyncFilterFunction hook;
+ char *function_name;
+ char *config;
+#endif
+};
+
+/*! @brief Represents a custom filter that can be used to call hooks
+ * @ingroup OSyncFilterPrivate
+ **/
+struct OSyncCustomFilter {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ char *name;
+ char *objtype;
+ char *format;
+ OSyncFilterFunction hook;
+#endif
+};
+
+OSyncFilter *osync_filter_new(void);
+void osync_filter_register(OSyncGroup *group, OSyncFilter *filter);
+void osync_filter_update_hook(OSyncFilter *filter, OSyncGroup *group, const char *function_name);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_format_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_format_internals.h
new file mode 100644
index 00000000..0049abcd
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_format_internals.h
@@ -0,0 +1,175 @@
+/**
+ * @defgroup OSyncConvPrivate OpenSync Conversion Internals
+ * @ingroup OSyncPrivate
+ * @brief The private API of opensync
+ *
+ * This gives you an insight in the private API of opensync.
+ *
+ */
+/*@{*/
+
+/*! @brief The environment used for conversions
+ */
+struct OSyncFormatEnv {
+ /** A list of object types */
+ GList *objtypes;
+ /** A List of formats */
+ GList *objformats;
+ /** A list of available converters */
+ GList *converters;
+ /** A list of filter functions */
+ GList *filter_functions;
+ /** A list of extensions */
+ GList *extensions;
+};
+
+/*! @brief Represent a abstract object type (like "contact")
+ */
+struct OSyncObjType {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ char *name;
+ GList *formats;
+ GList *converters;
+ OSyncFormatEnv *env;
+ osync_bool needs_slow_sync;
+ OSyncObjFormat *common_format;
+#endif
+};
+
+/*! @brief Represent a format for a object type
+ */
+struct OSyncObjFormat {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ char *name;
+ OSyncFormatEnv *env;
+ OSyncObjType *objtype;
+ //GList *extensions;
+ OSyncFormatCompareFunc cmp_func;
+ OSyncFormatMergeFunc merge_func;
+ OSyncFormatDuplicateFunc duplicate_func;
+ OSyncFormatCopyFunc copy_func;
+ OSyncFormatCreateFunc create_func;
+ OSyncFormatDestroyFunc destroy_func;
+ OSyncFormatPrintFunc print_func;
+ OSyncFormatRevisionFunc revision_func;
+ OSyncFormatMarshallFunc marshall_func;
+ OSyncFormatDemarshallFunc demarshall_func;
+#endif
+};
+
+/*! @brief Represent a converter from one format to another
+ */
+struct OSyncFormatConverter {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ OSyncObjFormat *source_format;
+ OSyncObjFormat *target_format;
+ OSyncFormatConvertFunc convert_func;
+ OSyncFormatDetectDataFunc detect_func;
+ OSyncFormatConverterInitFunc init_func;
+ OSyncFormatConverterFinalizeFunc fin_func;
+ ConverterType type;
+#endif
+};
+
+/*! @brief Represent a detector for a given format
+ */
+typedef struct OSyncDataDetector {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ const char *sourceformat;
+ const char *targetformat;
+ OSyncFormatDetectDataFunc detect_func;
+#endif
+} OSyncDataDetector;
+
+/*! @brief An extension to a format
+ */
+typedef struct OSyncFormatExtension {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ OSyncObjFormat *from_format;
+ OSyncObjFormat *to_format;
+ char *name;
+ OSyncFormatConvertFunc conv_func;
+ OSyncFormatExtInitFunc init_func;
+#endif
+} OSyncFormatExtension;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+typedef struct OSyncObjFormatSink {
+ OSyncObjFormat *format;
+ OSyncFormatFunctions functions;
+ char *extension_name;
+ struct OSyncObjTypeSink *objtype_sink;
+ GList *commit_changes;
+ GList *commit_contexts;
+} OSyncObjFormatSink;
+
+typedef struct OSyncObjTypeSink {
+ OSyncMember *member;
+ OSyncObjType *objtype;
+ osync_bool write;
+ osync_bool read;
+ osync_bool enabled;
+ GList *formatsinks;
+ OSyncObjFormatSink *selected_format;
+ GList *properties;
+} OSyncObjTypeSink;
+
+typedef struct OSyncObjTypeTemplate {
+ const char *name;
+ GList *formats;
+} OSyncObjTypeTemplate;
+
+typedef struct OSyncObjFormatTemplate {
+ const char *name;
+ const char *objtype;
+ char *extension_name;
+ OSyncFormatCommitFn commit_change;
+ OSyncFormatAccessFn access;
+ OSyncFormatReadFn read;
+ OSyncFormatCommittedAllFn committed_all;
+ OSyncFormatBatchCommitFn batch_commit;
+ OSyncFormatCompareFunc cmp_func;
+ OSyncFormatMergeFunc merge_func;
+ OSyncFormatDuplicateFunc duplicate_func;
+ OSyncFormatCopyFunc copy_func;
+ OSyncFormatCreateFunc create_func;
+ OSyncFormatDestroyFunc destroy_func;
+ OSyncFormatPrintFunc print_func;
+ OSyncFormatRevisionFunc revision_func;
+ OSyncFormatMarshallFunc marshall_func;
+ OSyncFormatDemarshallFunc demarshall_func;
+} OSyncObjFormatTemplate;
+
+typedef struct OSyncConverterTemplate {
+ const char *source_format;
+ const char *target_format;
+ OSyncFormatConvertFunc convert_func;
+ ConverterType type;
+ OSyncFormatConverterInitFunc init_func;
+ OSyncFormatConverterFinalizeFunc fin_func;
+} OSyncConverterTemplate;
+
+typedef struct OSyncFormatExtensionTemplate {
+ char *from_formatname;
+ char *to_formatname;
+ char *name;
+ OSyncFormatExtInitFunc init_func;
+} OSyncFormatExtensionTemplate;
+
+/** A target function for osync_conv_find_path_fn() */
+typedef osync_bool (*OSyncPathTargetFn)(const void *data, OSyncObjFormat *fmt);
+
+osync_bool osync_conv_find_path_fmtlist(OSyncFormatEnv *env, OSyncChange *start, GList/*OSyncObjFormat * */ *targets, GList **retlist);
+
+osync_bool osync_conv_convert_fn(OSyncFormatEnv *env, OSyncChange *change, OSyncPathTargetFn target_fn, const void *fndata, const char *extension_name, OSyncError **error);
+osync_bool osync_conv_convert_fmtlist(OSyncFormatEnv *env, OSyncChange *change, GList/*OSyncObjFormat * */ *targets);
+OSyncDataDetector *osync_env_find_detector(OSyncEnv *env, const char *sourcename, const char *targetname);
+osync_bool osync_conv_objtype_is_any(const char *objstr);
+OSyncFormatExtensionTemplate *osync_env_find_extension_template(OSyncEnv *env, const char *formatname);
+OSyncFormatExtension *osync_conv_find_extension(OSyncFormatEnv *env, OSyncObjFormat *from_format, OSyncObjFormat *to_format, const char *extension_name);
+OSyncChange *osync_converter_invoke_decap(OSyncFormatConverter *converter, OSyncChange *change, osync_bool *free_output);
+
+#endif
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_group.c b/debian/opensync/opensync-0.22/opensync/opensync_group.c
new file mode 100644
index 00000000..9bc117da
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_group.c
@@ -0,0 +1,1035 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+#include <errno.h>
+#include <sys/file.h>
+
+extern int errno;
+
+/*
+ * On Solaris no flock function exists,
+ * we must implenet it here
+ */
+#ifdef SOLARIS
+
+#define LOCK_SH 1
+#define LOCK_EX 2
+#define LOCK_NB 4
+#define LOCK_UN 8
+
+static int
+flock(int fd, int operation)
+{
+ struct flock flock;
+
+ switch (operation & ~LOCK_NB) {
+ case LOCK_SH:
+ flock.l_type = F_RDLCK;
+ break;
+ case LOCK_EX:
+ flock.l_type = F_WRLCK;
+ break;
+ case LOCK_UN:
+ flock.l_type = F_UNLCK;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+
+ flock.l_whence = 0;
+ flock.l_start = 0;
+ flock.l_len = 0;
+
+ return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &flock);
+}
+#endif
+
+/**
+ * @defgroup OSyncGroupPrivateAPI OpenSync Group Internals
+ * @ingroup OSyncPrivate
+ * @brief The private API of opensync
+ *
+ * This gives you an insight in the private API of opensync.
+ *
+ */
+/*@{*/
+
+/*! @brief Returns the environment in which a group is registered
+ *
+ * @param group The group
+ * @returns The environment
+ *
+ */
+OSyncEnv *osync_group_get_env(OSyncGroup *group)
+{
+ return group->env;
+}
+
+/*! @brief Gets the custom data of a group
+ *
+ * @param group The group
+ * @returns The custom data of this group
+ *
+ */
+void *osync_group_get_data(OSyncGroup *group)
+{
+ return group->data;
+}
+
+/*! @brief Sets the custom data of a group
+ *
+ * @param group The group
+ * @param data The custom data
+ *
+ */
+void osync_group_set_data(OSyncGroup *group, void *data)
+{
+ group->data = data;
+}
+
+/*! @brief Creates a new unique member if in this group
+ *
+ * @param group The group
+ * @returns A new unique member id
+ *
+ */
+long long int osync_group_create_member_id(OSyncGroup *group)
+{
+ char *filename = NULL;
+ long long int i = 0;
+ do {
+ i++;
+ if (filename)
+ g_free(filename);
+ filename = g_strdup_printf("%s/%lli", group->configdir, i);
+ } while (g_file_test(filename, G_FILE_TEST_EXISTS));
+ g_free(filename);
+ return i;
+}
+
+/*! @brief Returns the format environment of a group
+ *
+ * @param group The group
+ * @returns The format environment
+ *
+ */
+OSyncFormatEnv *osync_group_get_format_env(OSyncGroup *group)
+{
+ g_assert(group);
+ return group->conv_env;
+}
+
+/*! @brief Loads all members of a group
+ *
+ * Loads all members of a group
+ *
+ * @param group The group
+ * @param path The path from which to load the members
+ * @param error Pointer to a error
+ * @returns True if the members were loaded successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_group_load_members(OSyncGroup *group, const char *path, OSyncError **error)
+{
+ GDir *dir = NULL;
+ GError *gerror = NULL;
+ char *filename = NULL;
+
+ dir = g_dir_open(path, 0, &gerror);
+ if (!dir) {
+ osync_debug("OSGRP", 3, "Unable to open group configdir %s", gerror->message);
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to open group configdir %s", gerror->message);
+ g_error_free (gerror);
+ return FALSE;
+ }
+
+ const gchar *de = NULL;
+ while ((de = g_dir_read_name(dir))) {
+ filename = g_strdup_printf ("%s/%s", osync_group_get_configdir(group), de);
+ if (!g_file_test(filename, G_FILE_TEST_IS_DIR) || g_file_test(filename, G_FILE_TEST_IS_SYMLINK) || g_pattern_match_simple(".*", de) || !strcmp("db", de)) {
+ g_free(filename);
+ continue;
+ }
+
+ if (!osync_member_load(group, filename, error)) {
+ osync_debug("OSGRP", 0, "Unable to load one of the members");
+ g_free(filename);
+ g_dir_close(dir);
+ return FALSE;
+ }
+ g_free(filename);
+ }
+ g_dir_close(dir);
+ return TRUE;
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSyncGroupAPI OpenSync Groups
+ * @ingroup OSyncPublic
+ * @brief A groups represent several device or application that should be synchronized
+ *
+ */
+/*@{*/
+
+/*! @brief Creates a new group for the given environment
+ *
+ * Creates a newly allocated group
+ *
+ * @param env The environment for which to create the group. Might be NULL if you which to not add the group at the point of creation
+ * @returns Pointer to a new group
+ *
+ */
+OSyncGroup *osync_group_new(OSyncEnv *env)
+{
+ OSyncGroup *group = g_malloc0(sizeof(OSyncGroup));
+ group->conv_env = osync_conv_env_new(env);
+
+ if (env) {
+ osync_env_append_group(env, group);
+ group->env = env;
+ }
+
+ return group;
+}
+
+/*! @brief Frees the given group
+ *
+ * Frees the given group
+ *
+ * @param group The group
+ *
+ */
+void osync_group_free(OSyncGroup *group)
+{
+ g_assert(group);
+
+ if (group->conv_env)
+ osync_conv_env_free(group->conv_env);
+
+ if (group->lock_fd)
+ osync_group_unlock(group, FALSE);
+
+ while (osync_group_nth_member(group, 0))
+ osync_member_free(osync_group_nth_member(group, 0));
+
+ if (group->env)
+ osync_env_remove_group(group->env, group);
+
+ if (group->name)
+ g_free(group->name);
+
+ if (group->configdir)
+ g_free(group->configdir);
+
+ g_free(group);
+}
+
+/*! @brief Locks a group
+ *
+ * Tries to acquire a lock for the given group.
+ *
+ * If the lock was successfully acquired, OSYNC_LOCK_OK will
+ * be returned.
+ *
+ * If the lock was acquired, but a old lock file was detected,
+ * OSYNC_LOCK_STALE will be returned. Use this to detect if the
+ * last sync of this group was successfull, or if this something crashed.
+ * If you get this answer you should perform a slow-sync
+ *
+ * If the group is locked, OSYNC_LOCKED is returned
+ *
+ * @param group The group
+ * @returns if the lockfile was acquired
+ *
+ */
+OSyncLockState osync_group_lock(OSyncGroup *group)
+{
+ osync_trace(TRACE_ENTRY, "osync_group_lock(%p)", group);
+ g_assert(group);
+ g_assert(group->configdir);
+
+ osync_bool exists = FALSE;
+ osync_bool locked = FALSE;
+
+ if (group->lock_fd) {
+ osync_trace(TRACE_EXIT, "osync_group_lock: OSYNC_LOCKED, lock_fd existed");
+ return OSYNC_LOCKED;
+ }
+
+ char *lockfile = g_strdup_printf("%s/lock", group->configdir);
+ osync_debug("GRP", 4, "locking file %s", lockfile);
+
+ if (g_file_test(lockfile, G_FILE_TEST_EXISTS)) {
+ osync_debug("GRP", 4, "locking group: file exists");
+ exists = TRUE;
+ }
+
+ if ((group->lock_fd = open(lockfile, O_CREAT | O_WRONLY, 00700)) == -1) {
+ group->lock_fd = 0;
+ osync_debug("GRP", 1, "error opening file: %s", strerror(errno));
+ g_free(lockfile);
+ osync_trace(TRACE_EXIT_ERROR, "osync_group_lock: %s", strerror(errno));
+ return OSYNC_LOCK_STALE;
+ } else {
+
+ /* Set FD_CLOEXEC flags for the lock file descriptor. We don't want the
+ * subprocesses created by plugins or the engine to keep holding the lock
+ */
+ int oldflags = fcntl(group->lock_fd, F_GETFD);
+ if (oldflags == -1) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, "Unable to get fd flags");
+ return OSYNC_LOCK_STALE;
+ }
+
+ if (fcntl(group->lock_fd, F_SETFD, oldflags|FD_CLOEXEC) == -1) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, "Unable to set fd flags");
+ return OSYNC_LOCK_STALE;
+ }
+
+ if (flock(group->lock_fd, LOCK_EX | LOCK_NB) == -1) {
+ if (errno == EWOULDBLOCK) {
+ osync_debug("GRP", 4, "locking group: is locked2");
+ locked = TRUE;
+ close(group->lock_fd);
+ group->lock_fd = 0;
+ } else
+ osync_debug("GRP", 1, "error setting lock: %s", strerror(errno));
+ } else
+ osync_debug("GRP", 4, "Successfully locked");
+ }
+ g_free(lockfile);
+
+ if (!exists) {
+ osync_trace(TRACE_EXIT, "osync_group_lock: OSYNC_LOCK_OK");
+ return OSYNC_LOCK_OK;
+ } else {
+ if (locked) {
+ osync_trace(TRACE_EXIT, "osync_group_lock: OSYNC_LOCKED");
+ return OSYNC_LOCKED;
+ } else {
+ osync_trace(TRACE_EXIT, "osync_group_lock: OSYNC_LOCK_STALE");
+ return OSYNC_LOCK_STALE;
+ }
+ }
+}
+
+/*! @brief Unlocks a group
+ *
+ * if you set remove = FALSE, the lock file will not be removed
+ * and the next call to osync_lock_group() for this group will
+ * return OSYNC_LOCK_STALE.
+ *
+ * @param group The group
+ * @param remove If the lockfile should be removed
+ *
+ */
+void osync_group_unlock(OSyncGroup *group, osync_bool remove)
+{
+ g_assert(group);
+ g_assert(group->configdir);
+ osync_debug("GRP", 4, "unlocking group %s", group->name);
+
+ if (!group->lock_fd) {
+ osync_debug("GRP", 1, "You have to lock the group before unlocking");
+ return;
+ }
+
+ if (flock(group->lock_fd, LOCK_UN) == -1) {
+ osync_debug("GRP", 1, "error releasing lock: %s", strerror(errno));
+ return;
+ }
+
+ fsync(group->lock_fd);
+ close(group->lock_fd);
+
+ group->lock_fd = 0;
+
+ if (remove) {
+ char *lockfile = g_strdup_printf("%s/lock", group->configdir);
+ unlink(lockfile);
+ g_free(lockfile);
+ }
+}
+
+/*! @brief Sets the name for the group
+ *
+ * Sets the name for a group
+ *
+ * @param group The group
+ * @param name The name to set
+ *
+ */
+void osync_group_set_name(OSyncGroup *group, const char *name)
+{
+ g_assert(group);
+ if (group->name)
+ g_free(group->name);
+ group->name = g_strdup(name);
+}
+
+/*! @brief Returns the name of a group
+ *
+ * Returns the name of a group
+ *
+ * @param group The group
+ * @returns Name of the group
+ *
+ */
+const char *osync_group_get_name(OSyncGroup *group)
+{
+ g_assert(group);
+ return group->name;
+}
+
+/*! @brief Saves the group to disc
+ *
+ * Saves the group to disc possibly creating the configdirectory
+ *
+ * @param group The group
+ * @param error Pointer to a error struct
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_group_save(OSyncGroup *group, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, group, error);
+ g_assert(group);
+ osync_assert_msg(group->env, "You must specify a Environment prior to saving the group");
+
+ if (!group->configdir) {
+ group->id = _osync_env_create_group_id(group->env);
+ group->configdir = g_strdup_printf("%s/group%lli", group->env->groupsdir, group->id);
+ }
+
+ char *filename = NULL;
+ osync_debug("OSGRP", 3, "Trying to open configdirectory %s to save group %s", group->configdir, group->name);
+ int i;
+
+ if (!g_file_test(group->configdir, G_FILE_TEST_IS_DIR)) {
+ osync_debug("OSGRP", 3, "Creating group configdirectory %s", group->configdir);
+ if (mkdir(group->configdir, 0700)) {
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to create directory for group %s\n", group->name);
+ goto error;
+ }
+ }
+
+ filename = g_strdup_printf ("%s/syncgroup.conf", group->configdir);
+ osync_debug("OSGRP", 3, "Saving group to file %s", filename);
+
+ xmlDocPtr doc;
+
+ doc = xmlNewDoc((xmlChar*)"1.0");
+ doc->children = xmlNewDocNode(doc, NULL, (xmlChar*)"syncgroup", NULL);
+
+ //The filters
+ GList *f;
+ for (f = group->filters; f; f = f->next) {
+ OSyncFilter *filter = f->data;
+ xmlNodePtr child = xmlNewTextChild(doc->children, NULL, (xmlChar*)"filter", NULL);
+
+ if (filter->sourcememberid) {
+ char *sourcememberid = g_strdup_printf("%lli", filter->sourcememberid);
+ xmlNewTextChild(child, NULL, (xmlChar*)"sourcemember", (xmlChar*)sourcememberid);
+ g_free(sourcememberid);
+ }
+ if (filter->destmemberid) {
+ char *destmemberid = g_strdup_printf("%lli", filter->destmemberid);
+ xmlNewTextChild(child, NULL, (xmlChar*)"destmember", (xmlChar*)destmemberid);
+ g_free(destmemberid);
+ }
+ if (filter->sourceobjtype)
+ xmlNewTextChild(child, NULL, (xmlChar*)"sourceobjtype", (xmlChar*)filter->sourceobjtype);
+ if (filter->destobjtype)
+ xmlNewTextChild(child, NULL, (xmlChar*)"destobjtype", (xmlChar*)filter->destobjtype);
+ if (filter->detectobjtype)
+ xmlNewTextChild(child, NULL, (xmlChar*)"detectobjtype", (xmlChar*)filter->detectobjtype);
+ if (filter->action) {
+ char *action = g_strdup_printf("%i", filter->action);
+ xmlNewTextChild(child, NULL, (xmlChar*)"action", (xmlChar*)action);
+ g_free(action);
+ }
+ if (filter->function_name)
+ xmlNewTextChild(child, NULL, (xmlChar*)"function_name", (xmlChar*)filter->function_name);
+ if (filter->config)
+ xmlNewTextChild(child, NULL, (xmlChar*)"config", (xmlChar*)filter->config);
+ }
+
+ xmlNewTextChild(doc->children, NULL, (xmlChar*)"groupname", (xmlChar*)group->name);
+
+ char *tmstr = g_strdup_printf("%i", (int)group->last_sync);
+ xmlNewTextChild(doc->children, NULL, (xmlChar*)"last_sync", (xmlChar*)tmstr);
+ g_free(tmstr);
+
+ xmlSaveFile(filename, doc);
+ xmlFreeDoc(doc);
+ g_free(filename);
+
+ for (i = 0; i < osync_group_num_members(group); i++) {
+ OSyncMember *member = osync_group_nth_member(group, i);
+ if (!osync_member_save(member, error))
+ goto error;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+/*! @brief Deletes a group from disc
+ *
+ * Deletes to group directories and removes it from its environment
+ *
+ * @param group The group
+ * @param error Pointer to a error struct
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_group_delete(OSyncGroup *group, OSyncError **error)
+{
+ g_assert(group);
+ char *delcmd = g_strdup_printf("rm -rf %s", group->configdir);
+ if (system(delcmd)) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Failed to delete group. command %s failed", delcmd);
+ g_free(delcmd);
+ return FALSE;
+ }
+ g_free(delcmd);
+ osync_group_free(group);
+ return TRUE;
+}
+
+/*! @brief Loads a group from a directory
+ *
+ * Loads a group from a directory
+ *
+ * @param env The environment in which to create the group. Can be NULL
+ * @param path The path to the config directory of the group
+ * @param error Pointer to a error struct
+ * @returns Pointer to the loaded group
+ *
+ */
+OSyncGroup *osync_group_load(OSyncEnv *env, const char *path, OSyncError **error)
+{
+ g_assert(env);
+ char *filename = NULL;
+ char *real_path = NULL;
+
+ osync_trace(TRACE_ENTRY, "osync_group_load(%p, %s, %p)", env, path, error);
+
+ osync_debug("OSGRP", 3, "Trying to load group from directory %s", path);
+
+ if (!g_path_is_absolute(path)) {
+ real_path = g_strdup_printf("%s/%s", g_get_current_dir(), path);
+ } else {
+ real_path = g_strdup(path);
+ }
+ filename = g_strdup_printf("%s/syncgroup.conf", real_path);
+
+ OSyncGroup *group = osync_group_new(env);
+ group->configdir = real_path;
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ xmlNodePtr filternode;
+
+ if (!_osync_open_xml_file(&doc, &cur, filename, "syncgroup", error)) {
+ osync_group_free(group);
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "osync_group_load");
+ return NULL;
+ }
+
+ while (cur != NULL) {
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"groupname"))
+ group->name = (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"last_sync"))
+ group->last_sync = (time_t)atoi((char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1));
+
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"filter")) {
+ filternode = cur->xmlChildrenNode;
+ OSyncFilter *filter = osync_filter_new();
+ filter->group = group;
+
+ while (filternode != NULL) {
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"sourceobjtype"))
+ filter->sourceobjtype = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"destobjtype"))
+ filter->destobjtype = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"detectobjtype"))
+ filter->detectobjtype = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"config"))
+ filter->config = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"function_name")) {
+ char *str = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+ if (!str) {
+ filternode = filternode->next;
+ continue;
+ }
+ osync_filter_update_hook(filter, group, str);
+ xmlFree(str);
+ }
+
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"sourcemember")) {
+ char *str = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+ if (!str) {
+ filternode = filternode->next;
+ continue;
+ }
+ filter->sourcememberid = atoll(str);
+ xmlFree(str);
+ }
+
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"destmember")) {
+ char *str = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+ if (!str) {
+ filternode = filternode->next;
+ continue;
+ }
+ filter->destmemberid = atoll(str);
+ xmlFree(str);
+ }
+
+ if (!xmlStrcmp(filternode->name, (const xmlChar *)"action")) {
+ char *str = (char*)xmlNodeListGetString(doc, filternode->xmlChildrenNode, 1);
+ if (!str) {
+ filternode = filternode->next;
+ continue;
+ }
+ filter->action = atoi(str);
+ xmlFree(str);
+ }
+ filternode = filternode->next;
+ }
+ osync_filter_register(group, filter);
+ }
+ cur = cur->next;
+ }
+ xmlFreeDoc(doc);
+ g_free(filename);
+
+ //Check for sanity
+ if (!group->name) {
+ osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "Loaded a group without a name");
+ osync_debug("OSGRP", 0, "Loaded a group without a name");
+ osync_group_free(group);
+ osync_trace(TRACE_EXIT_ERROR, "osync_group_load");
+ return NULL;
+ }
+
+ if (!osync_group_load_members(group, real_path, error)) {
+ osync_group_free(group);
+ osync_trace(TRACE_EXIT_ERROR, "osync_group_load");
+ return NULL;
+ }
+
+ osync_trace(TRACE_EXIT, "osync_group_load");
+ return group;
+}
+
+/*! @brief Resets all databases of a group
+ *
+ * This will reset all databases of a group. So all anchors, mappings
+ * hashtables etc will be forgotten (as if the group was never synced)
+ *
+ * @param group The group to reset
+ *
+ */
+void osync_group_reset(OSyncGroup *group)
+{
+ OSyncError *error = NULL;
+ osync_db_reset_group(group, &error);
+
+ GList *m = NULL;
+ for (m = group->members; m; m = m->next) {
+ OSyncMember *member = m->data;
+ osync_db_reset_member(member, &error);
+ }
+}
+
+/*! @brief Appends a member to the group
+ *
+ * Appends a member to the group
+ *
+ * @param group The group to which to append
+ * @param member The member to append
+ *
+ */
+void osync_group_add_member(OSyncGroup *group, OSyncMember *member)
+{
+ g_assert(group);
+ group->members = g_list_append(group->members, member);
+}
+
+/*! @brief Removes a member from the group
+ *
+ * @param group The group from which to remove
+ * @param member The member to remove
+ *
+ */
+void osync_group_remove_member(OSyncGroup *group, OSyncMember *member)
+{
+ g_assert(group);
+ group->members = g_list_remove(group->members, member);
+}
+
+/*! @brief Returns the nth member of the group
+ *
+ * Returns a pointer to the nth member of the group
+ *
+ * @param group The group
+ * @param nth Which member to return
+ * @returns Pointer to the member
+ *
+ */
+OSyncMember *osync_group_nth_member(OSyncGroup *group, int nth)
+{
+ g_assert(group);
+ return (OSyncMember *)g_list_nth_data(group->members, nth);
+}
+
+/*! @brief Counts the members of the group
+ *
+ * Returns the number of members in the group
+ *
+ * @param group The group
+ * @returns Number of members
+ *
+ */
+int osync_group_num_members(OSyncGroup *group)
+{
+ g_assert(group);
+ return g_list_length(group->members);
+}
+
+/*! @brief Returns the configdir for the group
+ *
+ * Returns the configdir for the group
+ *
+ * @param group The group
+ * @returns String with the path of the config directory
+ *
+ */
+const char *osync_group_get_configdir(OSyncGroup *group)
+{
+ g_assert(group);
+ return group->configdir;
+}
+
+/*! @brief Sets the configdir of the group
+ *
+ * @param group The group
+ * @param directory The new configdir
+ * @returns String with the path of the config directory
+ *
+ */
+void osync_group_set_configdir(OSyncGroup *group, const char *directory)
+{
+ g_assert(group);
+ if (group->configdir)
+ g_free(group->configdir);
+ group->configdir = g_strdup(directory);
+}
+
+/*! @brief Sets if the group requires slow-sync for the given object type
+ *
+ * Sets if the group requires slow-sync for the given object type. This will be
+ * reset once the group performs a successfull slow-sync.
+ *
+ * @param group The group
+ * @param objtypestr The name of the object type
+ * @param slow_sync Set to TRUE if you want to perform a slow-sync, FALSE otherwise
+ *
+ */
+void osync_group_set_slow_sync(OSyncGroup *group, const char *objtypestr, osync_bool slow_sync)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %i)", __func__, group, objtypestr, slow_sync);
+
+ g_assert(group);
+ OSyncFormatEnv *conv_env = group->conv_env;
+
+ //FIXME Remove the slow_sync bool since you are not allowed to reset
+ //the slow-sync manually anyways.
+
+ //FIXME Race Condition!!!
+ if (!osync_group_get_slow_sync(group, objtypestr)) {
+ if (osync_conv_objtype_is_any(objtypestr)) {
+ GList *element;
+ for (element = conv_env->objtypes; element; element = element->next) {
+ OSyncObjType *objtype = element->data;
+ objtype->needs_slow_sync = slow_sync;
+ }
+ } else {
+ OSyncObjType *objtype = osync_conv_find_objtype(conv_env, objtypestr);
+ g_assert(objtype);
+ objtype->needs_slow_sync = slow_sync;
+ }
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Reset slow-sync for this group
+ *
+ * You can use this function to reset the slow-sync status for the given group. This is normally
+ * done if a synchronization succeeds.
+ *
+ * @param group The group to reset slow-sync on
+ * @param objtypestr The name of the object type
+ */
+void osync_group_reset_slow_sync(OSyncGroup *group, const char *objtypestr)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, group, objtypestr);
+ g_assert(group);
+ OSyncFormatEnv *conv_env = group->conv_env;
+
+ if (osync_conv_objtype_is_any(objtypestr)) {
+ GList *element;
+ for (element = conv_env->objtypes; element; element = element->next) {
+ OSyncObjType *objtype = element->data;
+ objtype->needs_slow_sync = FALSE;
+ }
+ } else {
+ OSyncObjType *objtype = osync_conv_find_objtype(conv_env, objtypestr);
+ g_assert(objtype);
+ objtype->needs_slow_sync = FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Returns if the group will perform a slow-sync for the object type
+ *
+ * Returns if the group will perform a slow-sync for the object type
+ *
+ * @param group The group
+ * @param objtype The name of the object type
+ * @returns TRUE if a slow-sync will be performed, FALSE otherwise
+ *
+ */
+osync_bool osync_group_get_slow_sync(OSyncGroup *group, const char *objtype)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, group, objtype);
+
+ g_assert(group);
+ OSyncFormatEnv *env = group->conv_env;
+ g_assert(env);
+
+ OSyncObjType *osync_objtype = osync_conv_find_objtype(env, "data");
+ if (osync_objtype && osync_objtype->needs_slow_sync) {
+ osync_trace(TRACE_EXIT, "%s: Data objtype needs slow-sync", __func__);
+ return TRUE;
+ }
+ osync_objtype = osync_conv_find_objtype(env, objtype);
+ g_assert(osync_objtype);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, osync_objtype->needs_slow_sync);
+ return osync_objtype->needs_slow_sync;
+}
+
+/*! @brief Returns if the object type is enabled for the group
+ *
+ * Returns TRUE if the object type is enabled for the group. Note that this
+ * information is saved on a per member basis. If one of the members has this object type enabled
+ * this function will return TRUE
+ *
+ * @param group The group
+ * @param objtype The name of the object type
+ * @returns TRUE if the object type is enabled for at least one member. FALSE if for none
+ *
+ */
+osync_bool osync_group_objtype_enabled(OSyncGroup *group, const char *objtype)
+{
+ //FIXME We should actually return a 3-state here.
+ //0 if none is enabled
+ //"0.5" if some are enabled, some are not
+ //1 if all are enabled
+ g_assert(group);
+ GList *m;
+ for (m = group->members; m; m = m->next) {
+ OSyncMember *member = m->data;
+ if (osync_member_objtype_enabled(member, objtype))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/*! @brief Sets if the object type is accepted for ALL members
+ *
+ * BUG We loose information if only some members are enabled
+ *
+ * @param group The group
+ * @param objtypestr The name of the object type
+ * @param enabled What do you want to set today?
+ *
+ * Note: the plugin needs to be instanced for this function to be called
+ *
+ * @todo Change interface to remove requirement to instance the plugin manually.
+ * It needs to be able to return error in order to load the plugin
+ */
+void osync_group_set_objtype_enabled(OSyncGroup *group, const char *objtypestr, osync_bool enabled)
+{
+ g_assert(group);
+ GList *m;
+ for (m = group->members; m; m = m->next) {
+ OSyncMember *member = m->data;
+
+ /*TODO: What this function should do if we don't have
+ * any objtype sink information?
+ * It can't return error currently. We should either
+ * require that the plugin is instanced, or change the function
+ * interface. As changing the function interface require more
+ * care, currently the function is marked as requiring the plugin to be instanced
+ */
+ if (!osync_member_require_sink_info(member, NULL)) {
+ osync_debug("OSGRP", 0, "%s: No sink information, can't load plugin, and I can't return error");
+ continue;
+ }
+
+ osync_member_set_objtype_enabled(member, objtypestr, enabled);
+ }
+}
+
+/*! @brief Returns the number of filters registered in a group
+ *
+ * @param group The group
+ * @returns The number of filters
+ *
+ */
+int osync_group_num_filters(OSyncGroup *group)
+{
+ g_assert(group);
+ return g_list_length(group->filters);
+}
+
+/*! @brief Gets the nth filter of a group
+ *
+ * Note that you should not add or delete filters while
+ * iterating over them
+ *
+ * @param group The group
+ * @param nth Which filter to return
+ * @returns The filter or NULL if not found
+ *
+ */
+OSyncFilter *osync_group_nth_filter(OSyncGroup *group, int nth)
+{
+ g_assert(group);
+ return g_list_nth_data(group->filters, nth);
+}
+
+/*! @brief Flushes the list of filters for a group
+ *
+ * Clean the list of filters on the group
+ */
+void osync_group_flush_filters(OSyncGroup *group)
+{
+ g_assert(group);
+ while (group->filters) {
+ OSyncFilter *f = g_list_nth_data(group->filters, 0);
+ osync_filter_free(f);
+
+ /* Delete the first item */
+ group->filters = g_list_delete_link(group->filters, group->filters);
+ }
+}
+
+/*! @brief Can be used to load all items from the changelog. Loaded items will be removed
+ *
+ * @param group The group for which to load the log
+ * @param uids Place to return an array with the saved uids
+ * @param objtype Place to return an array with the saved objtypes
+ * @param memberids Place to return an array with the saved memberids
+ * @param changetypes Place to return an array with the saved changetypes. Same size as uids
+ * @param error Place to return the error
+ * @returns TRUE if successfull, FALSE otherwise
+ */
+osync_bool osync_group_open_changelog(OSyncGroup *group, char ***uids, char ***objtype, long long int **memberids, int **changetypes, OSyncError **error)
+{
+ return osync_db_open_changelog(group, uids, objtype, memberids, changetypes, error);
+}
+
+/*! @brief Saves a change to the changelog.
+ *
+ * @param group The group in which to save
+ * @param change The change to save
+ * @param error Place to return the error
+ * @returns TRUE if successfull, FALSE otherwise
+ */
+osync_bool osync_group_save_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error)
+{
+ return osync_db_save_changelog(group, change, error);
+}
+
+/*! @brief Removes a change from the changelog.
+ *
+ * @param group The group in which to save
+ * @param change The change to remove
+ * @param error Place to return the error
+ * @returns TRUE if successfull, FALSE otherwise
+ */
+osync_bool osync_group_remove_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error)
+{
+ return osync_db_remove_changelog(group, change, error);
+}
+
+/*! @brief Sets the last synchronization date of this group
+ *
+ * The information will be stored on disc after osync_group_save()
+ *
+ * @param group The group in which to save
+ * @param tm The time info to set
+ */
+void osync_group_set_last_synchronization(OSyncGroup *group, time_t last_sync)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, not shown)", __func__, last_sync);
+ osync_assert_msg(group, "Group missing");
+
+ group->last_sync = last_sync;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Gets the last synchronization date from this group
+ *
+ * The information will available on the group after osync_group_load()
+ *
+ * @param group The group
+ * @return The synchronization info
+ */
+time_t osync_group_get_last_synchronization(OSyncGroup *group)
+{
+ osync_assert_msg(group, "Group missing");
+ return group->last_sync;
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_group.h b/debian/opensync/opensync-0.22/opensync/opensync_group.h
new file mode 100644
index 00000000..fd21478a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_group.h
@@ -0,0 +1,50 @@
+OSyncGroup *osync_group_new(OSyncEnv *osinfo);
+void osync_group_free(OSyncGroup *group);
+
+/*! @ingroup OSyncGroupAPI
+ * @brief The lock state of a group
+ */
+typedef enum {
+ OSYNC_LOCK_OK,
+ OSYNC_LOCKED,
+ OSYNC_LOCK_STALE
+} OSyncLockState;
+
+OSyncLockState osync_group_lock(OSyncGroup *group);
+void osync_group_unlock(OSyncGroup *group, osync_bool remove_file);
+
+void osync_group_set_name(OSyncGroup *group, const char *name);
+const char *osync_group_get_name(OSyncGroup *group);
+osync_bool osync_group_save(OSyncGroup *group, OSyncError **error);
+OSyncGroup *osync_group_load(OSyncEnv *env, const char *path, OSyncError **error);
+osync_bool osync_group_delete(OSyncGroup *group, OSyncError **error);
+void osync_group_reset(OSyncGroup *group);
+
+void osync_group_add_member(OSyncGroup *group, OSyncMember *member);
+void osync_group_remove_member(OSyncGroup *group, OSyncMember *member);
+OSyncMember *osync_group_nth_member(OSyncGroup *group, int nth);
+int osync_group_num_members(OSyncGroup *group);
+
+const char *osync_group_get_configdir(OSyncGroup *group);
+void osync_group_set_configdir(OSyncGroup *group, const char *directory);
+OSyncEnv *osync_group_get_env(OSyncGroup *group);
+void *osync_group_get_data(OSyncGroup *group);
+void osync_group_set_data(OSyncGroup *group, void *data);
+long long int osync_group_create_member_id(OSyncGroup *group);
+void osync_group_set_slow_sync(OSyncGroup *group, const char *objtype, osync_bool slow_sync);
+osync_bool osync_group_get_slow_sync(OSyncGroup *group, const char *objtype);
+void osync_group_reset_slow_sync(OSyncGroup *group, const char *objtypestr);
+osync_bool osync_group_objtype_enabled(OSyncGroup *group, const char *objtype);
+void osync_group_set_objtype_enabled(OSyncGroup *group, const char *objtype, osync_bool enabled);
+OSyncFormatEnv *osync_group_get_format_env(OSyncGroup *group);
+
+int osync_group_num_filters(OSyncGroup *group);
+OSyncFilter *osync_group_nth_filter(OSyncGroup *group, int nth);
+void osync_group_flush_filters(OSyncGroup *group);
+
+osync_bool osync_group_open_changelog(OSyncGroup *group, char ***uids, char ***objtype, long long int **memberids, int **changetypes, OSyncError **error);
+osync_bool osync_group_save_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error);
+osync_bool osync_group_remove_changelog(OSyncGroup *group, OSyncChange *change, OSyncError **error);
+
+void osync_group_set_last_synchronization(OSyncGroup *group, time_t last_sync);
+time_t osync_group_get_last_synchronization(OSyncGroup *group);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_group_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_group_internals.h
new file mode 100644
index 00000000..03a0c058
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_group_internals.h
@@ -0,0 +1,22 @@
+#ifndef _OPENSYNC_GROUP_INTERNALS_H_
+#define _OPENSYNC_GROUP_INTERNALS_H_
+
+/*! @brief Represent a group of members that should be synchronized */
+struct OSyncGroup {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ char *name;
+ GList *members;
+ char *configdir;
+ OSyncEnv *env;
+ OSyncFormatEnv *conv_env;
+ void *data;
+ long long int id;
+ int lock_fd;
+ GList *filters;
+ char *changes_path;
+ OSyncDB *changes_db;
+ time_t last_sync;
+#endif
+};
+
+#endif //_OPENSYNC_GROUP_INTERNALS_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_hashtable.c b/debian/opensync/opensync-0.22/opensync/opensync_hashtable.c
new file mode 100644
index 00000000..2bd2de9d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_hashtable.c
@@ -0,0 +1,380 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync.h>
+#include "opensync_internals.h"
+
+/**
+ * @defgroup OSyncHashtablePrivateAPI OpenSync Hashtable Internals
+ * @ingroup OSyncPrivate
+ * @brief The private API of the Hashtables
+ *
+ * This gives you an insight in the private API of the Hashtables
+ *
+ */
+/*@{*/
+
+static void osync_hashtable_assert_loaded(OSyncHashTable *table)
+{
+ osync_assert_msg(table, "You have to pass a valid hashtable to the call!");
+ osync_assert_msg(table->dbhandle, "Hashtable not loaded yet. You have to load the hashtable first using osync_hashtable_load!");
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSyncHashtableAPI OpenSync Hashtables
+ * @ingroup OSyncPublic
+ * @brief A Hashtable can be used to detect changes
+ *
+ * Hashtables can be used to detect changes since the last invokation. They do this
+ * by keeping track of all reported uids and the hashes of the objects.
+ *
+ * Hashes are strings that change when the objects is updated or when the content of
+ * the object changes. So hashes can either be a real hash like an MD5 or something
+ * like a timestamp. The only important thing is that the hash changes once the item
+ * gets updated.
+ *
+ * The hashtable works like this:
+ * - You first malloc it with osync_hashtable_new()
+ * - Then you load the saved hashtable from disk with osync_hashtable_load()
+ *
+ * Now you can query and alter the table. You can ask if a item has changed by doing:
+ * - osync_hashtable_get_changetype() to get the changetype of a certain uid and hash
+ * - or the convience function osync_hashtable_detect_change which calls
+ * osync_hashtable_get_changetype() and sets this changetype on the change object and then
+ * automatically calls osync_hashtable_report()
+ * After you reported all objects you can query the table for the deleted objects using
+ * osync_hashtable_get_deleted() or osync_hashtable_report_deleted()
+ *
+ * After you are done call:
+ * - osync_hashtable_close()
+ * - osync_hashtable_free()
+ *
+ * The hashtable works like this:
+ *
+ * First the items are reported with a certain uid or hash. If the uid does not yet
+ * exist in the database it is reported as ADDED. if the uid exists and the hash is different
+ * it is reported as MODIFIED. if the uid exists but the hash is the same it means that the
+ * object is UNMODIFIED.
+ *
+ * To be able to report deleted objects the hashtables keeps track of the uids you reported.
+ * After you are done with asking the hashtable for changes you can ask it for deleted objects.
+ * All items that are in the hashtable but where not reported by you have to be DELETED.
+ *
+ */
+/*@{*/
+
+/*! @brief Creates a new hashtable
+ *
+ * Hashtables can be used to detect what has been changed since
+ * the last sync
+ *
+ * @returns A new hashtable
+ *
+ */
+OSyncHashTable *osync_hashtable_new(void)
+{
+ OSyncHashTable *table = g_malloc0(sizeof(OSyncHashTable));
+ g_assert(table);
+ table->used_entries = g_hash_table_new(g_str_hash, g_str_equal);
+ return table;
+}
+
+/*! @brief Frees a hashtable
+ *
+ *
+ * @param table The hashtable to free
+ *
+ */
+void osync_hashtable_free(OSyncHashTable *table)
+{
+ g_hash_table_destroy(table->used_entries);
+ g_free(table);
+}
+
+/*! @brief Makes a hashtable forget
+ *
+ * You can ask the hashtable to detect the changes. In the end you can
+ * ask the hashtable for all items that have been deleted since the last sync.
+ * For this the hashtable maintains a internal table of items you already reported and
+ * reports the items it didnt see yet as deleted.
+ * This function resets the internal table so it start to report deleted items again
+ *
+ * @param table The hashtable
+ *
+ */
+void osync_hashtable_forget(OSyncHashTable *table)
+{
+ g_hash_table_destroy(table->used_entries);
+ table->used_entries = g_hash_table_new(g_str_hash, g_str_equal);
+}
+
+/*! @brief Loads a hashtable from disk
+ *
+ * @param table The hashtable
+ * @param member The member for which to load the table
+ * @param error An error struct
+ * @returns TRUE if successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_hashtable_load(OSyncHashTable *table, OSyncMember *member, OSyncError **error)
+{
+ return osync_db_open_hashtable(table, member, error);
+}
+
+/*! @brief Closes a previously loaded table
+ *
+ * This function also makes the hashtable "forget"
+ *
+ * @param table The hashtable
+ *
+ */
+void osync_hashtable_close(OSyncHashTable *table)
+{
+ osync_hashtable_assert_loaded(table);
+
+ osync_hashtable_forget(table);
+ osync_db_close(table->dbhandle);
+}
+
+/*! @brief Returns the number of entries in this hashtable
+ *
+ * @param table The hashtable
+ * @returns The number of entries
+ *
+ */
+int osync_hashtable_num_entries(OSyncHashTable *table)
+{
+ osync_hashtable_assert_loaded(table);
+
+ return osync_db_count(table->dbhandle, "SELECT count(*) FROM tbl_hash");
+}
+
+/*! @brief Gets the nth entry from the table
+ *
+ * This is mainly usefull for debugging or special purposes
+ *
+ * @param table The hashtable
+ * @param i The number of the entry to return
+ * @param uid A pointer to a char * that will hold the uid. The caller is responible for freeing
+ * @param hash A pointer to a char * that will hold the hash. The caller is responible for freeing
+ * @returns TRUE if successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_hashtable_nth_entry(OSyncHashTable *table, int i, char **uid, char **hash)
+{
+ osync_hashtable_assert_loaded(table);
+
+ sqlite3 *sdb = table->dbhandle->db;
+
+ sqlite3_stmt *ppStmt = NULL;
+ char *query = g_strdup_printf("SELECT uid, hash FROM tbl_hash LIMIT 1 OFFSET %i", i);
+ sqlite3_prepare(sdb, query, -1, &ppStmt, NULL);
+ sqlite3_step(ppStmt);
+ *uid = g_strdup((gchar*)sqlite3_column_text(ppStmt, 0));
+ *hash = g_strdup((gchar*)sqlite3_column_text(ppStmt, 1));
+ sqlite3_finalize(ppStmt);
+ g_free(query);
+ return TRUE;
+}
+
+/*! @brief Update the hash for a entry
+ *
+ * Updates the hash for a entry in the hashtable. Do this after you see that a hash
+ * has changed, for example after reading it during get_changes or after you
+ * wrote it
+ *
+ * @param table The hashtable
+ * @param change The change with the new hash information
+ */
+void osync_hashtable_update_hash(OSyncHashTable *table, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, table, change);
+ osync_hashtable_assert_loaded(table);
+ osync_assert_msg(change, "Change was NULL. Bug in a plugin");
+ osync_assert_msg(change->uid, "No uid was set on change. Bug in a plugin");
+
+ osync_trace(TRACE_INTERNAL, "Updating hashtable with hash \"%s\" and changetype %i",
+ change->hash, osync_change_get_changetype(change));
+
+ switch (osync_change_get_changetype(change)) {
+ case CHANGE_MODIFIED:
+ case CHANGE_ADDED:
+ osync_db_save_hash(table, change->uid, change->hash,
+ osync_change_get_objtype(change) ? osync_change_get_objtype(change)->name : NULL);
+ break;
+ case CHANGE_DELETED:
+ osync_db_delete_hash(table, change->uid);
+ break;
+ default:
+ g_assert_not_reached();
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Report a item
+ *
+ * When you use this function the item is marked as reported, so it will not get
+ * listed as deleted. Use this function if there are problems accessing an object for
+ * example so that the object does not get reported as deleted accidently.
+ *
+ * @param table The hashtable
+ * @param uid The uid to report
+ *
+ */
+void osync_hashtable_report(OSyncHashTable *table, const char *uid)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, table, uid);
+ osync_hashtable_assert_loaded(table);
+
+ g_hash_table_insert(table->used_entries, g_strdup(uid), GINT_TO_POINTER(1));
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Report all deleted items
+ *
+ * @param table The hashtable
+ * @param context The context in which to report the changes
+ * @param objtype The object type which to report, NULL for all
+ *
+ */
+void osync_hashtable_report_deleted(OSyncHashTable *table, OSyncContext *context, const char *objtype)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %s)", __func__, table, context, objtype);
+ osync_hashtable_assert_loaded(table);
+
+ char **uidarr = osync_db_get_deleted_hash(table, objtype);
+ int i = 0;
+ for (i = 0; uidarr[i]; i++) {
+ char *uid = uidarr[i];
+ OSyncChange *change = osync_change_new();
+ change->changetype = CHANGE_DELETED;
+ osync_change_set_objtype_string(change, objtype);
+ osync_change_set_uid(change, uid);
+ osync_context_report_change(context, change);
+ osync_hashtable_update_hash(table, change);
+ g_free(uid);
+ }
+ g_free(uidarr);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Get the uid of all deleted items
+ *
+ * @param table The hashtable
+ * @param objtype The object type which to report, NULL for all
+ * @returns An Null terminated array of uids. The uids and this array have to be freed.
+ *
+ */
+char **osync_hashtable_get_deleted(OSyncHashTable *table, const char *objtype)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, table, objtype);
+ osync_hashtable_assert_loaded(table);
+
+ char **retarr = osync_db_get_deleted_hash(table, objtype);
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, retarr);
+ return retarr;
+}
+
+/*! @brief Get the hash value from the hash table
+ *
+ */
+void osync_hashtable_get_hash(OSyncHashTable *table, OSyncChange *chg)
+{
+ char *orighash = NULL;
+ osync_db_get_hash(table, chg->uid, osync_change_get_objtype(chg)->name, &orighash);
+ osync_change_set_hash(chg, orighash);
+ g_free(orighash);
+}
+
+/*! @brief Gets the changetype for a given uid and hash
+ *
+ * This functions does not report the object so if you only use this function
+ * it will get reported as deleted! Please use osync_hashtable_report() for reporting
+ * and object.
+ *
+ * @param table The hashtable
+ * @param uid The uid to lookup
+ * @param hash The hash to compare
+ * @returns The changetype
+ *
+ */
+OSyncChangeType osync_hashtable_get_changetype(OSyncHashTable *table, const char *uid, const char *objtype, const char *hash)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %s)", __func__, table, uid, objtype, hash);
+ osync_hashtable_assert_loaded(table);
+ OSyncChangeType retval = CHANGE_UNMODIFIED;
+
+ char *orighash = NULL;
+ osync_db_get_hash(table, uid, objtype, &orighash);
+ osync_trace(TRACE_INTERNAL, "Comparing %s with %s", hash, orighash);
+
+ if (orighash) {
+ if (strcmp(hash, orighash) == 0)
+ retval = CHANGE_UNMODIFIED;
+ else
+ retval = CHANGE_MODIFIED;
+ } else
+ retval = CHANGE_ADDED;
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, retval ? "TRUE" : "FALSE");
+ return retval;
+}
+
+/*! @brief Gets the changetype of an object and sets it directly
+ *
+ * This functions also call report
+ *
+ * @param table The hashtable
+ * @param change The change to check
+ * @returns TRUE if the object was not changed, FALSE if it was changed or added
+ *
+ */
+osync_bool osync_hashtable_detect_change(OSyncHashTable *table, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, table, change);
+ osync_bool retval = FALSE;
+
+ change->changetype = osync_hashtable_get_changetype(table, change->uid, osync_objtype_get_name(osync_change_get_objtype(change)), change->hash);
+ if (change->changetype != CHANGE_UNMODIFIED)
+ retval = TRUE;
+
+ g_hash_table_insert(table->used_entries, g_strdup(change->uid), GINT_TO_POINTER(1));
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, retval ? "TRUE" : "FALSE");
+ return retval;
+}
+
+/*! @brief Resets the hashtable for a given object type
+ *
+ * @param table The hashtable
+ * @param objtype The object type to slow-sync, NULL for all
+ */
+void osync_hashtable_set_slow_sync(OSyncHashTable *table, const char *objtype)
+{
+ osync_hashtable_assert_loaded(table);
+
+ osync_db_reset_hash(table, objtype);
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_hashtable.h b/debian/opensync/opensync-0.22/opensync/opensync_hashtable.h
new file mode 100644
index 00000000..7867709e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_hashtable.h
@@ -0,0 +1,15 @@
+osync_bool osync_hashtable_load(OSyncHashTable *table, OSyncMember *member, OSyncError **error);
+void osync_hashtable_close(OSyncHashTable *table);
+void osync_hashtable_update_hash(OSyncHashTable *table, OSyncChange *change);
+osync_bool osync_hashtable_detect_change(OSyncHashTable *table, OSyncChange *change);
+void osync_hashtable_report_deleted(OSyncHashTable *table, OSyncContext *context, const char *objtype);
+OSyncHashTable *osync_hashtable_new(void);
+void osync_hashtable_free(OSyncHashTable *table);
+void osync_hashtable_forget(OSyncHashTable *table);
+int osync_hashtable_num_entries(OSyncHashTable *table);
+osync_bool osync_hashtable_nth_entry(OSyncHashTable *table, int i, char **uid, char **hash);
+void osync_hashtable_set_slow_sync(OSyncHashTable *table, const char *objtype);
+void osync_hashtable_report(OSyncHashTable *table, const char *uid);
+void osync_hashtable_get_hash(OSyncHashTable *table, OSyncChange *chg);
+OSyncChangeType osync_hashtable_get_changetype(OSyncHashTable *table, const char *uid, const char *objtype, const char *hash);
+char **osync_hashtable_get_deleted(OSyncHashTable *table, const char *objtype);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_hashtable_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_hashtable_internals.h
new file mode 100644
index 00000000..7d9c63e4
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_hashtable_internals.h
@@ -0,0 +1,12 @@
+#ifndef _OPENSYNC_HASHTABLE_INTERNALS_H_
+#define _OPENSYNC_HASHTABLE_INTERNALS_H_
+
+/*! @brief Represent a hashtable which can be used to check if changes have been modifed or deleted */
+struct OSyncHashTable {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ OSyncDB *dbhandle;
+ GHashTable *used_entries;
+#endif
+};
+
+#endif //_OPENSYNC_HASHTABLE_INTERNALS_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_internals.h
new file mode 100755
index 00000000..c402d6a1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_internals.h
@@ -0,0 +1,58 @@
+
+#include <glib.h>
+#include <gmodule.h>
+#include <string.h>
+#include <glib/gprintf.h>
+#include <sys/stat.h>
+
+#include "config.h"
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+#include <errno.h>
+extern int errno;
+
+#define osync_assert(x) do { \
+ if (!(x)) { \
+ fprintf(stderr, "%s:%i:E:%s: Assertion \"" #x "\" failed\n", __FILE__, __LINE__, __FUNCTION__); \
+ abort(); \
+ } } while (0)
+
+#define osync_assert_msg(x, msg) do { \
+ if (!(x)) { \
+ fprintf(stderr, "%s:%i:E:%s: %s\n", __FILE__, __LINE__, __FUNCTION__, msg); \
+ abort(); \
+ } } while (0)
+
+#define segfault_me char **blablabla = NULL; *blablabla = "test";
+
+#define osync_return_if_fail(condition) do { \
+ if (!(condition)) { \
+ osync_debug ("ASSERT", 0, "%i: Assertion failed: \"%s\" in %s:%i:%s", getpid (), #condition, __FILE__, __LINE__, __FUNCTION__); \
+ return; \
+ } } while (0)
+
+#define osync_return_val_if_fail(condition, val) do { \
+ if (!(condition)) { \
+ return (val); \
+ } } while (0)
+
+typedef struct OSyncDB OSyncDB;
+
+#include "opensync_support.h"
+#include "opensync_user_internals.h"
+#include "opensync_change_internals.h"
+#include "opensync_env_internals.h"
+#include "opensync_error_internals.h"
+#include "opensync_db_internals.h"
+#include "opensync_format_internals.h"
+#include "opensync_member_internals.h"
+#include "opensync_group_internals.h"
+#include "opensync_plugin_internals.h"
+#include "opensync_filter_internals.h"
+#include "opensync_context_internals.h"
+#include "opensync_hashtable_internals.h"
+#include "opensync_message_internals.h"
+#include "opensync_queue_internals.h"
+#include "opensync_xml.h"
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_member.c b/debian/opensync/opensync-0.22/opensync/opensync_member.c
new file mode 100644
index 00000000..34912d2f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_member.c
@@ -0,0 +1,1636 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @defgroup OSyncMemberPrivateAPI OpenSync Member Internals
+ * @ingroup OSyncPrivate
+ * @brief The private part of the OSyncMember
+ *
+ */
+/*@{*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+OSyncMemberFunctions *osync_memberfunctions_new()
+{
+ OSyncMemberFunctions *functions = g_malloc0(sizeof(OSyncMemberFunctions));
+ return functions;
+}
+
+OSyncMemberFunctions *osync_member_get_memberfunctions(OSyncMember *member)
+{
+ return member->memberfunctions;
+}
+
+OSyncFormatEnv *osync_member_get_format_env(OSyncMember *member)
+{
+ g_assert(member);
+ return osync_group_get_format_env(member->group);
+}
+
+/** Find the objtype_sink for a member, corresponding to objtypestr
+ *
+ * Note: Only call this function after calling osync_member_require_sink_info()
+ */
+OSyncObjTypeSink *osync_member_find_objtype_sink(OSyncMember *member, const char *objtypestr)
+{
+ GList *o;
+ for (o = member->objtype_sinks; o; o = o->next) {
+ OSyncObjTypeSink *sink = o->data;
+ if (osync_conv_objtype_is_any(sink->objtype->name) || !strcmp(sink->objtype->name, objtypestr))
+ return sink;
+ }
+ return NULL;
+}
+
+/** Be sure that the sink information for the member is available
+ *
+ * This function should be used on every code that will access the objtype_sinks
+ * or objformat_sinks members on OSyncMember.
+ *
+ * This function will either load the plugin or load the plugin information
+ * for the member, in order to get the objtype_sink list information for
+ * the member.
+ */
+osync_bool osync_member_require_sink_info(OSyncMember *member, OSyncError **error)
+{
+ // Currently, the only way to get the objtype_sink information
+ // is loading the plugin
+ if (!osync_member_instance_default_plugin(member, error))
+ return FALSE;
+
+ return TRUE;
+}
+
+/** Returns the list of objtype_sinks of a member
+ *
+ * @param member The member
+ * @param list_ptr Pointer to where the list will be returned
+ * @param error Pointer to error info
+ *
+ * @returns TRUE on success, FALSE on error
+ */
+osync_bool osync_member_get_objtype_sinks(OSyncMember *member, GList **list_ptr, OSyncError **error)
+{
+ if (!osync_member_require_sink_info(member, error))
+ return FALSE;
+
+ *list_ptr = member->objtype_sinks;
+ return TRUE;
+}
+
+/** @brief Reads the configuration data of this member
+ *
+ * The config file is read in this order:
+ * - If there is a configuration in memory that is not yet saved
+ * this is returned
+ * - If there is a config file in the member directory this is read
+ * and returned
+ *
+ * The difference to get_config is that this function will never try to read
+ * the default config file and return an error instead. So this function is supposed
+ * to be used by the plugins.
+ *
+ * @param member The member
+ * @param data Return location for the data
+ * @param size Return location for the size of the data
+ * @param error Pointer to a error
+ * @returns TRUE if the config was loaded successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_member_read_config(OSyncMember *member, char **data, int *size, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osync_member_read_config(%p, %p, %p, %p)", member, data, size, error);
+
+ if (!osync_member_instance_default_plugin(member, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ osync_bool ret = FALSE;
+ if (!member->configdir) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Member has no config directory set");
+ osync_trace(TRACE_EXIT_ERROR, "osync_member_read_config: %i", osync_error_print(error));
+ return FALSE;
+ }
+
+ if (functions.get_config) {
+ ret = functions.get_config(member->configdir, data, size);
+ } else {
+ char *filename = g_strdup_printf("%s/%s.conf", member->configdir, osync_plugin_get_name(member->plugin));
+ ret = osync_file_read(filename, data, size, error);
+ g_free(filename);
+ }
+
+ if (ret)
+ osync_trace(TRACE_EXIT, "osync_member_read_config: TRUE");
+ else
+ osync_trace(TRACE_EXIT_ERROR, "osync_member_read_config: %s", osync_error_print(error));
+ return ret;
+}
+
+#endif
+
+/*@}*/
+
+/**
+ * @defgroup OSyncMemberAPI OpenSync Member
+ * @ingroup OSyncPublic
+ * @brief Used to manipulate members, which represent one device or application in a group
+ *
+ */
+/*@{*/
+
+/** @brief Creates a new member for a group
+ *
+ * @param group The parent group. NULL if none
+ * @returns A newly allocated member
+ *
+ */
+OSyncMember *osync_member_new(OSyncGroup *group)
+{
+ OSyncMember *member = g_malloc0(sizeof(OSyncMember));
+ if (group) {
+ osync_group_add_member(group, member);
+ member->group = group;
+ }
+
+ member->memberfunctions = osync_memberfunctions_new();
+ member->name = NULL;
+
+ return member;
+}
+
+/** @brief Frees a member
+ *
+ * @param member The member to free
+ *
+ */
+void osync_member_free(OSyncMember *member)
+{
+ osync_assert_msg(member, "You must set a member to free");
+
+ if (member->group)
+ osync_group_remove_member(member->group, member);
+
+ //Free the plugin if we are not thread-safe
+ /*if (member->plugin && !member->plugin->info.is_threadsafe) {
+ osync_plugin_unload(member->plugin);
+ osync_plugin_free(member->plugin);
+ }*/
+
+ if (member->pluginname)
+ g_free(member->pluginname);
+
+ g_free(member->memberfunctions);
+ g_free(member);
+}
+
+/** @brief Unloads the plugin of a member
+ *
+ * @param member The member for which to unload the plugin
+ *
+ */
+void osync_member_unload_plugin(OSyncMember *member)
+{
+ g_assert(member);
+ if (!member->plugin)
+ return;
+
+ /*if (!member->plugin->info.is_threadsafe) {
+ osync_plugin_unload(member->plugin);
+ osync_plugin_free(member->plugin);
+ }*/
+
+ g_list_free(member->objtype_sinks);
+ g_list_free(member->format_sinks);
+ //Really free the formats!
+
+ member->objtype_sinks = NULL;
+ member->format_sinks = NULL;
+ member->plugin = NULL;
+}
+
+/** @brief Instances a plugin and loads it if necessary
+ *
+ * @param member The member
+ * @param pluginname The name of the plugin that the member should use
+ * @param error Pointer to a error
+ * @returns TRUE if the plugin was instanced successfull, FALSE otherwise
+ *
+ */
+osync_bool osync_member_instance_plugin(OSyncMember *member, const char *pluginname, OSyncError **error)
+{
+ g_assert(member);
+ g_assert(member->group);
+ g_assert(pluginname);
+
+ OSyncPlugin *plugin = osync_env_find_plugin(member->group->env, pluginname);
+ if (!plugin) {
+ osync_debug("OSPLG", 0, "Couldn't find the plugin %s for member", pluginname);
+ osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "Unable to find the plugin \"%s\"", pluginname);
+ return FALSE;
+ }
+
+ osync_member_unload_plugin(member);
+
+ //For now we disable the threadsafety feature since dlopen doesnt like it
+ member->plugin = plugin;
+ /*if (plugin->info.is_threadsafe) {
+ member->plugin = plugin;
+ } else {
+ member->plugin = osync_plugin_load(NULL, plugin->path, error);
+ if (!member->plugin)
+ return FALSE;
+ }*/
+ member->pluginname = g_strdup(osync_plugin_get_name(member->plugin));
+
+ //Prepare the sinks;
+ GList *o;
+ for (o = member->plugin->accepted_objtypes; o; o = o->next) {
+ OSyncObjTypeTemplate *objtemplate = o->data;
+ OSyncObjTypeSink *objsink = osync_objtype_sink_from_template(member->group, objtemplate);
+ if (!objsink) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Could not find object type \"%s\"", objtemplate->name);
+ return FALSE;
+ }
+ member->objtype_sinks = g_list_append(member->objtype_sinks, objsink);
+ GList *f;
+ for (f = objtemplate->formats; f; f = f->next) {
+ OSyncObjFormatTemplate *frmtemplate = f->data;
+ OSyncObjFormatSink *format_sink = osync_objformat_sink_from_template(member->group, frmtemplate);
+ if (!format_sink) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Could not find format \"%s\"", frmtemplate->name);
+ return FALSE;
+ }
+ objsink->formatsinks = g_list_append(objsink->formatsinks, format_sink);
+ format_sink->objtype_sink = objsink;
+ member->format_sinks = g_list_append(member->format_sinks, format_sink);
+ if (frmtemplate->extension_name)
+ member->extension = g_strdup(frmtemplate->extension_name);
+ }
+ }
+
+ member->pluginname = g_strdup(pluginname);
+ return TRUE;
+}
+
+/** @brief Tries to instance the default plugin of a member (if set)
+ *
+ * @param member The member
+ * @param error Pointer to a error
+ * @returns TRUE if the default plugin was instanced successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_member_instance_default_plugin(OSyncMember *member, OSyncError **error)
+{
+ if (member->plugin)
+ return TRUE;
+
+ if (!member->pluginname) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "No default plugin set while instancing");
+ return FALSE;
+ }
+
+ return osync_member_instance_plugin(member, member->pluginname, error);
+}
+
+/** @brief Returns the plugin of member
+ *
+ * @param member The member
+ * @returns The plugin of the member
+ *
+ */
+OSyncPlugin *osync_member_get_plugin(OSyncMember *member)
+{
+ g_assert(member);
+ osync_member_instance_default_plugin(member, NULL);
+ return member->plugin;
+}
+
+/** @brief Returns the name of the default plugin of the member
+ *
+ * @param member The member
+ * @returns The name of the plugin
+ *
+ */
+const char *osync_member_get_pluginname(OSyncMember *member)
+{
+ g_assert(member);
+ return member->pluginname;
+}
+
+/** @brief Sets the name of the default plugin of a member
+ *
+ * @param member The member
+ * @param pluginname The name of the default plugin
+ *
+ */
+void osync_member_set_pluginname(OSyncMember *member, const char *pluginname)
+{
+ g_assert(member);
+ if (member->pluginname)
+ g_free(member->pluginname);
+ member->pluginname = g_strdup(pluginname);
+}
+
+/** @brief Returns the custom data set to the OSyncPluginInfo
+ *
+ * You can set custom data to the OSyncPluginInfo struct using
+ * info->plugin_data = something; you can then query this data later
+ * using this function.
+ *
+ * @param member The member
+ * @returns The plugin data set before, or NULL if none was set
+ *
+ */
+void *osync_member_get_plugindata(OSyncMember *member)
+{
+ g_assert(member);
+ OSyncPlugin *plugin = osync_member_get_plugin(member);
+ return osync_plugin_get_plugin_data(plugin);
+}
+
+/** @brief Returns the configuration directory where this member is stored
+ *
+ * @param member The member
+ * @returns The configuration directory
+ *
+ */
+const char *osync_member_get_configdir(OSyncMember *member)
+{
+ g_assert(member);
+ return member->configdir;
+}
+
+/** @brief Sets the directory where a member is supposed to be stored
+ *
+ * @param member The member
+ * @param configdir The name of the directory
+ *
+ */
+void osync_member_set_configdir(OSyncMember *member, const char *configdir)
+{
+ g_assert(member);
+ if (member->configdir)
+ g_free(member->configdir);
+ member->configdir = g_strdup(configdir);
+}
+
+osync_bool osync_member_need_config(OSyncMember *member, OSyncConfigurationTypes *type, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, member, type, error);
+ g_assert(member);
+ g_assert(type);
+ *type = NO_CONFIGURATION;
+
+ if (!osync_member_instance_default_plugin(member, error))
+ goto error;
+
+ *type = member->plugin->info.config_type;
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, *type);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+/** @brief Gets the configuration data of this member
+ *
+ * The config file is read in this order:
+ * - If there is a configuration in memory that is not yet saved
+ * this is returned
+ * - If there is a config file in the member directory this is read
+ * and returned
+ * - Otherwise the default config file is loaded from one the opensync
+ * directories
+ *
+ * @param member The member
+ * @param data Return location for the data
+ * @param size Return location for the size of the data
+ * @param error Pointer to a error
+ * @returns TRUE if the config was loaded successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_member_get_config_or_default(OSyncMember *member, char **data, int *size, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, member, data, size, error);
+ g_assert(member);
+ osync_bool ret = TRUE;
+
+ if (member->configdata) {
+ *data = member->configdata;
+ *size = member->configsize;
+ osync_trace(TRACE_EXIT, "%s: Configdata already in memory", __func__);
+ return TRUE;
+ }
+
+ if (!osync_member_read_config(member, data, size, error)) {
+ if (osync_error_is_set(error)) {
+ osync_trace(TRACE_INTERNAL, "Read config not successfull: %s", osync_error_print(error));
+ osync_error_free(error);
+ }
+
+ char *filename = g_strdup_printf(OPENSYNC_CONFIGDIR"/%s", member->pluginname);
+ osync_debug("OSMEM", 3, "Reading default2 config file for member %lli from %s", member->id, filename);
+ ret = osync_file_read(filename, data, size, error);
+ g_free(filename);
+ }
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, ret);
+ return ret;
+}
+
+/** @brief Gets the configuration data of this member
+ *
+ * The config file is read in this order:
+ * - If there is a configuration in memory that is not yet saved
+ * this is returned
+ * - If there is a config file in the member directory this is read
+ * and returned
+ * - Otherwise the default config file is loaded from one the opensync
+ * directories (but only if the plugin specified that it can use the default
+ * configuration)
+ *
+ * @param member The member
+ * @param data Return location for the data
+ * @param size Return location for the size of the data
+ * @param error Pointer to a error
+ * @returns TRUE if the config was loaded successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_member_get_config(OSyncMember *member, char **data, int *size, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, member, data, size, error);
+ g_assert(member);
+ osync_bool ret = TRUE;
+
+ if (!osync_member_instance_default_plugin(member, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (member->plugin->info.config_type == NO_CONFIGURATION) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "This member has no configuration options");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (member->configdata) {
+ *data = member->configdata;
+ *size = member->configsize;
+ osync_trace(TRACE_EXIT, "%s: Configdata already in memory", __func__);
+ return TRUE;
+ }
+
+ if (!osync_member_read_config(member, data, size, error)) {
+ if (osync_error_is_set(error)) {
+ osync_trace(TRACE_INTERNAL, "Read config not successfull: %s", osync_error_print(error));
+ osync_error_free(error);
+ }
+
+ if (member->plugin->info.config_type == NEEDS_CONFIGURATION) {
+ //We dont load the default config for these
+ osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "Member has not been configured");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ char *filename = g_strdup_printf(OPENSYNC_CONFIGDIR"/%s", member->pluginname);
+ osync_debug("OSMEM", 3, "Reading default2 config file for member %lli from %s", member->id, filename);
+ ret = osync_file_read(filename, data, size, error);
+ g_free(filename);
+ }
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, ret);
+ return ret;
+}
+
+/** @brief Sets the config data for a member
+ *
+ * Note that this does not save the config data
+ *
+ * @param member The member
+ * @param data The new config data
+ * @param size The size of the data
+ *
+ */
+void osync_member_set_config(OSyncMember *member, const char *data, int size)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i)", __func__, member, data, size);
+ g_assert(member);
+ //FIXME free old data
+ member->configdata = g_strdup(data);
+ member->configsize = size;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Gets the loop in which the member is dispatched
+ *
+ * @param member The member
+ * @returns The loop
+ *
+ */
+void *osync_member_get_loop(OSyncMember *member)
+{
+ g_assert(member);
+ osync_trace(TRACE_INTERNAL, "%s: %p %p", __func__, member, member->loop);
+ return member->loop;
+}
+
+/** @brief Sets the loop in which the member is dispatched
+ *
+ * @param member The member
+ * @param loop The pointer to the loop
+ *
+ */
+void osync_member_set_loop(OSyncMember *member, void *loop)
+{
+ g_assert(member);
+ osync_trace(TRACE_INTERNAL, "%s: %p %p", __func__, member, loop);
+ member->loop = loop;
+}
+
+
+/** @brief Returns if the member has configuation options
+ *
+ * @param member The member
+ * @return TRUE if member needs to be configured, FALSE otherwise
+ *
+ */
+osync_bool osync_member_has_configuration(OSyncMember *member)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, member);
+ g_assert(member);
+
+ osync_bool ret = (member->plugin->info.config_type == NEEDS_CONFIGURATION || member->plugin->info.config_type == OPTIONAL_CONFIGURATION);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, ret);
+ return ret;
+}
+
+/** @brief Loads a member from a directory where it has been saved
+ *
+ * @param group The group which is the parent
+ * @param path The path of the member
+ * @param error Pointer to a error
+ * @returns A newly allocated member thats stored in the group or NULL if error
+ *
+ */
+OSyncMember *osync_member_load(OSyncGroup *group, const char *path, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, group, path, error);
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ char *filename = NULL;
+
+ filename = g_strdup_printf ("%s/syncmember.conf", path);
+
+ OSyncMember *member = osync_member_new(group);
+ char *basename = g_path_get_basename(path);
+ member->id = atoi(basename);
+ g_free(basename);
+ member->configdir = g_strdup(path);
+
+ if (!_osync_open_xml_file(&doc, &cur, filename, "syncmember", error)) {
+ osync_member_free(member);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+ }
+
+ while (cur != NULL) {
+ char *str = (char*)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ if (str) {
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"pluginname"))
+ member->pluginname = g_strdup(str);
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"name"))
+ member->name = g_strdup(str);
+ xmlFree(str);
+ }
+ cur = cur->next;
+ }
+ xmlFreeDoc(doc);
+ g_free(filename);
+
+ osync_trace(TRACE_EXIT, "%s: Loaded member: %p", __func__, member);
+ return member;
+}
+
+/** @brief Saves a member to it config directory
+ *
+ * @param member The member to save
+ * @param error Pointer to a error
+ * @returns TRUE if the member was saved successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_member_save(OSyncMember *member, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p:(%lli), %p)", __func__, member, member ? member->id : 0, error);
+ char *filename = NULL;
+
+ if (!osync_member_instance_default_plugin(member, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (!member->id) {
+ member->id = osync_group_create_member_id(member->group);
+ member->configdir = g_strdup_printf("%s/%lli", member->group->configdir, member->id);
+ }
+
+ g_assert(member->configdir);
+ if (!g_file_test(member->configdir, G_FILE_TEST_IS_DIR)) {
+ osync_debug("OSMEM", 3, "Creating config directory: %s for member %i", member->configdir, member->id);
+ if (mkdir(member->configdir, 0700)) {
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to create directory for member %li\n", member->id);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+ }
+
+ //Saving the syncmember.conf
+ filename = g_strdup_printf ("%s/syncmember.conf", member->configdir);
+ xmlDocPtr doc;
+ doc = xmlNewDoc((xmlChar*)"1.0");
+ doc->children = xmlNewDocNode(doc, NULL, (xmlChar*)"syncmember", NULL);
+ //The plugin name
+ xmlNewTextChild(doc->children, NULL, (xmlChar*)"pluginname", (xmlChar*)member->pluginname);
+ //The name
+ xmlNewTextChild(doc->children, NULL, (xmlChar*)"name", (xmlChar*)member->name);
+ xmlSaveFile(filename, doc);
+ xmlFreeDoc(doc);
+ g_free(filename);
+
+ //Saving the config if it exists
+ osync_bool ret = TRUE;
+ if (member->configdata) {
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+
+ if (functions.store_config) {
+ ret = functions.store_config(member->configdir, member->configdata, member->configsize);
+ } else {
+ filename = g_strdup_printf("%s/%s.conf", member->configdir, osync_plugin_get_name(member->plugin));
+ if (!osync_file_write(filename, member->configdata, member->configsize, 0600, error)) {
+ ret = FALSE;
+ }
+ g_free(filename);
+ }
+ g_free(member->configdata);
+ member->configdata = NULL;
+ member->configsize = 0;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, osync_error_print(error));
+ return ret;
+}
+
+/** @brief Gets the unique id of a member
+ *
+ * @param member The member
+ * @returns The id of the member thats unique in its group
+ *
+ */
+long long int osync_member_get_id(OSyncMember *member)
+{
+ g_assert(member);
+ return member->id;
+}
+
+/** @brief Makes a custom call to the plugin that the member has instanced
+ *
+ * A custom function on the plugin must have the form (void *, void *, OSyncError **)
+ *
+ * @param member The member
+ * @param function The name of the function on the plugin to call
+ * @param data The custom data to pass as the second arg to the function on the plugin
+ * @param error A pointer to a error
+ * @returns The return value of the function call
+ *
+ */
+void *osync_member_call_plugin(OSyncMember *member, const char *function, void *data, OSyncError **error)
+{
+ if (!osync_member_instance_default_plugin(member, error))
+ return FALSE;
+
+ void *(*plgfunc) (void *, void *, OSyncError **);
+ if (!(plgfunc = osync_plugin_get_function(member->plugin, function, error)))
+ return NULL;
+ return plgfunc(member->plugindata, data, error);
+}
+
+/** @brief Sets the slow-sync for a given object type on a member
+ *
+ * @param member The member
+ * @param objtypestr The name of the object type for which to set slow-sync
+ * @param slow_sync Set to TRUE if you want slow-sync, to FALSE if you want normal fast-sync (or remove slow-sync)
+ *
+ */
+void osync_member_set_slow_sync(OSyncMember *member, const char *objtypestr, osync_bool slow_sync)
+{
+ g_assert(member);
+ OSyncGroup *group = osync_member_get_group(member);
+ g_assert(group);
+
+ osync_group_set_slow_sync(group, objtypestr, slow_sync);
+}
+
+/** @brief Returns if slow-sync has been set for a object type
+ *
+ * @param member The member
+ * @param objtypestr The name of the object type to look up
+ * @returns TRUE if slow-sync is enabled, FALSE otherwise
+ *
+ */
+osync_bool osync_member_get_slow_sync(OSyncMember *member, const char *objtypestr)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, member, objtypestr);
+ g_assert(member);
+ OSyncGroup *group = osync_member_get_group(member);
+ g_assert(group);
+
+ osync_bool needs_slow_sync = osync_group_get_slow_sync(group, objtypestr);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, needs_slow_sync);
+ return needs_slow_sync;
+}
+
+/** @brief Requests synchronization from the sync engine
+ *
+ * @param member The member
+ *
+ */
+void osync_member_request_synchronization(OSyncMember *member)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, member);
+ g_assert(member);
+
+ if (member->memberfunctions->rf_sync_alert)
+ member->memberfunctions->rf_sync_alert(member);
+ else {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Alert not handled", __func__);
+ return;
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+
+/** @brief Makes random data of a object type that could be writen to the given member
+ *
+ * @param member The member
+ * @param change The change that will receive the random data
+ * @param objtypename The name of the object type for which to create random data
+ * @returns The sink of the member that could store this data
+ *
+ */
+OSyncObjFormatSink *osync_member_make_random_data(OSyncMember *member, OSyncChange *change, const char *objtypename)
+{
+ int retry = 0;
+ g_assert(member);
+ OSyncFormatEnv *env = osync_member_get_format_env(member);
+
+ OSyncObjFormatSink *format_sink = NULL;
+
+ for (retry = 0; retry < 100; retry++) {
+ if (retry > 20) {
+ osync_trace(TRACE_INTERNAL, "%s: Giving up", __func__);
+ return NULL; //Giving up
+ }
+
+ //Select a random objtype
+ OSyncObjType *objtype = NULL;
+ int selected = 0;
+ if (!objtypename) {
+ selected = g_random_int_range(0, g_list_length(env->objtypes));
+ objtype = g_list_nth_data(env->objtypes, selected);
+ } else
+ objtype = osync_conv_find_objtype(member->group->conv_env, objtypename);
+ osync_change_set_objtype(change, objtype);
+
+ //Select a random objformat
+ if (!g_list_length(objtype->formats)) {
+ osync_trace(TRACE_INTERNAL, "%s: Next. No formats", __func__);
+ continue;
+ }
+ OSyncObjFormat *format = NULL;
+ selected = g_random_int_range(0, g_list_length(objtype->formats));
+ format = g_list_nth_data(objtype->formats, selected);
+
+ if (!format->create_func) {
+ osync_trace(TRACE_INTERNAL, "%s: Next. Format %s has no create function", __func__, format->name);
+ continue;
+ }
+ //Create the data
+ format->create_func(change);
+
+ osync_change_set_objformat(change, format);
+ //Convert the data to a format the plugin understands
+ OSyncObjTypeSink *objtype_sink = osync_member_find_objtype_sink(member, objtype->name);
+ if (!objtype_sink) {
+ osync_trace(TRACE_INTERNAL, "%s: Next. No objtype sink for %s", __func__, objtype->name);
+ continue; //We had a objtype we cannot add
+ }
+
+ selected = g_random_int_range(0, g_list_length(objtype_sink->formatsinks));
+ format_sink = g_list_nth_data(objtype_sink->formatsinks, selected);
+ /*FIXME: use multiple sinks, or what? */
+ OSyncError *error = NULL;
+ if (!osync_change_convert(env, change, format_sink->format, &error)) {
+ osync_trace(TRACE_INTERNAL, "%s: Next. Unable to convert: %s", __func__, osync_error_print(&error));
+ continue; //Unable to convert to selected format
+ }
+
+ break;
+ }
+ return format_sink;
+}
+
+
+/** @brief Returns the custom data of a member
+ *
+ * @param member The member
+ * @returns The custom data
+ *
+ */
+void *osync_member_get_data(OSyncMember *member)
+{
+ g_assert(member);
+ return member->enginedata;
+}
+
+/** @brief Sets the custom data on a member
+ *
+ * @param member The member
+ * @param data The custom data
+ *
+ */
+void osync_member_set_data(OSyncMember *member, void *data)
+{
+ g_assert(member);
+ member->enginedata = data;
+}
+
+/** @brief Gets the group in which the member is stored
+ *
+ * @param member The member
+ * @returns The parental group
+ *
+ */
+OSyncGroup *osync_member_get_group(OSyncMember *member)
+{
+ g_assert(member);
+ return member->group;
+}
+
+/** @brief Searches for a member by its id
+ *
+ * @param group The group in which to search
+ * @param id The id of the member
+ * @returns The member, or NULL if not found
+ *
+ */
+OSyncMember *osync_member_from_id(OSyncGroup *group, int id)
+{
+ OSyncMember *member;
+ int i;
+ for (i = 0; i < osync_group_num_members(group); i++) {
+ member = osync_group_nth_member(group, i);
+ if (member->id == id) {
+ return member;
+ }
+ }
+ osync_debug("OSPLG", 0, "Couldnt find the member with the id %i", id);
+ return NULL;
+}
+
+
+
+/** @brief Returns if a certain object type is enabled on this member
+ *
+ * @param member The member
+ * @param objtype The name of the object type to check
+ * @returns TRUE if the object type is enabled, FALSE otherwise
+ *
+ */
+osync_bool osync_member_objtype_enabled(OSyncMember *member, const char *objtype)
+{
+ g_assert(member);
+ OSyncObjTypeSink *sink = osync_member_find_objtype_sink(member, objtype);
+ g_assert(sink);
+ return sink->enabled;
+}
+
+/** @brief Enables or disables a object type on a member
+ *
+ * @param member The member
+ * @param objtypestr The name of the object type to change
+ * @param enabled Set to TRUE if you want to sync the object type, FALSE otherwise
+ *
+ * Note: this function should be called only after sink information for the member
+ * is available (osync_member_require_sink_info())
+ *
+ * @todo Change function interface to not require the plugin to be instanced manually.
+ * See comments on osync_group_set_objtype_enabled()
+ */
+void osync_member_set_objtype_enabled(OSyncMember *member, const char *objtypestr, osync_bool enabled)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %i)", __func__, member, objtypestr, enabled);
+ OSyncObjTypeSink *sink = NULL;
+ g_assert(member);
+
+ if (osync_conv_objtype_is_any(objtypestr)) {
+ GList *o = NULL;
+ for (o = member->objtype_sinks; o; o = o->next) {
+ OSyncObjTypeSink *sink = o->data;
+ sink->enabled = enabled;
+ }
+ } else {
+ GList *o = NULL;
+ for (o = member->objtype_sinks; o; o = o->next) {
+ sink = o->data;
+ if (!strcmp(sink->objtype->name, objtypestr))
+ break;
+ sink = NULL;
+ }
+
+ if (!sink) {
+ osync_trace(TRACE_EXIT_ERROR, "Unable to find sink with name \"%s\"", objtypestr);
+ return;
+ }
+ sink->enabled = enabled;
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSyncMemberFunctions OpenSync Member Functions
+ * @ingroup OSyncPublic
+ * @brief The functions that can be used to access the device that a member represents
+ *
+ */
+/*@{*/
+
+/** @brief Initialize a member
+ *
+ * Calls the initialize function on a plugin
+ *
+ * @param member The member
+ * @param error A pointer to a error
+ * @returns TRUE if the plugin initialized successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_member_initialize(OSyncMember *member, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, member, error);
+ if (!osync_member_instance_default_plugin(member, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ g_assert(member);
+ g_assert(member->plugin);
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ g_assert(functions.initialize);
+ if (!(member->plugindata = functions.initialize(member, error))) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/** @brief Finalizes a plugin
+ *
+ * Calls the finalize function on a plugin
+ *
+ * @param member The member
+ *
+ */
+void osync_member_finalize(OSyncMember *member)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, member);
+ g_assert(member);
+ g_assert(member->plugin);
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ if (functions.finalize)
+ functions.finalize(member->plugindata);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Queries a plugin for the changed objects since the last sync
+ *
+ * Calls the get_changeinfo function on a plugin
+ *
+ * @param member The member
+ * @param function The function that will receive the answer to this call
+ * @param user_data User data that will be passed on to the callback function
+ *
+ */
+void osync_member_get_changeinfo(OSyncMember *member, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, member, function, user_data);
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+ if (!functions.get_changeinfo) {
+ osync_context_report_error(context, OSYNC_ERROR_GENERIC, "No get_changeinfo function was given");
+ osync_trace(TRACE_EXIT_ERROR, "%s: No get_changeinfo function was given", __func__);
+ return;
+ }
+ functions.get_changeinfo(context);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Reads a single object by its uid
+ *
+ * Calls the read_change function on the plugin
+ *
+ * @param member The member
+ * @param change The change to read. The change must have the uid set
+ * @param function The function that will receive the answer to this call
+ * @param user_data User data that will be passed on to the callback function
+ *
+ */
+void osync_member_read_change(OSyncMember *member, OSyncChange *change, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, member, change, function, user_data);
+
+ g_assert(change);
+ g_assert(change->uid);
+ g_assert(osync_change_get_objformat(change));
+
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+
+ //search for the right formatsink
+ GList *i;
+ osync_debug("OSYNC", 2, "Searching for sink");
+ for (i = member->format_sinks; i; i = i->next) {
+ OSyncObjFormatSink *fmtsink = i->data;
+
+ if (fmtsink->format == osync_change_get_objformat(change)) {
+ //Read the change
+ g_assert(fmtsink->functions.read != NULL);
+ fmtsink->functions.read(context, change);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+ }
+ }
+
+ osync_context_report_error(context, OSYNC_ERROR_CONVERT, "Unable to send changes");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to find a sink", __func__);
+}
+
+/** @brief Checks if the member has a read method for the given objtype
+ *
+ * @param member The member
+ * @param objtype The objtype for which to check the read methid
+ * @return TRUE if the member has read function, FALSE otherwise
+ *
+ */
+osync_bool osync_member_has_read_function(OSyncMember *member, OSyncObjType *objtype)
+{
+ GList *i;
+ for (i = member->format_sinks; i; i = i->next) {
+ OSyncObjFormatSink *fmtsink = i->data;
+
+ if (osync_objformat_get_objtype(fmtsink->format) == objtype)
+ return fmtsink->functions.read ? TRUE : FALSE;
+ }
+ return FALSE;
+}
+
+/** @brief Gets the "real" data of a object
+ *
+ * Calls the get_data function on the plugin
+ *
+ * @param member The member
+ * @param change The change. The must be returned from a call to get_changeinfo
+ * @param function The function that will receive the answer to this call
+ * @param user_data User data that will be passed on to the callback function
+ *
+ */
+void osync_member_get_change_data(OSyncMember *member, OSyncChange *change, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, member, change, function, user_data);
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ g_assert(change != NULL);
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+ functions.get_data(context, change);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Connects a member to its device
+ *
+ * Calls the connect function on a plugin
+ *
+ * @param member The member
+ * @param function The function that will receive the answer to this call
+ * @param user_data User data that will be passed on to the callback function
+ *
+ */
+void osync_member_connect(OSyncMember *member, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, member, function, user_data);
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+ if (!functions.connect) {
+ osync_context_report_error(context, OSYNC_ERROR_GENERIC, "No connect function was given");
+ osync_trace(TRACE_EXIT_ERROR, "%s: No connect function was given", __func__);
+ return;
+ }
+ functions.connect(context);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Disconnects a member from its device
+ *
+ * Calls the disconnect function on a plugin
+ *
+ * @param member The member
+ * @param function The function that will receive the answer to this call
+ * @param user_data User data that will be passed on to the callback function
+ *
+ */
+void osync_member_disconnect(OSyncMember *member, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, member, function, user_data);
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+ if (!functions.disconnect) {
+ osync_context_report_error(context, OSYNC_ERROR_GENERIC, "No disconnect function was given");
+ osync_trace(TRACE_EXIT_ERROR, "%s: No disconnect function was given", __func__);
+ return;
+ }
+ functions.disconnect(context);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Tells the plugin that the sync was successfull
+ *
+ * Calls the sync_done function on a plugin
+ *
+ * @param member The member
+ * @param function The function that will receive the answer to this call
+ * @param user_data User data that will be passed on to the callback function
+ *
+ */
+void osync_member_sync_done(OSyncMember *member, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, member, function, user_data);
+ OSyncPluginFunctions functions = member->plugin->info.functions;
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+ osync_member_set_slow_sync(member, "data", FALSE);
+ if (functions.sync_done) {
+ functions.sync_done(context);
+ } else {
+ osync_context_report_success(context);
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/** @brief Commits a change to the device
+ *
+ * Calls the commit_change function on a plugin
+ *
+ * @param member The member
+ * @param change The change to write
+ * @param function The function that will receive the answer to this call
+ * @param user_data User data that will be passed on to the callback function
+ *
+ */
+void osync_member_commit_change(OSyncMember *member, OSyncChange *change, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, member, change, function, user_data);
+ g_assert(member);
+ g_assert(change);
+
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+
+
+ OSyncObjType *type = osync_change_get_objtype(change);
+
+ /* This is just an optmization:
+ *
+ * the path search function will avoid doing
+ * cross-objtype conversions, so
+ * if we already have a sink for the original objtype,
+ * and it is disabled, we can drop the change
+ * without doing detection/conversion first.
+ *
+ * If the objtype will change during conversion,
+ * we check the right objtype sink later,
+ * anyway
+ */
+ OSyncObjTypeSink *sink = osync_member_find_objtype_sink(member, type->name);
+ if (sink && !sink->enabled) {
+ osync_context_report_success(context);
+ osync_trace(TRACE_EXIT, "%s: Sink not enabled", __func__);
+ return;
+ }
+
+
+ //The destobjtype is the objtype of the format to which
+ //the change was just converted
+ change->destobjtype = g_strdup(osync_change_get_objtype(change)->name);
+
+ //Filter the change.
+ if (!osync_filter_change_allowed(member, change)) {
+ osync_context_report_success(context);
+ osync_trace(TRACE_EXIT, "%s: Change filtered", __func__);
+ return;
+ }
+
+ //search for the right formatsink, now that
+ //the change was converted
+ GList *i;
+ osync_debug("OSYNC", 2, "Searching for sink");
+ for (i = member->format_sinks; i; i = i->next) {
+ OSyncObjFormatSink *fmtsink = i->data;
+
+ osync_debug("OSYNC", 2, "Comparing change %s with sink %s", osync_change_get_objformat(change)->name, fmtsink->format ? fmtsink->format->name : "None");
+ if (fmtsink->format == osync_change_get_objformat(change)) {
+ if (fmtsink->functions.batch_commit) {
+ //Append to the stored changes
+ fmtsink->commit_changes = g_list_append(fmtsink->commit_changes, change);
+ fmtsink->commit_contexts = g_list_append(fmtsink->commit_contexts, context);
+ osync_trace(TRACE_EXIT, "%s: Waiting for batch processing", __func__);
+ return;
+ } else {
+ // Send the change
+ if (!fmtsink->functions.commit_change) {
+ osync_context_report_error(context, OSYNC_ERROR_GENERIC, "No commit_change function was given");
+ osync_trace(TRACE_EXIT_ERROR, "%s: No commit_change function was given", __func__);
+ return;
+ }
+ fmtsink->functions.commit_change(context, change);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+ }
+ }
+ }
+
+ osync_context_report_error(context, OSYNC_ERROR_CONVERT, "Unable to send changes");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to find a sink", __func__);
+}
+
+/** @brief Tells the plugin that all changes have been committed
+ *
+ * Calls the committed_all function on a plugin or the batch_commit function
+ * depending on which function the plugin wants to use.
+ *
+ * @param member The member
+ * @param function The callback that will receive the answer
+ * @param user_data The userdata to pass to the callback
+ *
+ */
+void osync_member_committed_all(OSyncMember *member, OSyncEngCallback function, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, member);
+ OSyncChange **changes = NULL;
+ OSyncContext **contexts = NULL;
+
+ OSyncContext *context = osync_context_new(member);
+ context->callback_function = function;
+ context->calldata = user_data;
+
+ GList *pendingchanges = NULL;
+ GList *pendingcontexts = NULL;
+
+ GList *f;
+ for (f = member->format_sinks; f; f = f->next) {
+ OSyncObjFormatSink *fmtsink = f->data;
+ osync_debug("OSYNC", 2, "Sending changes to sink %p:%s", fmtsink, fmtsink->format ? fmtsink->format->name : "None");
+
+ OSyncFormatFunctions functions = fmtsink->functions;
+
+ if (functions.batch_commit) {
+ pendingchanges = g_list_concat(pendingchanges, fmtsink->commit_changes);
+ pendingcontexts = g_list_concat(pendingcontexts, fmtsink->commit_contexts);
+
+ fmtsink->commit_changes = NULL;
+ fmtsink->commit_contexts = NULL;
+ }
+ }
+
+ f = member->format_sinks;
+ if (f) {
+ OSyncObjFormatSink *fmtsink = f->data;
+ osync_debug("OSYNC", 2, "Sending committed all to sink %p:%s", fmtsink, fmtsink->format ? fmtsink->format->name : "None");
+
+ OSyncFormatFunctions functions = fmtsink->functions;
+
+ if (functions.batch_commit) {
+ int i = 0;
+ changes = g_malloc0(sizeof(OSyncChange *) * (g_list_length(pendingchanges) + 1));
+ contexts = g_malloc0(sizeof(OSyncContext *) * (g_list_length(pendingcontexts) + 1));;
+ GList *o = pendingcontexts;
+ GList *c = NULL;
+
+ for (c = pendingchanges; c && o; c = c->next) {
+ OSyncChange *change = c->data;
+ OSyncContext *context = o->data;
+
+ changes[i] = change;
+ contexts[i] = context;
+
+ i++;
+ o = o->next;
+ }
+
+ g_list_free(pendingchanges);
+ g_list_free(pendingcontexts);
+
+ functions.batch_commit(context, contexts, changes);
+
+ g_free(changes);
+ g_free(contexts);
+ } else if (functions.committed_all) {
+ functions.committed_all(context);
+ } else {
+ osync_context_report_success(context);
+ }
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_member_set_name(OSyncMember *member, const char *name)
+{
+ g_assert(member);
+ if (member->name)
+ g_free(member->name);
+ member->name = g_strdup(name);
+}
+
+const char *osync_member_get_name(OSyncMember *member)
+{
+ return member->name;
+}
+
+/** @brief Adds random data to a member
+ *
+ * Generates random data and writes it to the plugin. The plugin must support the access
+ * function. This function is mainly used for testing plugins.
+ *
+ * @param member The member on which to add random data
+ * @param objtype The name of the object type to add
+ * @returns The change that was added or NULL if adding the data was not successfull
+ *
+ */
+OSyncChange *osync_member_add_random_data(OSyncMember *member, const char *objtype)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, member);
+ OSyncContext *context = osync_context_new(member);
+ OSyncChange *change = osync_change_new();
+ change->changetype = CHANGE_ADDED;
+ OSyncObjFormatSink *format_sink;
+ if (!(format_sink = osync_member_make_random_data(member, change, objtype))) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to make random data", __func__);
+ return NULL;
+ }
+
+ if (!format_sink->functions.access) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: No access function", __func__);
+ return NULL;
+ }
+
+ if (!format_sink->functions.access(context, change)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to write change", __func__);
+ return NULL;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, change);
+ return change;
+}
+
+/** @brief Modifies random data on a member
+ *
+ * The plugin must support the access
+ * function. This function is mainly used for testing plugins.
+ *
+ * @param member The member on which to add random data
+ * @param change The change that should be modified. It must have the uid set.
+ * @returns TRUE if the changes was modified successfully, FALSE otherwise
+ *
+ */
+osync_bool osync_member_modify_random_data(OSyncMember *member, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, member, change);
+ OSyncContext *context = osync_context_new(member);
+ change->changetype = CHANGE_MODIFIED;
+ OSyncObjFormatSink *format_sink;
+ char *uid = g_strdup(osync_change_get_uid(change));
+
+ if (!(format_sink = osync_member_make_random_data(member, change, osync_change_get_objtype(change)->name))) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to make random data", __func__);
+ return FALSE;
+ }
+
+ osync_change_set_uid(change, uid);
+
+ if (!format_sink->functions.access) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: No access function", __func__);
+ return FALSE;
+ }
+
+ if (!format_sink->functions.access(context, change)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to modify change", __func__);
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/** @brief Deletes data from a device
+ *
+ * The plugin must support the access function. This is mainly
+ * used for testing plugins.
+ *
+ * @param member The member from which to delete
+ * @param change The change to delete. The uid must be set
+ * @returns TRUE if the change was deleted, FALSE otherwise
+ *
+ */
+osync_bool osync_member_delete_data(OSyncMember *member, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, member, change);
+ OSyncContext *context = osync_context_new(member);
+ change->changetype = CHANGE_DELETED;
+
+ OSyncObjTypeSink *objtype_sink = osync_member_find_objtype_sink(member, osync_change_get_objtype(change)->name);
+ if (!objtype_sink) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to find objsink for %s", __func__, osync_change_get_objtype(change)->name);
+ return FALSE;
+ }
+
+ OSyncObjFormat *format = osync_change_get_objformat(change);
+ OSyncObjFormatSink *format_sink = osync_objtype_find_format_sink(objtype_sink, format->name);
+ if (!format_sink) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to find format sink for %s", __func__, format->name);
+ return FALSE;
+ }
+
+ if (format_sink->functions.batch_commit) {
+ //Append to the stored changes
+ format_sink->commit_changes = g_list_append(format_sink->commit_changes, change);
+ format_sink->commit_contexts = g_list_append(format_sink->commit_contexts, context);
+ osync_trace(TRACE_EXIT, "%s: Waiting for batch processing", __func__);
+ return TRUE;
+ } else {
+ if (!format_sink->functions.access) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: No access function", __func__);
+ return FALSE;
+ }
+
+ if (!format_sink->functions.access(context, change)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to modify change", __func__);
+ return FALSE;
+ }
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/*@}*/
+
+
+/** Write the list of objtypes that had slow-sync set to a message */
+void osync_member_write_sink_info(OSyncMember *member, OSyncMessage *message)
+{
+ GList *obj = NULL;
+ for (osync_member_get_objtype_sinks(member, &obj, NULL); obj; obj = obj->next) {
+ OSyncObjTypeSink *sink = obj->data;
+ int slow;
+ slow = osync_member_get_slow_sync(member, sink->objtype->name);
+ osync_message_write_string(message, sink->objtype->name);
+ osync_message_write_int(message, sink->read);
+ osync_message_write_int(message, sink->write);
+ osync_message_write_int(message, sink->enabled);
+ osync_message_write_int(message, slow);
+ }
+ osync_message_write_string(message, NULL);
+}
+
+/** Read sink info for member
+ *
+ * @see osync_member_read_sink_info_full(), osync_member_read_sink_info()
+ */
+int __sync_member_read_sink_info(OSyncMember *member, OSyncMessage *message)
+{
+ char *objtypestr;
+ int r = 0;
+ for (;;) {
+ int read, write, enabled, slow;
+ osync_message_read_string(message, &objtypestr);
+ if (!objtypestr)
+ break;
+
+ osync_message_read_int(message, &read);
+ osync_message_read_int(message, &write);
+ osync_message_read_int(message, &enabled);
+ osync_message_read_int(message, &slow);
+
+ OSyncObjTypeSink *sink = osync_member_find_objtype_sink(member, objtypestr);
+ if (!sink)
+ continue;
+
+ sink->read = read;
+ sink->write = write;
+ sink->enabled = enabled;
+
+ if (slow) {
+ osync_member_set_slow_sync(member, objtypestr, TRUE);
+ r++;
+ }
+
+ free(objtypestr);
+ }
+ return r;
+}
+
+
+/** Read a list of objtypes that had slow-sync set, replacing old settings
+ *
+ * Please notice that this function will reset any old
+ * slow-sync setting that was set before. So, this should
+ * be used only for messages that is known to contain the
+ * complete slow-sync settings, not only for a member.
+ *
+ * i.e. this function may be used to read the slow-sync settings
+ * from the engine to osplugin, but not to read the slow-sync
+ * settings from osplugin to the engine, because osplugin doesn't
+ * know about the slow-sync settings of other members in the sync
+ * group.
+ */
+void osync_member_read_sink_info_full(OSyncMember *member, OSyncMessage *message)
+{
+ osync_group_reset_slow_sync(member->group, "data");
+ __sync_member_read_sink_info(member, message);
+}
+
+/** Read a list of objtypes that had slow-sync set, keeping old settings
+ *
+ * Please notice that this function won't reset
+ * the list of slow-sync settings, like
+ * osync_message_read_slow_sync_full_list(), but instead
+ * it will just set slow-sync for the objtypes received
+ * in the list.
+ *
+ * This function is supposed to be used when handling messages
+ * from osplugin to the engine, but NOT for messages from the engine
+ * to osplugin.
+ */
+void osync_member_read_sink_info(OSyncMember *member, OSyncMessage *message)
+{
+ int set_for_any;
+
+ set_for_any = __sync_member_read_sink_info(member, message);
+
+ if (set_for_any) {
+ /* FIXME: We must force slow-sync in "data" when some
+ * objtype is marked to slow-sync
+ *
+ * (See ticket #1011)
+ */
+ osync_member_set_slow_sync(member, "data", TRUE);
+ }
+}
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_member.h b/debian/opensync/opensync-0.22/opensync/opensync_member.h
new file mode 100644
index 00000000..25177000
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_member.h
@@ -0,0 +1,78 @@
+
+/*! @brief Represents the functions that a member will call to inform the syncengine */
+typedef struct OSyncMemberFunctions {
+ /** The callback function that will receive the new changes from the plugins */
+ void (* rf_change) (OSyncMember *, OSyncChange *, void *);
+ /** The callback function that will receive custom message calls from the plugin */
+ void *(* rf_message) (OSyncMember *, const char *, void *, osync_bool);
+ /** The callback function that will receive sync alerts from the plugin */
+ void (* rf_sync_alert) (OSyncMember *);
+ /** The callback function that will receive log messages */
+ void (*rf_log) (OSyncMember *, char *);
+} OSyncMemberFunctions;
+
+typedef void (* OSyncEngCallback)(OSyncMember *, void *, OSyncError **);
+
+OSyncMember *osync_member_new(OSyncGroup *group);
+void osync_member_free(OSyncMember *member);
+
+osync_bool osync_member_instance_plugin(OSyncMember *member, const char *pluginname, OSyncError **error);
+OSyncPlugin *osync_member_get_plugin(OSyncMember *member);
+
+const char *osync_member_get_configdir(OSyncMember *member);
+osync_bool osync_member_get_config(OSyncMember *member, char **data, int *size, OSyncError **error);
+osync_bool osync_member_get_config_or_default(OSyncMember *member, char **data, int *size, OSyncError **error);
+osync_bool osync_member_need_config(OSyncMember *member, OSyncConfigurationTypes *type, OSyncError **error);
+
+void osync_member_set_config(OSyncMember *member, const char *data, int size);
+osync_bool osync_member_has_configuration(OSyncMember *member);
+const char *osync_member_get_pluginname(OSyncMember *member);
+osync_bool osync_member_initialize(OSyncMember *member, OSyncError **error);
+void *osync_member_get_enginedata(OSyncMember *member);
+void osync_member_set_enginedata(OSyncMember *member, void *data);
+void *osync_member_get_report_function(OSyncMember *member);
+void osync_member_set_report_function(OSyncMember *member, void *function);
+OSyncGroup *osync_member_get_group(OSyncMember *member);
+void *osync_member_get_data(OSyncMember *member);
+void osync_member_set_data(OSyncMember *member, void *data);
+OSyncMemberFunctions *osync_member_get_memberfunctions(OSyncMember *member);
+OSyncMember *osync_member_from_id(OSyncGroup *group, int id);
+OSyncChange *osync_member_get_changeentry(OSyncMember *member, char *uid);
+int osync_member_num_changeentries(OSyncMember *member);
+OSyncChange *osync_member_nth_changeentry(OSyncMember *member, int n);
+long long int osync_member_get_id(OSyncMember *member);
+OSyncMember *osync_member_load(OSyncGroup *group, const char *path, OSyncError **error);
+osync_bool osync_member_save(OSyncMember *member, OSyncError **error);
+void osync_member_connect(OSyncMember *member, OSyncEngCallback function, void *user_data);
+void osync_member_disconnect(OSyncMember *member, OSyncEngCallback function, void *user_data);
+void osync_member_get_changeinfo(OSyncMember *member, OSyncEngCallback function, void *user_data);
+void osync_member_read_change(OSyncMember *member, OSyncChange *change, OSyncEngCallback function, void *user_data);
+void osync_member_committed_all(OSyncMember *member, OSyncEngCallback function, void *user_data);
+void osync_member_set_name(OSyncMember *member, const char *name);
+const char *osync_member_get_name(OSyncMember *member);
+
+void *osync_member_call_plugin(OSyncMember *member, const char *function, void *data, OSyncError **error);
+void osync_member_commit_change(OSyncMember *member, OSyncChange *change, OSyncEngCallback function, void *user_data);
+void osync_member_get_change_data(OSyncMember *member, OSyncChange *change, OSyncEngCallback function, void *user_data);
+OSyncFormatEnv *osync_member_get_format_env(OSyncMember *member);
+void osync_member_sync_done(OSyncMember *member, OSyncEngCallback function, void *user_data);
+OSyncChange *osync_member_find_change(OSyncMember *member, const char *uid);
+void osync_member_add_changeentry(OSyncMember *member, OSyncChange *entry);
+void osync_member_request_synchronization(OSyncMember *member);
+OSyncChange *osync_member_add_random_data(OSyncMember *member, const char *objtype);
+void osync_member_finalize(OSyncMember *member);
+void osync_member_remove_changeentry(OSyncMember *member, OSyncChange *entry);
+osync_bool osync_member_modify_random_data(OSyncMember *member, OSyncChange *change);
+osync_bool osync_member_delete_data(OSyncMember *member, OSyncChange *change);
+void osync_member_set_slow_sync(OSyncMember *member, const char *objtypestr, osync_bool slow_sync);
+osync_bool osync_member_get_slow_sync(OSyncMember *member, const char *objtypestr);
+osync_bool osync_member_objtype_enabled(OSyncMember *member, const char *objtype);
+osync_bool osync_member_update_change(OSyncMember *member, OSyncChange **change);
+void osync_member_set_objtype_enabled(OSyncMember *member, const char *objtypestr, osync_bool enabled);
+void osync_member_set_pluginname(OSyncMember *member, const char *pluginname);
+void osync_member_set_configdir(OSyncMember *member, const char *configdir);
+void *osync_member_get_plugindata(OSyncMember *member);
+osync_bool osync_member_has_read_function(OSyncMember *member, OSyncObjType *objtype);
+
+void *osync_member_get_loop(OSyncMember *member);
+void osync_member_set_loop(OSyncMember *member, void *loop);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_member_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_member_internals.h
new file mode 100644
index 00000000..7b48796d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_member_internals.h
@@ -0,0 +1,57 @@
+
+/*! @brief A member of a group which represent a single device */
+struct OSyncMember {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ long long int id;
+ char *configdir;
+ char *configdata;
+ int configsize;
+ OSyncPlugin *plugin;
+ OSyncMemberFunctions *memberfunctions;
+ OSyncGroup *group;
+
+ void *enginedata;
+ void *plugindata;
+
+ /* List of sinks, by format
+ *
+ * Note: only use this field after calling osync_member_require_sink_info()
+ *
+ * @todo Add osync_member_get_format_sinks() function
+ * @todo Review users of format_sinks to check if they may
+ * possibly fail silently if sink information isn't available
+ */
+ GList *format_sinks;
+
+ /* List of sinks, by objtype
+ *
+ * Note: only use this field using osync_member_get_objtype_sinks(), or
+ * after calling osync_member_require_sink_info()
+ */
+ GList *objtype_sinks;
+
+
+ char *pluginname;
+ char *name;
+
+ //For the filters
+ GList *accepted_objtypes;
+ GList *filters;
+
+ char *extension;
+
+ void *loop;
+#endif
+};
+
+OSyncObjTypeSink *osync_member_find_objtype_sink(OSyncMember *member, const char *objtypestr);
+void osync_member_select_format(OSyncMember *member, OSyncObjTypeSink *objsink);
+osync_bool osync_member_instance_default_plugin(OSyncMember *member, OSyncError **error);
+OSyncObjFormatSink *osync_member_make_random_data(OSyncMember *member, OSyncChange *change, const char *objtypename);
+osync_bool osync_member_get_objtype_sinks(OSyncMember *member, GList **list_ptr, OSyncError **error);
+osync_bool osync_member_require_sink_info(OSyncMember *member, OSyncError **error);
+
+void osync_member_write_sink_info(OSyncMember *member, OSyncMessage *message);
+void osync_member_read_sink_info(OSyncMember *member, OSyncMessage *message);
+void osync_member_read_sink_info_full(OSyncMember *member, OSyncMessage *message);
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_message.c b/debian/opensync/opensync-0.22/opensync/opensync_message.c
new file mode 100644
index 00000000..9d9b5556
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_message.c
@@ -0,0 +1,253 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @ingroup OSEngineMessage
+ * @brief A Message used by the inter thread messaging library
+ *
+ */
+
+/*@{*/
+
+/*! @brief Creates a new message of the given type
+ *
+ * This function will create a new message of the given type, with
+ * the given parent and signal name. The parent will be passed to the OSyncMessageHandler
+ *
+ * @param parent Who send this message. Can be any pointer.
+ * @param msgname The name of the message
+ * @param type The type of this message
+ * @returns Pointer to a newly allocated message
+ *
+ */
+OSyncMessage *osync_message_new(OSyncMessageCommand cmd, int size, OSyncError **error)
+{
+ OSyncMessage *message = osync_try_malloc0(sizeof(OSyncMessage), error);
+ if (!message)
+ return NULL;
+
+ message->cmd = cmd;
+ message->refCount = 1;
+ if (size > 0)
+ message->buffer = g_byte_array_sized_new( size );
+ else
+ message->buffer = g_byte_array_new();
+ message->buffer_read_pos = 0;
+ return message;
+}
+
+void osync_message_ref(OSyncMessage *message)
+{
+ g_atomic_int_inc(&(message->refCount));
+}
+
+void osync_message_unref(OSyncMessage *message)
+{
+ if (g_atomic_int_dec_and_test(&(message->refCount))) {
+
+ g_byte_array_free(message->buffer, TRUE);
+
+ g_free(message);
+ }
+}
+
+/*! @brief Sets the handler that will receive the reply
+ *
+ * @param message The message to work on
+ * @param replyqueue Which queue should receive the reply
+ * @param handler Which handler should be called when the reply is received
+ * @param user_data Which user data should be passed to the handler
+ *
+ */
+void osync_message_set_handler(OSyncMessage *message, OSyncMessageHandler handler, gpointer user_data)
+{
+ osync_trace(TRACE_INTERNAL, "%p handler to %p", message, user_data);
+ message->user_data = user_data;
+ message->callback = handler;
+}
+
+/*! @brief Creates a new reply
+ *
+ * @param parent Who send this message. Can be any pointer.
+ * @param message The message to which you wish to reply
+ * @returns Pointer to a newly allocated message
+ *
+ */
+OSyncMessage *osync_message_new_reply(OSyncMessage *message, OSyncError **error)
+{
+ OSyncMessage *reply = osync_message_new(OSYNC_MESSAGE_REPLY, 0, error);
+ if (!reply)
+ return NULL;
+
+ reply->id1 = message->id1;
+ reply->id2 = message->id2;
+ return reply;
+}
+
+/*! @brief Creates a new error reply
+ *
+ * @param parent Who send this message. Can be any pointer.
+ * @param message The message to which you wish to reply
+ * @returns Pointer to a newly allocated message
+ */
+OSyncMessage *osync_message_new_errorreply(OSyncMessage *message, OSyncError **error)
+{
+ OSyncMessage *reply = osync_message_new(OSYNC_MESSAGE_ERRORREPLY, 0, error);
+ if (!reply)
+ return NULL;
+
+ reply->id1 = message->id1;
+ reply->id2 = message->id2;
+ return reply;
+}
+
+OSyncMessage *osync_message_new_error(OSyncError *error, OSyncError **loc_error)
+{
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_ERROR, 0, loc_error);
+ if (!message)
+ return NULL;
+
+ osync_marshal_error(message, error);
+
+ return message;
+}
+
+/*! @brief Checks if the message is a error
+ *
+ * @param message The message to check
+ * @return #TRUE if the message is a error, #FALSE otherwise
+ *
+ */
+gboolean osync_message_is_error(OSyncMessage *message)
+{
+ if (message->cmd == OSYNC_MESSAGE_ERRORREPLY)
+ return TRUE;
+ return FALSE;
+}
+
+osync_bool osync_message_is_answered(OSyncMessage *message)
+{
+ return message->is_answered;
+}
+
+void osync_message_set_answered(OSyncMessage *message)
+{
+ message->is_answered = TRUE;
+}
+
+/*! @brief Gets the command from a message
+ *
+ * This function will return the command of a message
+ *
+ * @param message The message
+ * @returns the command
+ */
+OSyncMessageCommand osync_message_get_command(OSyncMessage *message)
+{
+ g_assert(message);
+ return message->cmd;
+}
+
+/*@}*/
+
+void osync_message_write_int(OSyncMessage *message, int value)
+{
+ g_byte_array_append( message->buffer, (unsigned char*)&value, sizeof( int ) );
+}
+
+void osync_message_write_long_long_int(OSyncMessage *message, long long int value)
+{
+ g_byte_array_append( message->buffer, (unsigned char*)&value, sizeof( long long int ) );
+}
+
+void osync_message_write_string(OSyncMessage *message, const char *value)
+{
+ int length = 0;
+ if (value == NULL) {
+ length = -1;
+ g_byte_array_append( message->buffer, (unsigned char*)&length, sizeof( int ) );
+ } else {
+ int length = strlen( value ) + 1;
+ g_byte_array_append( message->buffer, (unsigned char*)&length, sizeof( int ) );
+ g_byte_array_append( message->buffer, (unsigned char*)value, length );
+ }
+}
+
+void osync_message_write_data(OSyncMessage *message, const void *value, int size)
+{
+ g_byte_array_append( message->buffer, value, size );
+}
+
+void osync_message_read_int(OSyncMessage *message, int *value)
+{
+ memcpy(value, &(message->buffer->data[ message->buffer_read_pos ]), sizeof(int));
+ message->buffer_read_pos += sizeof(int);
+}
+
+void osync_message_read_long_long_int(OSyncMessage *message, long long int *value)
+{
+ memcpy(value, &(message->buffer->data[ message->buffer_read_pos ]), sizeof(long long int));
+ message->buffer_read_pos += sizeof(long long int);
+}
+
+void osync_message_read_const_string(OSyncMessage *message, char **value)
+{
+ int length = 0;
+ memcpy(&length, &(message->buffer->data[ message->buffer_read_pos ]), sizeof(int));
+ message->buffer_read_pos += sizeof(int);
+
+ if (length == -1) {
+ *value = NULL;
+ return;
+ }
+ *value = (char *)&(message->buffer->data[message->buffer_read_pos]);
+ message->buffer_read_pos += length;
+}
+
+void osync_message_read_string(OSyncMessage *message, char **value)
+{
+ int length = 0;
+ memcpy(&length, &(message->buffer->data[ message->buffer_read_pos ]), sizeof(int));
+ message->buffer_read_pos += sizeof(int);
+
+ if (length == -1) {
+ *value = NULL;
+ return;
+ }
+ *value = (char*)malloc(length);
+ memcpy(*value, &(message->buffer->data[ message->buffer_read_pos ]), length );
+ message->buffer_read_pos += length;
+}
+
+void osync_message_read_const_data(OSyncMessage *message, void **value, int size)
+{
+ *value = &(message->buffer->data[message->buffer_read_pos]);
+ message->buffer_read_pos += size;
+}
+
+void osync_message_read_data(OSyncMessage *message, void *value, int size)
+{
+ memcpy(value, &(message->buffer->data[ message->buffer_read_pos ]), size );
+ message->buffer_read_pos += size;
+}
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_message_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_message_internals.h
new file mode 100644
index 00000000..33c1bece
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_message_internals.h
@@ -0,0 +1,116 @@
+#ifndef _OPENSYNC_MESSAGES_INTERNALS_H
+#define _OPENSYNC_MESSAGES_INTERNALS_H
+
+/**
+ * @defgroup OSEngineMessage OpenSync Message Internals
+ * @ingroup OSEnginePrivate
+ * @brief A Message used by the inter thread messaging library
+ *
+ */
+
+/*@{*/
+
+/*! @brief The Type of the message
+ *
+ */
+typedef enum {
+ OSYNC_MESSAGE_NOOP,
+ OSYNC_MESSAGE_CONNECT,
+ OSYNC_MESSAGE_DISCONNECT,
+ OSYNC_MESSAGE_GET_CHANGES,
+ OSYNC_MESSAGE_GET_CHANGEDATA,
+ OSYNC_MESSAGE_COMMIT_CHANGE,
+ OSYNC_MESSAGE_COMMITTED_ALL,
+ OSYNC_MESSAGE_SYNC_DONE,
+ OSYNC_MESSAGE_CALL_PLUGIN,
+ OSYNC_MESSAGE_NEW_CHANGE,
+ OSYNC_MESSAGE_REPLY,
+ OSYNC_MESSAGE_ERRORREPLY,
+ OSYNC_MESSAGE_INITIALIZE,
+ OSYNC_MESSAGE_FINALIZE,
+ OSYNC_MESSAGE_SYNCHRONIZE,
+ OSYNC_MESSAGE_ENGINE_CHANGED,
+ OSYNC_MESSAGE_MAPPING_CHANGED,
+ OSYNC_MESSAGE_MAPPINGENTRY_CHANGED,
+ OSYNC_MESSAGE_ERROR,
+ OSYNC_MESSAGE_QUEUE_ERROR,
+ OSYNC_MESSAGE_QUEUE_HUP,
+ OSYNC_MESSAGE_SYNC_ALERT,
+} OSyncMessageCommand;
+
+/*! @brief Function which can receive messages
+ *
+ * @param sender The sender of the received reply
+ * @param message The reply that is being received.
+ * @param user_data The userdata which was set previously
+ *
+ */
+typedef void (*OSyncMessageHandler)(OSyncMessage *message, void *user_data);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct timeout_info {
+ OSyncQueue *sendingqueue;
+ OSyncMessage *message;
+ GSource *source;
+ void *replysender;
+ OSyncQueue *replyqueue;
+ int timeout;
+ gboolean (*timeoutfunc)(gpointer);
+} timeout_info;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+/*! @brief A OSyncMessage
+ *
+ */
+struct OSyncMessage {
+ gint refCount;
+ /** The type of this message */
+ OSyncMessageCommand cmd;
+ /** The name of the message*/
+ long long int id1;
+ int id2;
+ /** Where should the reply be received? */
+ OSyncMessageHandler callback;
+ /** The user data */
+ gpointer user_data;
+ /** The timeout associated with this message */
+ timeout_info *to_info;
+ /** If this message has already been answered */
+ osync_bool is_answered;
+ /** The pointer to the internal **/
+ GByteArray *buffer;
+ /** The current read position **/
+ int buffer_read_pos;
+};
+
+/*@}*/
+
+OSyncMessage *osync_message_new(OSyncMessageCommand cmd, int size, OSyncError **error);
+OSyncMessage *osync_message_new_reply(OSyncMessage *message, OSyncError **error);
+OSyncMessage *osync_message_new_errorreply(OSyncMessage *message, OSyncError **error);
+OSyncMessage *osync_message_new_error(OSyncError *error, OSyncError **loc_error);
+void osync_message_ref(OSyncMessage *message);
+void osync_message_unref(OSyncMessage *message);
+
+void osync_message_set_handler(OSyncMessage *message, OSyncMessageHandler handler, gpointer user_data);
+gboolean osync_message_is_error(OSyncMessage *message);
+osync_bool osync_message_send_message(OSyncMessage *message, OSyncError **error);
+osync_bool osync_message_send_with_timeout(OSyncMessage *message, OSyncQueue *queue, OSyncQueue *replyQueue, int timeout, OSyncError **error);
+OSyncMessageCommand osync_message_get_command(OSyncMessage *message);
+void osync_message_reset_timeout(OSyncMessage *message);
+osync_bool osync_message_is_answered(OSyncMessage *message);
+void osync_message_set_answered(OSyncMessage *message);
+
+void osync_message_write_int(OSyncMessage *message, int value);
+void osync_message_write_long_long_int(OSyncMessage *message, long long int value);
+void osync_message_write_string(OSyncMessage *message, const char *value);
+void osync_message_write_data(OSyncMessage *message, const void *value, int size);
+
+void osync_message_read_int(OSyncMessage *message, int *value);
+void osync_message_read_long_long_int(OSyncMessage *message, long long int *value);
+void osync_message_read_string(OSyncMessage *message, char **value);
+void osync_message_read_data(OSyncMessage *message, void *value, int size);
+void osync_message_read_const_data(OSyncMessage *message, void **value, int size);
+void osync_message_read_const_string(OSyncMessage *message, char **value);
+
+#endif
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_plugin.c b/debian/opensync/opensync-0.22/opensync/opensync_plugin.c
new file mode 100644
index 00000000..c3765e4a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_plugin.c
@@ -0,0 +1,608 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+
+/**
+ * @defgroup OSyncPluginPrivateAPI OpenSync Plugin Internals
+ * @ingroup OSyncPrivate
+ * @brief The private part of the plugins API
+ *
+ */
+/*@{*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+OSyncObjTypeSink *osync_objtype_sink_from_template(OSyncGroup *group, OSyncObjTypeTemplate *template)
+{
+ g_assert(group);
+ g_assert(template);
+ OSyncObjTypeSink *sink = g_malloc0(sizeof(OSyncObjTypeSink));
+ OSyncObjType *type = osync_conv_find_objtype(group->conv_env, template->name);
+ if (!type) {
+ osync_debug("OSYNC", 0, "Unable to find objtype named %s to create objtype sink", template->name);
+ return NULL;
+ }
+ sink->objtype = type;
+ sink->enabled = TRUE;
+ sink->write = TRUE;
+ sink->read = TRUE;
+ return sink;
+}
+
+OSyncObjFormatSink *osync_objformat_sink_from_template(OSyncGroup *group, OSyncObjFormatTemplate *template)
+{
+ OSyncObjFormatSink *sink = g_malloc0(sizeof(OSyncObjFormatSink));
+ OSyncObjFormat *format = osync_conv_find_objformat(group->conv_env, template->name);
+ if (!format)
+ return NULL;
+ sink->format = format;
+ sink->functions.commit_change = template->commit_change;
+ sink->functions.access = template->access;
+ sink->functions.read = template->read;
+ sink->functions.committed_all = template->committed_all;
+ sink->functions.batch_commit = template->batch_commit;
+ sink->extension_name = g_strdup(template->extension_name);
+ return sink;
+}
+
+OSyncObjTypeTemplate *osync_plugin_find_objtype_template(OSyncPlugin *plugin, const char *objtypestr)
+{
+ GList *o;
+ for (o = plugin->accepted_objtypes; o; o = o->next) {
+ OSyncObjTypeTemplate *template = o->data;
+ if (!strcmp(template->name, objtypestr))
+ return template;
+ }
+ return NULL;
+}
+
+OSyncObjFormatTemplate *osync_plugin_find_objformat_template(OSyncObjTypeTemplate *type_template, const char *objformatstr)
+{
+ GList *f;
+ for (f = type_template->formats; f; f = f->next) {
+ OSyncObjFormatTemplate *template = f->data;
+ if (!strcmp(template->name, objformatstr))
+ return template;
+ }
+ return NULL;
+}
+
+OSyncObjFormatSink *osync_objtype_find_format_sink(OSyncObjTypeSink *sink, const char *formatstr)
+{
+ GList *f;
+ for (f = sink->formatsinks; f; f = f->next) {
+ OSyncObjFormatSink *sink = f->data;
+ if (!strcmp(sink->format->name, formatstr))
+ return sink;
+ }
+ return NULL;
+}
+
+void _osync_format_set_commit(OSyncObjTypeTemplate *template, const char *formatstr, OSyncFormatCommitFn commit_change)
+{
+ OSyncObjFormatTemplate *format_template = NULL;
+ if (formatstr) {
+ OSyncObjFormatTemplate *format_template = osync_plugin_find_objformat_template(template, formatstr);
+ osync_assert_msg(format_template, "Unable to set commit function. Did you forget to add the objformat?");
+ format_template->commit_change = commit_change;
+ } else {
+ GList *f = NULL;
+ for (f = template->formats; f; f = f->next) {
+ format_template = f->data;
+ format_template->commit_change = commit_change;
+ }
+ }
+}
+
+void _osync_format_set_access(OSyncObjTypeTemplate *template, const char *formatstr, OSyncFormatAccessFn access)
+{
+ OSyncObjFormatTemplate *format_template = NULL;
+ if (formatstr) {
+ format_template = osync_plugin_find_objformat_template(template, formatstr);
+ osync_assert_msg(format_template, "Unable to set commit function. Did you forget to add the objformat?");
+ format_template->access = access;
+ } else {
+ GList *f = NULL;
+ for (f = template->formats; f; f = f->next) {
+ format_template = f->data;
+ format_template->access = access;
+ }
+ }
+}
+
+void _osync_format_set_batch(OSyncObjTypeTemplate *template, const char *formatstr, OSyncFormatBatchCommitFn batch)
+{
+ OSyncObjFormatTemplate *format_template = NULL;
+ if (formatstr) {
+ format_template = osync_plugin_find_objformat_template(template, formatstr);
+ osync_assert_msg(format_template, "Unable to set batch commit function. Did you forget to add the objformat?");
+ format_template->batch_commit = batch;
+ } else {
+ GList *f = NULL;
+ for (f = template->formats; f; f = f->next) {
+ format_template = f->data;
+ format_template->batch_commit = batch;
+ }
+ }
+}
+#endif
+
+/*@}*/
+
+/**
+ * @defgroup OSyncPluginAPI OpenSync Plugin
+ * @ingroup OSyncPublic
+ * @brief Functions to register and manage plugins
+ *
+ */
+/*@{*/
+
+/*! @brief This will create a new plugin struct
+ *
+ * The plugin struct represents a sync plugin
+ *
+ * @param env For which environment to register this plugin. May be NULL
+ * @returns A pointer to a newly allocated plugin.
+ *
+ */
+OSyncPlugin *osync_plugin_new(OSyncEnv *env)
+{
+ OSyncPlugin *plugin = g_malloc0(sizeof(OSyncPlugin));
+ g_assert(plugin);
+ memset(&(plugin->info), 0, sizeof(plugin->info));
+ memset(&(plugin->info.functions), 0, sizeof(plugin->info.functions));
+ memset(&(plugin->info.timeouts), 0, sizeof(plugin->info.timeouts));
+
+ //Set the default timeouts;
+ plugin->info.timeouts.connect_timeout = 60;
+ plugin->info.timeouts.sync_done_timeout = 60;
+ plugin->info.timeouts.disconnect_timeout = 60;
+ plugin->info.timeouts.get_changeinfo_timeout = 60;
+ plugin->info.timeouts.get_data_timeout = 60;
+ plugin->info.timeouts.commit_timeout = 60;
+ plugin->info.timeouts.read_change_timeout = 60;
+
+ plugin->info.plugin = plugin;
+ plugin->info.config_type = NEEDS_CONFIGURATION;
+
+ if (env) {
+ env->plugins = g_list_append(env->plugins, plugin);
+ plugin->env = env;
+ plugin->real_plugin = env->current_module;
+ }
+
+ return plugin;
+}
+
+
+/*! @brief Registers a new plugin
+ *
+ * This function creates a new OSyncPluginInfo object, that
+ * can be used to register a new plugin dynamically. This
+ * can be used by a module to register multiple plugins,
+ * instead of using get_info() function, that allows
+ * registering of only one plugin.
+ */
+OSyncPluginInfo *osync_plugin_new_info(OSyncEnv *env)
+{
+ OSyncPlugin *plg = osync_plugin_new(env);
+ osync_trace(TRACE_INTERNAL, "%s(%p): %p", __func__, env, plg);
+ if (!plg)
+ return NULL;
+
+ return &plg->info;
+}
+
+/*! @brief Used to free a plugin
+ *
+ * Frees a plugin
+ *
+ * @param plugin Pointer to the plugin
+ *
+ */
+void osync_plugin_free(OSyncPlugin *plugin)
+{
+ osync_trace(TRACE_INTERNAL, "osync_plugin_free(%p)", plugin);
+ g_assert(plugin);
+ if (plugin->env)
+ plugin->env->plugins = g_list_remove(plugin->env->plugins, plugin);
+
+ //FIXME Free more stuff?
+ g_free(plugin);
+}
+
+/*! @brief Used to look up a symbol on the plugin
+ *
+ * Looks up and returns a function
+ *
+ * @param plugin Pointer to the plugin
+ * @param name The name of the function to look up
+ * @param error Pointer to a error struct
+ * @return Pointer to the function
+ *
+ */
+void *osync_plugin_get_function(OSyncPlugin *plugin, const char *name, OSyncError **error)
+{
+ void *function;
+ if (!plugin->real_plugin) {
+ osync_debug("OSPLG", 1, "You need to load a plugin before getting a function");
+ osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "You need to load a plugin before getting a function");
+ return NULL;
+ }
+
+ if (!g_module_symbol (plugin->real_plugin, name, &function)) {
+ osync_debug("OSPLG", 0, "Unable to locate symbol %s on plugin", name);
+ osync_error_set(error, OSYNC_ERROR_PARAMETER, "Unable to locate symbol %s: %s", name, g_module_error());
+ return NULL;
+ }
+ return function;
+}
+
+/*! @brief dlopen()s a format plugin
+ *
+ * The get_info() function on the format plugin gets called
+ *
+ * @param env The environment in which to open the plugin
+ * @param path Where to find this plugin
+ * @param error Pointer to a error struct
+ * @return Pointer to the plugin on success, NULL otherwise
+ *
+ */
+osync_bool osync_module_load(OSyncEnv *env, const char *path, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, env, path, error);
+ /* Check if this platform supports dynamic
+ * loading of modules */
+
+ if (!g_module_supported()) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "This platform does not support loading of modules");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ /* Try to open the module or fail if an error occurs */
+ GModule *module = g_module_open(path, 0);
+ if (!module) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to open module %s: %s", path, g_module_error());
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ /* Load the get_info symbol */
+ void (* fct_info)(OSyncEnv *env) = NULL;
+ void (** fct_infop)(OSyncEnv *env) = &fct_info;
+ if (!g_module_symbol(module, "get_info", (void **)fct_infop)) {
+ /* If there is no get_info symbol, the file must be a implementation library
+ * for one of the other modules. So dont throw an error error since it has been
+ * confusing users */
+ osync_trace(TRACE_EXIT, "%s: Not loading implementation library", __func__);
+ return TRUE;
+ }
+ env->modules = g_list_append(env->modules, module);
+
+ /* Call the get_info function */
+ env->current_module = module;
+ fct_info(env);
+ env->current_module = NULL;
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, module);
+ return TRUE;
+}
+
+/*! @brief Closes a module
+ *
+ * @param env The environment from which to remove the module
+ * @param module The module to unload
+ *
+ */
+void osync_module_unload(OSyncEnv *env, GModule *module)
+{
+ osync_trace(TRACE_INTERNAL, "%s(%p, %p)", __func__, env, module);
+ //FIXME Close the module! This crashes the evo2 plugin at the moment, i have no idea why...
+ //g_module_close(plugin->real_plugin);
+ env->modules = g_list_remove(env->modules, module);
+}
+
+/*! @brief Loads the modules from a given directory
+ *
+ * Loads all modules from a directory into a osync environment
+ *
+ * @param env Pointer to a OSyncEnv environment
+ * @param path The path where to look for plugins, NULL for the default sync module directory
+ * @param must_exist If set to TRUE, this function will return an error if the directory does not exist
+ * @param error Pointer to a error struct to return a error
+ * @returns TRUE on success, FALSE otherwise
+ *
+ */
+osync_bool osync_module_load_dir(OSyncEnv *env, const char *path, osync_bool must_exist, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, env, path, error);
+ GDir *dir;
+ GError *gerror = NULL;
+ char *filename = NULL;
+
+ if (!path) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Not path given to load the modules from");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ //Load all available shared libraries (plugins)
+ if (!g_file_test(path, G_FILE_TEST_IS_DIR)) {
+ if (must_exist) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Path is not loadable");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ } else {
+ osync_trace(TRACE_EXIT, "%s: Directory does not exist (non-fatal)", __func__);
+ return TRUE;
+ }
+ }
+
+ dir = g_dir_open(path, 0, &gerror);
+ if (!dir) {
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to open directory %s: %s", path, gerror->message);
+ g_error_free(gerror);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ const gchar *de = NULL;
+ while ((de = g_dir_read_name(dir))) {
+ filename = g_strdup_printf ("%s/%s", path, de);
+
+ if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR) || g_file_test(filename, G_FILE_TEST_IS_SYMLINK) || !g_pattern_match_simple("*.so", filename)) {
+ g_free(filename);
+ continue;
+ }
+
+ OSyncError *error = NULL;
+ if (!osync_module_load(env, filename, &error)) {
+ osync_debug("OSPLG", 0, "Unable to load plugin %s: %s", filename, error->message);
+ osync_error_free(&error);
+ }
+ g_free(filename);
+ }
+ g_dir_close(dir);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/*! @brief Returns the name of the loaded plugin
+ *
+ * @param plugin Pointer to the plugin
+ * @returns Name of the plugin
+ *
+ */
+const char *osync_plugin_get_name(OSyncPlugin *plugin)
+{
+ g_assert(plugin);
+ return plugin->info.name;
+}
+
+/*! @brief Returns the long name of the loaded plugin
+ *
+ * @param plugin Pointer to the plugin
+ * @returns Long name of the plugin
+ *
+ */
+const char *osync_plugin_get_longname(OSyncPlugin *plugin)
+{
+ g_assert(plugin);
+ return plugin->info.longname;
+}
+
+/*! @brief Returns the description of the plugin
+ *
+ * @param plugin Pointer to the plugin
+ * @returns Description of the plugin
+ *
+ */
+const char *osync_plugin_get_description(OSyncPlugin *plugin)
+{
+ g_assert(plugin);
+ return plugin->info.description;
+}
+
+/*! @brief Returns the timeouts of the plugin
+ *
+ * @param plugin Pointer to the plugin
+ * @returns Timeouts of the plugin
+ *
+ */
+OSyncPluginTimeouts osync_plugin_get_timeouts(OSyncPlugin *plugin)
+{
+ g_assert(plugin);
+ return plugin->info.timeouts;
+}
+
+/*! @brief Returns the plugin_info data, set by the plugin
+ *
+ * @param plugin Pointer to the plugin
+ * @returns The void pointer set on plugin->info.plugin_data
+ */
+void *osync_plugin_get_plugin_data(OSyncPlugin *plugin)
+{
+ g_assert(plugin);
+ return plugin->info.plugin_data;
+}
+
+/*! @brief Get full path for plugin module
+ *
+ * @param plugin Pointer to the plugin
+ * @returns full path of plugin module
+ */
+const char *osync_plugin_get_path(OSyncPlugin *plugin)
+{
+ g_assert(plugin);
+ return g_module_name(plugin->real_plugin);
+}
+
+/*! @brief Sets the commit function of a format
+ *
+ * @param info Pointer to a plugin info struct to fill
+ * @param objtypestr The name of the object type
+ * @param formatstr The name of the format
+ * @param commit_change The pointer to your commit_change function
+ *
+ */
+void osync_plugin_set_commit_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatCommitFn commit_change)
+{
+ OSyncObjTypeTemplate *template = NULL;
+
+ if (objtypestr) {
+ OSyncObjTypeTemplate *template = osync_plugin_find_objtype_template(info->plugin, objtypestr);
+ osync_assert_msg(template, "Unable to accept objformat. Did you forget to add the objtype?");
+ _osync_format_set_commit(template, formatstr, commit_change);
+ } else {
+ GList *o = NULL;
+ for (o = info->plugin->accepted_objtypes; o; o = o->next) {
+ template = o->data;
+ _osync_format_set_commit(template, formatstr, commit_change);
+ }
+ }
+}
+
+/*! @brief Sets the access function of a format
+ *
+ * @param info Pointer to a plugin info struct to fill
+ * @param objtypestr The name of the object type
+ * @param formatstr The name of the format
+ * @param access The pointer to your access function
+ *
+ */
+void osync_plugin_set_access_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatAccessFn access)
+{
+ OSyncObjTypeTemplate *template = NULL;
+
+ if (objtypestr) {
+ //template = osync_plugin_find_objtype_template(info->plugin, objtypestr);
+ //osync_assert_msg(template, "Unable to accept objformat. Did you forget to add the objtype?");
+ //_osync_format_set_access(template, formatstr, access);
+ } else {
+ GList *o = NULL;
+ for (o = info->plugin->accepted_objtypes; o; o = o->next) {
+ template = o->data;
+ _osync_format_set_access(template, formatstr, access);
+ }
+ }
+}
+
+/*! @brief Sets the read function of a format
+ *
+ * @param info Pointer to a plugin info struct to fill
+ * @param objtypestr The name of the object type
+ * @param formatstr The name of the format
+ * @param read The pointer to your read function
+ *
+ */
+void osync_plugin_set_read_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatReadFn read)
+{
+ OSyncObjTypeTemplate *template = osync_plugin_find_objtype_template(info->plugin, objtypestr);
+ osync_assert_msg(template, "Unable to accept objformat. Did you forget to add the objtype?");
+ OSyncObjFormatTemplate *format_template = osync_plugin_find_objformat_template(template, formatstr);
+ osync_assert_msg(format_template, "Unable to set commit function. Did you forget to add the objformat?");
+ format_template->read = read;
+}
+
+/*! @brief Sets the batch_commit function of a format
+ *
+ * @param info Pointer to a plugin info struct to fill
+ * @param objtypestr The name of the object type
+ * @param formatstr The name of the format
+ * @param batch The pointer to your batch_commit function
+ *
+ */
+void osync_plugin_set_batch_commit_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatBatchCommitFn batch)
+{
+ OSyncObjTypeTemplate *template = NULL;
+
+ if (objtypestr) {
+ template = osync_plugin_find_objtype_template(info->plugin, objtypestr);
+ osync_assert_msg(template, "Unable to accept objformat. Did you forget to add the objtype?");
+ _osync_format_set_batch(template, formatstr, batch);
+ } else {
+ GList *o = NULL;
+ for (o = info->plugin->accepted_objtypes; o; o = o->next) {
+ template = o->data;
+ _osync_format_set_batch(template, formatstr, batch);
+ }
+ }
+}
+
+/*! @brief Sets the committed_all function of a format
+ *
+ * @param info Pointer to a plugin info struct to fill
+ * @param objtypestr The name of the object type
+ * @param formatstr The name of the format
+ * @param committed_all The pointer to your committed_all function
+ *
+ */
+void osync_plugin_set_committed_all_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatCommittedAllFn committed_all)
+{
+ OSyncObjTypeTemplate *template = osync_plugin_find_objtype_template(info->plugin, objtypestr);
+ osync_assert_msg(template, "Unable to accept objformat. Did you forget to add the objtype?");
+ OSyncObjFormatTemplate *format_template = osync_plugin_find_objformat_template(template, formatstr);
+ osync_assert_msg(format_template, "Unable to set committed_all function. Did you forget to add the objformat?");
+ format_template->committed_all = committed_all;
+}
+
+/*! @brief Tells opensync that the plugin can accepts this object
+ *
+ * Tells opensync that the plugin can accepts this object. Used by the plugin
+ * in the get_info() function
+ *
+ * @param info The plugin info on which to operate
+ * @param objtypestr The name of the object which to accept
+ *
+ */
+void osync_plugin_accept_objtype(OSyncPluginInfo *info, const char *objtypestr)
+{
+ OSyncObjTypeTemplate *template = g_malloc0(sizeof(OSyncObjTypeTemplate));
+ template->name = g_strdup(objtypestr);
+ info->plugin->accepted_objtypes = g_list_append(info->plugin->accepted_objtypes, template);
+}
+
+/*! @brief Tells opensync that the plugin can accepts this format for the given object
+ *
+ * Tells opensync that the plugin can accepts this format. Used by the plugin
+ * in the get_info() function
+ *
+ * @param info The plugin info on which to operate
+ * @param objtypestr The name of the objecttype
+ * @param formatstr The name of the format to accept
+ * @param extension The name of the extension that the plugin wants. NULL if none
+ *
+ */
+void osync_plugin_accept_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, const char *extension)
+{
+ OSyncObjTypeTemplate *template = osync_plugin_find_objtype_template(info->plugin, objtypestr);
+ osync_assert_msg(template, "Unable to accept objformat. Did you forget to add the objtype?");
+ OSyncObjFormatTemplate *format_template = g_malloc0(sizeof(OSyncObjFormatTemplate));
+ format_template->name = g_strdup(formatstr);
+ if (extension)
+ format_template->extension_name = g_strdup(extension);
+ template->formats = g_list_append(template->formats, format_template);
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_plugin.h b/debian/opensync/opensync-0.22/opensync/opensync_plugin.h
new file mode 100644
index 00000000..a465234a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_plugin.h
@@ -0,0 +1,141 @@
+
+/*! @brief The functions that can be called on a plugin
+ * @ingroup OSyncPluginAPI
+ **/
+typedef struct OSyncPluginFunctions {
+ /** The function that gets a configuration file for this plugin (optional) */
+ osync_bool (* get_config) (char *, char **, int *);
+ /** The function that stores the configuration file for this plugin (optional) */
+ osync_bool (* store_config) (char *, const char *, int);
+ /** A function to check if the backend is available. (optional) */
+ osync_bool (* is_available) (OSyncError **);
+ /** The function to initialize the plugin. */
+ void * (* initialize) (OSyncMember *, OSyncError **);
+ /** The function to finalize the plugin. The input will be the output of the initialize function */
+ void (* finalize) (void *);
+ /** Make a connection to your device here */
+ void (* connect) (OSyncContext *);
+ /** This function gets called if the sync was successfull (Optional) */
+ void (* sync_done) (OSyncContext *ctx);
+ /** Disconnect from the device */
+ void (* disconnect) (OSyncContext *);
+ /** Get all available changes here. */
+ void (* get_changeinfo) (OSyncContext *);
+ /** Get the data for a change here (Optional) */
+ void (* get_data) (OSyncContext *, OSyncChange *);
+ /** */
+} OSyncPluginFunctions;
+
+/*! @brief The timeouts for the asynchronous functions of a plugin
+ *
+ * The default timeout it 60 seconds. Set this to 0 if you dont want
+ * to have a timeout
+ *
+ * @ingroup OSyncPluginAPI
+ **/
+typedef struct OSyncPluginTimeouts {
+ /** The timeout of the connect function */
+ unsigned int connect_timeout;
+ /** The timeout of the syncdone function */
+ unsigned int sync_done_timeout;
+ /** The timeout of the disconnect function */
+ unsigned int disconnect_timeout;
+ /** The timeout of the function that gets the changes */
+ unsigned int get_changeinfo_timeout;
+ /** The timeout of the function that gets the data of change */
+ unsigned int get_data_timeout;
+ /** The timeout of the commit function */
+ unsigned int commit_timeout;
+ /** The timeout of the function that reads a change */
+ unsigned int read_change_timeout;
+} OSyncPluginTimeouts;
+
+typedef osync_bool (* OSyncFormatCommitFn) (OSyncContext *, OSyncChange *);
+typedef osync_bool (* OSyncFormatAccessFn) (OSyncContext *, OSyncChange *);
+typedef void (* OSyncFormatCommittedAllFn) (OSyncContext *);
+typedef void (* OSyncFormatReadFn) (OSyncContext *, OSyncChange *);
+typedef void (* OSyncFormatBatchCommitFn) (OSyncContext *, OSyncContext **, OSyncChange **);
+
+/*! @brief The functions for accessing formats on a plugin
+ * @ingroup OSyncPluginAPI
+ **/
+typedef struct OSyncFormatFunctions {
+ /** The commit function of this format */
+ OSyncFormatCommitFn commit_change;
+ /** The function that will be called once the plugin has received all commits */
+ OSyncFormatCommittedAllFn committed_all;
+ /** This function will be called by opensync with an array of changes to commit */
+ OSyncFormatBatchCommitFn batch_commit;
+ /** The function to write a change WITHOUT updating hashtables or similar stuff */
+ OSyncFormatAccessFn access;
+ /** The function to read a change by its uid */
+ OSyncFormatReadFn read;
+} OSyncFormatFunctions;
+
+/*! @brief Gives information about wether the plugin
+ * has to be configured or not
+ *
+ * @ingroup OSyncPluginAPI
+ **/
+typedef enum {
+ /** Plugin has no configuration options */
+ NO_CONFIGURATION = 0,
+ /** Plugin can be configured, but will accept the default config in the initialize function */
+ OPTIONAL_CONFIGURATION = 1,
+ /** Plugin must be configured to run correctly */
+ NEEDS_CONFIGURATION = 2
+} OSyncConfigurationTypes;
+
+/*! @brief Gives information about a plugin
+ * @ingroup OSyncPluginAPI
+ **/
+typedef struct OSyncPluginInfo {
+ /** The version of Opensync API this plugin uses*/
+ int version;
+ /** The name of this plugin */
+ const char *name;
+ /** The longer, more descriptive name of the plugin */
+ const char *longname;
+ /** A short description what the plugin does */
+ const char *description;
+ /** Is this plugin considered thread-safe? (unused atm) */
+ osync_bool is_threadsafe;
+ /** The functions of your plugin */
+ OSyncPluginFunctions functions;
+ /** The timeouts of your plugin */
+ OSyncPluginTimeouts timeouts;
+ /** Does the plugin have configuration options? */
+ OSyncConfigurationTypes config_type;
+ /** The pointer to the plugin (for internal use) */
+ OSyncPlugin *plugin;
+ /** Plugin-specific data
+ *
+ * Can be used when a single module registers many plugins,
+ * such as the python-module plugin
+ */
+ void *plugin_data;
+} OSyncPluginInfo;
+
+OSyncPlugin *osync_plugin_new(OSyncEnv *env);
+OSyncPluginInfo *osync_plugin_new_info(OSyncEnv *env);
+void osync_plugin_free(OSyncPlugin *plugin);
+
+osync_bool osync_module_load(OSyncEnv *env, const char *path, OSyncError **error);
+osync_bool osync_module_load_dir(OSyncEnv *env, const char *path, osync_bool must_exist, OSyncError **oserror);
+
+OSyncPlugin *osync_plugin_from_name(OSyncEnv *osinfo, const char *name);
+const char *osync_plugin_get_name(OSyncPlugin *plugin);
+const char *osync_plugin_get_longname(OSyncPlugin *plugin);
+const char *osync_plugin_get_description(OSyncPlugin *plugin);
+OSyncPluginTimeouts osync_plugin_get_timeouts(OSyncPlugin *plugin);
+void *osync_plugin_get_plugin_data(OSyncPlugin *plugin);
+const char *osync_plugin_get_path(OSyncPlugin *plugin);
+
+void *osync_plugin_get_function(OSyncPlugin *plugin, const char *name, OSyncError **error);
+void osync_plugin_accept_objtype(OSyncPluginInfo *info, const char *objtypestr);
+void osync_plugin_accept_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, const char *extension);
+void osync_plugin_set_commit_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatCommitFn commit_change);
+void osync_plugin_set_access_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatAccessFn access_fn);
+void osync_plugin_set_read_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatReadFn read_fn);
+void osync_plugin_set_batch_commit_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatBatchCommitFn batch);
+void osync_plugin_set_committed_all_objformat(OSyncPluginInfo *info, const char *objtypestr, const char *formatstr, OSyncFormatCommittedAllFn committed_all);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_plugin_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_plugin_internals.h
new file mode 100644
index 00000000..d00eae50
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_plugin_internals.h
@@ -0,0 +1,21 @@
+
+/*! @brief Represent a synchronzation plugin
+ * @ingroup OSyncPluginPrivateAPI
+ **/
+struct OSyncPlugin {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GModule *real_plugin;
+// char *path;
+ OSyncPluginInfo info;
+ GList *accepted_objtypes;
+ OSyncEnv *env;
+#endif
+};
+
+OSyncObjTypeSink *osync_objtype_sink_from_template(OSyncGroup *group, OSyncObjTypeTemplate *template);
+OSyncObjFormatSink *osync_objformat_sink_from_template(OSyncGroup *group, OSyncObjFormatTemplate *template);
+OSyncObjTypeTemplate *osync_plugin_find_objtype_template(OSyncPlugin *plugin, const char *objtypestr);
+OSyncObjFormatTemplate *osync_plugin_find_objformat_template(OSyncObjTypeTemplate *type_template, const char *objformatstr);
+OSyncObjFormatSink *osync_objtype_find_format_sink(OSyncObjTypeSink *sink, const char *formatstr);
+
+void osync_module_unload(OSyncEnv *env, GModule *module);
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_queue.c b/debian/opensync/opensync-0.22/opensync/opensync_queue.c
new file mode 100644
index 00000000..9510bef3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_queue.c
@@ -0,0 +1,914 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <fcntl.h>
+#include <sys/poll.h>
+
+#include "opensync.h"
+#include "opensync_internals.h"
+
+#include <sys/time.h>
+#include <signal.h>
+
+typedef struct OSyncPendingMessage {
+ long long int id1;
+ int id2;
+ /** Where should the reply be received? */
+ OSyncMessageHandler callback;
+ /** The user data */
+ gpointer user_data;
+} OSyncPendingMessage;
+
+/**
+ * @ingroup OSEngineQueue
+ * @brief A Queue used for asynchronous communication between thread
+ *
+ */
+
+/*@{*/
+
+static
+gboolean _incoming_prepare(GSource *source, gint *timeout_)
+{
+ *timeout_ = 1;
+ return FALSE;
+}
+
+static
+gboolean _incoming_check(GSource *source)
+{
+ OSyncQueue *queue = *((OSyncQueue **)(source + 1));
+ if (g_async_queue_length(queue->incoming) > 0)
+ return TRUE;
+
+ return FALSE;
+}
+
+/* This function is called from the master thread. The function dispatched incoming data from
+ * the remote end */
+static
+gboolean _incoming_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, user_data);
+ OSyncQueue *queue = user_data;
+
+ OSyncMessage *message = NULL;
+ while ((message = g_async_queue_try_pop(queue->incoming))) {
+ /* We check of the message is a reply to something */
+ if (message->cmd == OSYNC_MESSAGE_REPLY || message->cmd == OSYNC_MESSAGE_ERRORREPLY) {
+
+ /* Search for the pending reply. We have to lock the
+ * list since another thread might be duing the updates */
+ g_mutex_lock(queue->pendingLock);
+
+ OSyncPendingMessage *found = NULL;
+
+ GList *p = NULL;
+ for (p = queue->pendingReplies; p; p = p->next) {
+ OSyncPendingMessage *pending = p->data;
+
+ if (pending->id1 == message->id1 && pending->id2 == message->id2) {
+
+ /* Get the pending message from the queue */
+ queue->pendingReplies = g_list_remove(queue->pendingReplies, pending);
+ found = pending;
+ break;
+ }
+ }
+ g_mutex_unlock(queue->pendingLock);
+
+ if (found) {
+ /* Call the callback of the pending message and free the message */
+ osync_assert(found->callback);
+ found->callback(message, found->user_data);
+
+ g_free(found);
+ } else
+ osync_trace(TRACE_INTERNAL, "%s: No pending message for %lld:%d", __func__, message->id1, message->id2);
+
+ } else
+ queue->message_handler(message, queue->user_data);
+
+ osync_message_unref(message);
+ }
+
+ osync_trace(TRACE_EXIT, "%s: Done dispatching", __func__);
+ return TRUE;
+}
+
+static void _osync_queue_stop_incoming(OSyncQueue *queue)
+{
+ if (queue->incoming_source) {
+ g_source_destroy(queue->incoming_source);
+ queue->incoming_source = NULL;
+ }
+
+ if (queue->incomingContext) {
+ g_main_context_unref(queue->incomingContext);
+ queue->incomingContext = NULL;
+ }
+
+ if (queue->incoming_functions) {
+ g_free(queue->incoming_functions);
+ queue->incoming_functions = NULL;
+ }
+}
+
+static
+gboolean _queue_prepare(GSource *source, gint *timeout_)
+{
+ *timeout_ = 1;
+ return FALSE;
+}
+
+static
+gboolean _queue_check(GSource *source)
+{
+ OSyncQueue *queue = *((OSyncQueue **)(source + 1));
+ if (g_async_queue_length(queue->outgoing) > 0)
+ return TRUE;
+ return FALSE;
+}
+
+int _osync_queue_write_data(OSyncQueue *queue, const void *vptr, size_t n, OSyncError **error)
+{
+ ssize_t nwritten = 0;
+
+ while (n > 0) {
+ if ((nwritten = write(queue->fd, vptr, n)) <= 0) {
+ if (errno == EINTR)
+ nwritten = 0; /* and call write() again */
+ else {
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to write IPC data: %i: %s", errno, strerror(errno));
+ return (-1); /* error */
+ }
+ }
+
+ n -= nwritten;
+ vptr += nwritten;
+ }
+ return (nwritten);
+}
+
+osync_bool _osync_queue_write_long_long_int(OSyncQueue *queue, const long long int message, OSyncError **error)
+{
+ if (_osync_queue_write_data(queue, &message, sizeof(long long int), error) < 0)
+ return FALSE;
+
+ return TRUE;
+}
+
+osync_bool _osync_queue_write_int(OSyncQueue *queue, const int message, OSyncError **error)
+{
+ if (_osync_queue_write_data(queue, &message, sizeof(int), error) < 0)
+ return FALSE;
+
+ return TRUE;
+}
+
+/* This function sends the data to the remote side. If there is an error, it sends an error
+ * message to the incoming queue */
+static
+gboolean _queue_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
+{
+ OSyncQueue *queue = user_data;
+ OSyncError *error = NULL;
+
+ OSyncMessage *message = NULL;
+
+ while ((message = g_async_queue_try_pop(queue->outgoing))) {
+ /* Check if the queue is connected */
+ if (!queue->connected) {
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "Trying to send to a queue thats not connected");
+ goto error;
+ }
+
+ /*FIXME: review usage of osync_marshal_get_size_message() */
+ if (!_osync_queue_write_int(queue, message->buffer->len + osync_marshal_get_size_message(message), &error))
+ goto error;
+
+ if (!_osync_queue_write_int(queue, message->cmd, &error))
+ goto error;
+
+ if (!_osync_queue_write_long_long_int(queue, message->id1, &error))
+ goto error;
+
+ if (!_osync_queue_write_int(queue, message->id2, &error))
+ goto error;
+
+ if (message->buffer->len) {
+ int sent = 0;
+ do {
+ int written = _osync_queue_write_data(queue, message->buffer->data + sent, message->buffer->len - sent, &error);
+ if (written < 0)
+ goto error;
+
+ sent += written;
+ } while (sent < message->buffer->len);
+ }
+
+ osync_message_unref(message);
+ }
+
+ return TRUE;
+
+error:
+ if (message)
+ osync_message_unref(message);
+
+ if (error) {
+ message = osync_message_new(OSYNC_MESSAGE_QUEUE_ERROR, 0, &error);
+ if (message) {
+ osync_marshal_error(message, error);
+ g_async_queue_push(queue->incoming, message);
+ }
+
+ osync_error_free(&error);
+ }
+ return FALSE;
+}
+
+static
+gboolean _source_prepare(GSource *source, gint *timeout_)
+{
+ *timeout_ = 1;
+ return FALSE;
+}
+
+static
+int _osync_queue_read_data(OSyncQueue *queue, void *vptr, size_t n, OSyncError **error)
+{
+ size_t nleft;
+ ssize_t nread = 0;
+
+ nleft = n;
+ while (n > 0) {
+ if ((nread = read(queue->fd, vptr, nleft)) < 0) {
+ if (errno == EINTR)
+ nread = 0; /* and call read() again */
+ else {
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to read IPC data: %i: %s", errno, strerror(errno));
+ return (-1);
+ }
+ } else if (nread == 0)
+ break; /* EOF */
+
+ nleft -= nread;
+ vptr += nread;
+ }
+ return (n - nleft); /* return >= 0 */
+}
+
+static
+osync_bool _osync_queue_read_int(OSyncQueue *queue, int *message, OSyncError **error)
+{
+ int read = _osync_queue_read_data(queue, message, sizeof(int), error);
+
+ if (read < 0)
+ return FALSE;
+
+ if (read != sizeof(int)) {
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to read int. EOF");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static
+osync_bool _osync_queue_read_long_long_int(OSyncQueue *queue, long long int *message, OSyncError **error)
+{
+ int read = _osync_queue_read_data(queue, message, sizeof(long long int), error);
+
+ if (read < 0)
+ return FALSE;
+
+ if (read != sizeof(long long int)) {
+ osync_error_set(error, OSYNC_ERROR_IO_ERROR, "Unable to read int. EOF");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static
+gboolean _source_check(GSource *source)
+{
+ OSyncQueue *queue = *((OSyncQueue **)(source + 1));
+ OSyncMessage *message = NULL;
+ OSyncError *error = NULL;
+
+ if (queue->connected == FALSE) {
+ /* Ok. so we arent connected. lets check if there are pending replies. We cannot
+ * receive any data on the pipe, therefore, any pending replies will never
+ * be answered. So we return error messages for all of them. */
+ if (queue->pendingReplies) {
+ g_mutex_lock(queue->pendingLock);
+ osync_error_set(&error, OSYNC_ERROR_IO_ERROR, "Broken Pipe");
+ GList *p = NULL;
+ for (p = queue->pendingReplies; p; p = p->next) {
+ OSyncPendingMessage *pending = p->data;
+
+ message = osync_message_new(OSYNC_MESSAGE_ERRORREPLY, 0, NULL);
+ if (message) {
+ osync_marshal_error(message, error);
+
+ message->id1 = pending->id1;
+ message->id2 = pending->id2;
+
+ g_async_queue_push(queue->incoming, message);
+ }
+ }
+
+ osync_error_free(&error);
+ g_mutex_unlock(queue->pendingLock);
+ }
+
+ return FALSE;
+ }
+
+ switch (osync_queue_poll(queue)) {
+ case OSYNC_QUEUE_EVENT_NONE:
+ return FALSE;
+ case OSYNC_QUEUE_EVENT_READ:
+ return TRUE;
+ case OSYNC_QUEUE_EVENT_HUP:
+ case OSYNC_QUEUE_EVENT_ERROR:
+ queue->connected = FALSE;
+
+ /* Now we can send the hup message, and wake up the consumer thread so
+ * it can pickup the messages in the incoming queue */
+ message = osync_message_new(OSYNC_MESSAGE_QUEUE_HUP, 0, &error);
+ if (!message)
+ goto error;
+
+ g_async_queue_push(queue->incoming, message);
+
+ if (queue->incomingContext)
+ g_main_context_wakeup(queue->incomingContext);
+ return FALSE;
+ }
+
+ return FALSE;
+
+error:
+ message = osync_message_new(OSYNC_MESSAGE_QUEUE_ERROR, 0, &error);
+ if (message) {
+ osync_marshal_error(message, error);
+ g_async_queue_push(queue->incoming, message);
+ }
+ osync_error_free(&error);
+ return FALSE;
+}
+
+/* This function reads from the file descriptor and inserts incoming data into the
+ * incoming queue */
+static
+gboolean _source_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
+{
+ OSyncQueue *queue = user_data;
+ OSyncMessage *message = NULL;
+ OSyncError *error = NULL;
+
+ do {
+ int size = 0;
+ int cmd = 0;
+ long long int id1 = 0;
+ int id2 = 0;
+
+ if (!_osync_queue_read_int(queue, &size, &error))
+ goto error;
+
+ if (!_osync_queue_read_int(queue, &cmd, &error))
+ goto error;
+
+ if (!_osync_queue_read_long_long_int(queue, &id1, &error))
+ goto error;
+
+ if (!_osync_queue_read_int(queue, &id2, &error))
+ goto error;
+
+ message = osync_message_new(cmd, size, &error);
+ if (!message)
+ goto error;
+
+ message->id1 = id1;
+ message->id2 = id2;
+
+ if (size) {
+ int read = 0;
+ do {
+ int inc = _osync_queue_read_data(queue, message->buffer->data + read, size - read, &error);
+
+ if (inc < 0)
+ goto error_free_message;
+
+ if (inc == 0) {
+ osync_error_set(&error, OSYNC_ERROR_IO_ERROR, "Encountered EOF while data was missing");
+ goto error_free_message;
+ }
+
+ read += inc;
+ } while (read < size);
+ }
+
+ g_async_queue_push(queue->incoming, message);
+
+ if (queue->incomingContext)
+ g_main_context_wakeup(queue->incomingContext);
+ } while (_source_check(queue->read_source));
+
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ if (error) {
+ message = osync_message_new(OSYNC_MESSAGE_QUEUE_ERROR, 0, &error);
+ if (message) {
+ osync_marshal_error(message, error);
+ g_async_queue_push(queue->incoming, message);
+ }
+
+ osync_error_free(&error);
+ }
+
+ return FALSE;
+}
+
+/*! @brief Creates a new asynchronous queue
+ *
+ * This function return the pointer to a newly created OSyncQueue
+ *
+ */
+OSyncQueue *osync_queue_new(const char *name, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, name, error);
+
+ OSyncQueue *queue = osync_try_malloc0(sizeof(OSyncQueue), error);
+ if (!queue)
+ goto error;
+
+ if (name)
+ queue->name = g_strdup(name);
+ queue->fd = -1;
+
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+
+ queue->pendingLock = g_mutex_new();
+
+ queue->context = g_main_context_new();
+
+ queue->outgoing = g_async_queue_new();
+ queue->incoming = g_async_queue_new();
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, queue);
+ return queue;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+}
+
+/* Creates anonymous pipes which dont have to be created and are automatically connected.
+ *
+ * Lets assume parent wants to send, child wants to receive
+ *
+ * osync_queue_new_pipes()
+ * fork()
+ *
+ * Parent:
+ * connect(write_queue)
+ * disconnect(read_queue)
+ *
+ * Child:
+ * connect(read_queue)
+ * close(write_queue)
+ *
+ *
+ * */
+osync_bool osync_queue_new_pipes(OSyncQueue **read_queue, OSyncQueue **write_queue, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, read_queue, write_queue, error);
+
+ *read_queue = osync_queue_new(NULL, error);
+ if (!*read_queue)
+ goto error;
+
+ *write_queue = osync_queue_new(NULL, error);
+ if (!*write_queue)
+ goto error_free_read_queue;
+
+ int filedes[2];
+
+ if (pipe(filedes) < 0) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to create pipes");
+ goto error_free_write_queue;
+ }
+
+ (*read_queue)->fd = filedes[0];
+ (*write_queue)->fd = filedes[1];
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_write_queue:
+ osync_queue_free(*write_queue);
+error_free_read_queue:
+ osync_queue_free(*read_queue);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+void osync_queue_free(OSyncQueue *queue)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, queue);
+ OSyncMessage *message = NULL;
+ OSyncPendingMessage *pending = NULL;
+
+ g_mutex_free(queue->pendingLock);
+
+ g_main_context_unref(queue->context);
+
+ _osync_queue_stop_incoming(queue);
+
+ while ((message = g_async_queue_try_pop(queue->incoming))) {
+ osync_message_unref(message);
+ }
+ g_async_queue_unref(queue->incoming);
+
+ while ((message = g_async_queue_try_pop(queue->outgoing))) {
+ osync_message_unref(message);
+ }
+ g_async_queue_unref(queue->outgoing);
+
+ while (queue->pendingReplies) {
+ pending = queue->pendingReplies->data;
+ g_free(pending);
+ queue->pendingReplies = g_list_remove(queue->pendingReplies, pending);
+ }
+
+ if (queue->name)
+ g_free(queue->name);
+
+ g_free(queue);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+osync_bool osync_queue_exists(OSyncQueue *queue)
+{
+ return g_file_test(queue->name, G_FILE_TEST_EXISTS) ? TRUE : FALSE;
+}
+
+osync_bool osync_queue_create(OSyncQueue *queue, OSyncError **error)
+{
+ if (mkfifo(queue->name, 0600) != 0) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to create fifo");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+osync_bool osync_queue_remove(OSyncQueue *queue, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, queue, error);
+
+ if (unlink(queue->name) != 0) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to remove queue");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+static osync_bool __osync_queue_connect(OSyncQueue *queue, OSyncQueueType type, osync_bool nonblocking, OSyncError **error)
+{
+ osync_assert(queue);
+ osync_assert(queue->connected == FALSE);
+ OSyncQueue **queueptr = NULL;
+
+ queue->type = type;
+
+ if (queue->fd == -1) {
+ /* First, open the queue with the flags provided by the user */
+ int fd = open(queue->name, (type == OSYNC_QUEUE_SENDER ? O_WRONLY : O_RDONLY) | (nonblocking ? O_NONBLOCK : 0));
+ if (fd == -1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to open fifo");
+ goto error;
+ }
+ queue->fd = fd;
+
+ int oldflags = fcntl(queue->fd, F_GETFD);
+ if (oldflags == -1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get fifo flags");
+ goto error_close;
+ }
+ if (fcntl(queue->fd, F_SETFD, oldflags|FD_CLOEXEC) == -1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to set fifo flags");
+ goto error_close;
+ }
+ }
+
+ queue->connected = TRUE;
+ signal(SIGPIPE, SIG_IGN);
+
+ /* now we start a thread which handles reading/writing of the queue */
+ queue->thread = osync_thread_new(queue->context, error);
+
+ if (!queue->thread)
+ goto error;
+
+ queue->write_functions = g_malloc0(sizeof(GSourceFuncs));
+ queue->write_functions->prepare = _queue_prepare;
+ queue->write_functions->check = _queue_check;
+ queue->write_functions->dispatch = _queue_dispatch;
+ queue->write_functions->finalize = NULL;
+
+ queue->write_source = g_source_new(queue->write_functions, sizeof(GSource) + sizeof(OSyncQueue *));
+ queueptr = (OSyncQueue **)(queue->write_source + 1);
+ *queueptr = queue;
+ g_source_set_callback(queue->write_source, NULL, queue, NULL);
+ g_source_attach(queue->write_source, queue->context);
+ g_main_context_ref(queue->context);
+
+ queue->read_functions = g_malloc0(sizeof(GSourceFuncs));
+ queue->read_functions->prepare = _source_prepare;
+ queue->read_functions->check = _source_check;
+ queue->read_functions->dispatch = _source_dispatch;
+ queue->read_functions->finalize = NULL;
+
+ queue->read_source = g_source_new(queue->read_functions, sizeof(GSource) + sizeof(OSyncQueue *));
+ queueptr = (OSyncQueue **)(queue->read_source + 1);
+ *queueptr = queue;
+ g_source_set_callback(queue->read_source, NULL, queue, NULL);
+ g_source_attach(queue->read_source, queue->context);
+ g_main_context_ref(queue->context);
+
+ osync_thread_start(queue->thread);
+
+ return TRUE;
+
+error_close:
+ close(queue->fd);
+error:
+ return FALSE;
+}
+
+
+osync_bool osync_queue_connect(OSyncQueue *queue, OSyncQueueType type, OSyncError **error)
+{
+ return __osync_queue_connect(queue, type, FALSE, error);
+}
+
+osync_bool osync_queue_try_connect(OSyncQueue *queue, OSyncQueueType type, OSyncError **error)
+{
+ return __osync_queue_connect(queue, type, TRUE, error);
+}
+
+osync_bool osync_queue_disconnect(OSyncQueue *queue, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, queue, error);
+ osync_assert(queue);
+
+ if (queue->thread) {
+ osync_thread_stop(queue->thread);
+ osync_thread_free(queue->thread);
+ queue->thread = NULL;
+ }
+
+ //g_source_unref(queue->write_source);
+
+ if (queue->write_functions)
+ g_free(queue->write_functions);
+
+ //g_source_unref(queue->read_source);
+
+ _osync_queue_stop_incoming(queue);
+
+ /* We have to empty the incoming queue if we disconnect the queue. Otherwise, the
+ * consumer threads might try to pick up messages even after we are done. */
+ OSyncMessage *message = NULL;
+ while ((message = g_async_queue_try_pop(queue->incoming))) {
+ osync_message_unref(message);
+ }
+
+ if (close(queue->fd) != 0) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to close queue");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ queue->fd = -1;
+ queue->connected = FALSE;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+osync_bool osync_queue_is_connected(OSyncQueue *queue)
+{
+ osync_assert(queue);
+ return queue->connected;
+}
+
+/*! @brief Sets the message handler for a queue
+ *
+ * Sets the function that will receive all messages, except the methodcall replies
+ *
+ * @param queue The queue to set the handler on
+ * @param handler The message handler function
+ * @param user_data The userdata that the message handler should receive
+ *
+ */
+void osync_queue_set_message_handler(OSyncQueue *queue, OSyncMessageHandler handler, gpointer user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, queue, handler, user_data);
+
+ queue->message_handler = handler;
+ queue->user_data = user_data;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*! @brief Sets the queue to use the gmainloop with the given context
+ *
+ * This function will attach the OSyncQueue as a source to the given context.
+ * The queue will then be check for new messages and the messages will be
+ * handled.
+ *
+ * @param queue The queue to set up
+ * @param context The context to use. NULL for default loop
+ *
+ */
+void osync_queue_setup_with_gmainloop(OSyncQueue *queue, GMainContext *context)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, queue, context);
+
+ queue->incoming_functions = g_malloc0(sizeof(GSourceFuncs));
+ queue->incoming_functions->prepare = _incoming_prepare;
+ queue->incoming_functions->check = _incoming_check;
+ queue->incoming_functions->dispatch = _incoming_dispatch;
+ queue->incoming_functions->finalize = NULL;
+
+ queue->incoming_source = g_source_new(queue->incoming_functions, sizeof(GSource) + sizeof(OSyncQueue *));
+ OSyncQueue **queueptr = (OSyncQueue **)(queue->incoming_source + 1);
+ *queueptr = queue;
+ g_source_set_callback(queue->incoming_source, NULL, queue, NULL);
+ g_source_attach(queue->incoming_source, context);
+ queue->incomingContext = context;
+ // For the source
+ g_main_context_ref(context);
+
+ //To unref it later
+ g_main_context_ref(context);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+osync_bool osync_queue_dispatch(OSyncQueue *queue, OSyncError **error)
+{
+ _incoming_dispatch(NULL, NULL, queue);
+ return TRUE;
+}
+
+OSyncQueueEvent osync_queue_poll(OSyncQueue *queue)
+{
+ struct pollfd pfd;
+ pfd.fd = queue->fd;
+ pfd.events = POLLIN;
+
+ /* Here we poll on the queue. If we read on the queue, we either receive a
+ * POLLIN or POLLHUP. Since we cannot write to the queue, we can block pretty long here.
+ *
+ * If we are sending, we can only receive a POLLERR which means that the remote side has
+ * disconnected. Since we mainly dispatch the write IO, we dont want to block here. */
+ int ret = poll(&pfd, 1, queue->type == OSYNC_QUEUE_SENDER ? 0 : 100);
+
+ if (ret < 0 && errno == EINTR)
+ return OSYNC_QUEUE_EVENT_NONE;
+
+ if (ret == 0)
+ return OSYNC_QUEUE_EVENT_NONE;
+
+ if (pfd.revents & POLLERR)
+ return OSYNC_QUEUE_EVENT_ERROR;
+ else if (pfd.revents & POLLHUP)
+ return OSYNC_QUEUE_EVENT_HUP;
+ else if (pfd.revents & POLLIN)
+ return OSYNC_QUEUE_EVENT_READ;
+
+ return OSYNC_QUEUE_EVENT_ERROR;
+}
+
+/** note that this function is blocking */
+OSyncMessage *osync_queue_get_message(OSyncQueue *queue)
+{
+ return g_async_queue_pop(queue->incoming);
+}
+
+void gen_id(long long int *part1, int *part2)
+{
+ struct timeval tv;
+ struct timezone tz;
+
+ gettimeofday(&tv, &tz);
+
+ long long int now = tv.tv_sec * 1000000 + tv.tv_usec;
+
+ int rnd = (int)random();
+ rnd = rnd << 16 | getpid();
+
+ *part1 = now;
+ *part2 = rnd;
+}
+
+osync_bool osync_queue_send_message(OSyncQueue *queue, OSyncQueue *replyqueue, OSyncMessage *message, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, queue, replyqueue, message, error);
+
+ if (message->callback) {
+ osync_assert(replyqueue);
+ OSyncPendingMessage *pending = osync_try_malloc0(sizeof(OSyncPendingMessage), error);
+ if (!pending)
+ goto error;
+
+ gen_id(&(message->id1), &(message->id2));
+ pending->id1 = message->id1;
+ pending->id2 = message->id2;
+
+ pending->callback = message->callback;
+ pending->user_data = message->user_data;
+
+ g_mutex_lock(replyqueue->pendingLock);
+ replyqueue->pendingReplies = g_list_append(replyqueue->pendingReplies, pending);
+ g_mutex_unlock(replyqueue->pendingLock);
+ }
+
+ osync_message_ref(message);
+ g_async_queue_push(queue->outgoing, message);
+
+ g_main_context_wakeup(queue->context);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_queue_send_message_with_timeout(OSyncQueue *queue, OSyncQueue *replyqueue, OSyncMessage *message, int timeout, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, queue, message, error);
+
+ /*TODO: add timeout handling */
+
+ osync_bool ret = osync_queue_send_message(queue, replyqueue, message, error);
+
+ osync_trace(ret ? TRACE_EXIT : TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return ret;
+}
+
+osync_bool osync_queue_is_alive(OSyncQueue *queue)
+{
+
+ if (!osync_queue_try_connect(queue, OSYNC_QUEUE_SENDER, NULL)) {
+ return FALSE;
+ }
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_NOOP, 0, NULL);
+ if (!message) {
+ return FALSE;
+ }
+
+ if (!osync_queue_send_message(queue, NULL, message, NULL)) {
+ return FALSE;
+ }
+
+ osync_queue_disconnect(queue, NULL);
+
+ return TRUE;
+}
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_queue_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_queue_internals.h
new file mode 100644
index 00000000..40d5e306
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_queue_internals.h
@@ -0,0 +1,93 @@
+#ifndef _OPENSYNC_QUEUE_INTERNALS_H
+#define _OPENSYNC_QUEUE_INTERNALS_H
+
+/**
+ * @defgroup OSEngineQueue OpenSync Message Queues Internals
+ * @ingroup OSEnginePrivate
+ * @brief A Queue used for asynchronous communication between thread
+ *
+ */
+
+/*@{*/
+
+typedef enum {
+ OSYNC_QUEUE_EVENT_NONE,
+ OSYNC_QUEUE_EVENT_READ,
+ OSYNC_QUEUE_EVENT_ERROR,
+ OSYNC_QUEUE_EVENT_HUP
+} OSyncQueueEvent;
+
+typedef enum {
+ OSYNC_QUEUE_SENDER,
+ OSYNC_QUEUE_RECEIVER
+} OSyncQueueType;
+
+/*! @brief Represents a Queue which can be used to receive messages
+ */
+struct OSyncQueue {
+ OSyncQueueType type;
+ /** The real asynchronous queue from glib **/
+ int fd;
+ /** The path name of this queue **/
+ char *name;
+ /** The message handler for this queue **/
+ OSyncMessageHandler message_handler;
+ /** The user_data associated with this queue **/
+ gpointer user_data;
+ /** The source associated with this queue */
+ GSourceFuncs *incoming_functions;
+ GSource *incoming_source;
+ /** The context in which the IO of the queue is dispatched */
+ GMainContext *context;
+ GMainContext *incomingContext;
+
+ OSyncThread *thread;
+
+ GAsyncQueue *incoming;
+ GAsyncQueue *outgoing;
+
+ GList *pendingReplies;
+ GMutex *pendingLock;
+
+ GSourceFuncs *write_functions;
+ GSource *write_source;
+
+ GSourceFuncs *read_functions;
+ GSource *read_source;
+
+ osync_bool connected;
+};
+
+/*@}*/
+
+int _osync_queue_write_data(OSyncQueue *queue, const void *vptr, size_t n, OSyncError **error);
+osync_bool _osync_queue_write_long_long_int(OSyncQueue *queue, const long long int message, OSyncError **error);
+osync_bool _osync_queue_write_int(OSyncQueue *queue, const int message, OSyncError **error);
+
+OSyncQueue *osync_queue_new(const char *name, OSyncError **error);
+osync_bool osync_queue_new_pipes(OSyncQueue **read_queue, OSyncQueue **write_queue, OSyncError **error);
+osync_bool osync_queue_create(OSyncQueue *queue, OSyncError **error);
+
+void osync_queue_free(OSyncQueue *queue);
+osync_bool osync_queue_remove(OSyncQueue *queue, OSyncError **error);
+osync_bool osync_queue_exists(OSyncQueue *queue);
+
+osync_bool osync_queue_connect(OSyncQueue *queue, OSyncQueueType type, OSyncError **error);
+osync_bool osync_queue_try_connect(OSyncQueue *queue, OSyncQueueType type, OSyncError **error);
+osync_bool osync_queue_disconnect(OSyncQueue *queue, OSyncError **error);
+osync_bool osync_queue_is_connected(OSyncQueue *queue);
+
+void osync_queue_set_message_handler(OSyncQueue *queue, OSyncMessageHandler handler, gpointer user_data);
+osync_bool osync_queue_send_message(OSyncQueue *queue, OSyncQueue *replyqueue, OSyncMessage *message, OSyncError **error);
+osync_bool osync_queue_send_message_with_timeout(OSyncQueue *queue, OSyncQueue *replyqueue, OSyncMessage *message, int timeout, OSyncError **error);
+
+void osync_queue_setup_with_gmainloop(OSyncQueue *queue, GMainContext *context);
+osync_bool osync_queue_dispatch(OSyncQueue *queue, OSyncError **error);
+
+OSyncQueueEvent osync_queue_poll(OSyncQueue *queue);
+
+OSyncMessage *osync_queue_get_message(OSyncQueue *queue);
+
+osync_bool osync_queue_is_alive(OSyncQueue *queue);
+
+#endif
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_serializer.c b/debian/opensync/opensync-0.22/opensync/opensync_serializer.c
new file mode 100644
index 00000000..e497cf66
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_serializer.c
@@ -0,0 +1,253 @@
+#include "opensync.h"
+#include "opensync_internals.h"
+
+int osync_marshal_get_size_changetype( OSyncChangeType changetype )
+{
+ return sizeof( int );
+}
+
+void osync_marshal_changetype( OSyncMessage *message, OSyncChangeType changetype )
+{
+ osync_message_write_int( message, (int)changetype );
+}
+
+void osync_demarshal_changetype( OSyncMessage *message, OSyncChangeType *changetype )
+{
+ int change_type = 0;
+
+ osync_message_read_int( message, &change_type );
+ *changetype =(OSyncChangeType)change_type;
+}
+
+int osync_marshal_get_size_change( OSyncChange *change )
+{
+ int size = 0;
+
+ if ( !change )
+ return size;
+
+ size += strlen( change->uid );
+ size += strlen( change->hash );
+ size += sizeof( int ); // change->size
+ size += change->size; // change->data
+ size += sizeof( int ); // change->has_data
+ size += strlen( change->objtype_name );
+ size += strlen( change->format_name );
+ size += strlen( change->initial_format_name );
+ size += osync_marshal_get_size_changetype( change->changetype );
+ size += sizeof( long long int ); // change->id
+ size += strlen( change->destobjtype );
+ size += strlen( change->sourceobjtype );
+ size += osync_marshal_get_size_member( change->sourcemember );
+
+ return size;
+}
+
+void osync_marshal_changedata(OSyncMessage *message, OSyncChange *change)
+{
+ OSyncObjFormat *format = osync_change_get_objformat(change);
+ char *data;
+ int datasize;
+ int free_data = 0;
+
+ osync_message_write_int( message, change->has_data );
+
+ if (change->data && format && format->marshall_func) {
+ format->marshall_func(change->data, change->size, &data, &datasize, NULL);
+ /*FIXME: Handle errors on marshall_func */
+ free_data = 1;
+ } else {
+ /* If the format is a plain format, then we have to add
+ * one byte for \0 to the datasize. This extra byte will
+ * be removed by the osync_demarshal_changedata funciton.
+ */
+ data = change->data;
+ datasize = change->size;
+ datasize++;
+ }
+
+ if (!data)
+ datasize = 0;
+
+ osync_message_write_int(message, datasize);
+ if (datasize > 0)
+ osync_message_write_data(message, data, datasize);
+
+ if (free_data)
+ g_free(data);
+}
+
+void osync_marshal_change( OSyncMessage *message, OSyncChange *change )
+{
+ osync_message_write_string( message, change->uid );
+ osync_message_write_string( message, change->hash );
+
+ char *format_name = change->format ? change->format->name : change->format_name;
+ char *objtype_name = change->objtype ? change->objtype->name : change->objtype_name;
+ char *initial_format_name = change->initial_format ? change->initial_format->name : change->initial_format_name;
+ osync_message_write_string( message, objtype_name );
+ osync_message_write_string( message, format_name );
+ osync_message_write_string( message, initial_format_name );
+
+ osync_marshal_changedata(message, change);
+
+ osync_marshal_changetype( message, change->changetype );
+ osync_message_write_long_long_int( message, change->id );
+ osync_message_write_string( message, change->destobjtype );
+ osync_message_write_string( message, change->sourceobjtype );
+ osync_marshal_member( message, change->sourcemember );
+}
+
+void osync_demarshal_changedata(OSyncMessage *message, OSyncChange *change)
+{
+ OSyncObjFormat *format = osync_change_get_objformat(change);
+ char *data;
+ int datasize;
+
+ osync_message_read_int( message, &( change->has_data ) );
+
+ osync_message_read_int(message, &datasize);
+ if (datasize > 0) {
+ data = malloc(datasize);
+ osync_message_read_data( message, data, datasize );
+
+ if (format && format->demarshall_func) {
+ char *newdata;
+ int newsize;
+ format->demarshall_func(data, datasize, &newdata, &newsize, NULL);
+ /*FIXME: Handle errors on demarshall_func */
+ free(data);
+ data = newdata;
+ datasize = newsize;
+ } else {
+ /* If the format is a plain, then we have to remove
+ * one from the datasize, since once one was added by
+ * osync_marshall_changedata() for trailing newline.
+ */
+ datasize--;
+ }
+ } else {
+ data = NULL;
+ }
+
+ change->data = data;
+ change->size = datasize;
+}
+
+void osync_demarshal_change( OSyncMessage *message, OSyncFormatEnv *conv_env, OSyncChange **change )
+{
+ OSyncChange *new_change = osync_change_new();
+
+ osync_change_set_conv_env(new_change, conv_env);
+
+ osync_message_read_string( message, &( new_change->uid ) );
+ osync_message_read_string( message, &( new_change->hash ) );
+
+ osync_message_read_string( message, &( new_change->objtype_name ) );
+ osync_message_read_string( message, &( new_change->format_name ) );
+ osync_message_read_string( message, &( new_change->initial_format_name ) );
+
+ osync_demarshal_changedata(message, new_change);
+
+ osync_demarshal_changetype( message, &( new_change->changetype ) );
+ osync_message_read_long_long_int( message, &( new_change->id ) );
+ osync_message_read_string( message, &( new_change->destobjtype ) );
+ osync_message_read_string( message, &( new_change->sourceobjtype ) );
+ osync_demarshal_member( message, &( new_change->sourcemember ) );
+
+ new_change->member = 0;
+ new_change->engine_data = 0;
+ new_change->mappingid = 0;
+ new_change->changes_db = 0;
+
+ *change = new_change;
+}
+
+int osync_marshal_get_size_member( OSyncMember *member )
+{
+ return sizeof( int );
+}
+
+void osync_marshal_member( OSyncMessage *message, OSyncMember *member )
+{
+ if ( member ) {
+ osync_message_write_int( message, member->id );
+ } else {
+ osync_message_write_int( message, -1 );
+ }
+}
+
+void osync_demarshal_member( OSyncMessage *message, OSyncMember **member )
+{
+ int id;
+
+ osync_message_read_int( message, &id );
+
+ if ( id == -1 )
+ *member = 0;
+ else {
+ //TODO: search in pool
+ }
+}
+
+int osync_marshal_get_size_error( OSyncError **error )
+{
+ int size = 0;
+
+ if ( !osync_error_is_set(error) )
+ return size;
+
+ size += sizeof( int );
+ size += strlen( (*error)->message );
+
+ return size;
+}
+
+void osync_marshal_error( OSyncMessage *message, OSyncError *error )
+{
+ if (error) {
+ osync_message_write_int( message, 1 );
+ osync_message_write_int( message, (int)error->type );
+ osync_message_write_string( message, error->message );
+ } else {
+ osync_message_write_int( message, 0 );
+ }
+}
+
+void osync_demarshal_error( OSyncMessage *message, OSyncError **error )
+{
+ int hasError = 0;
+
+ osync_message_read_int( message, &hasError );
+
+ if (hasError) {
+ char *msg;
+ int error_type;
+
+ osync_message_read_int( message, &error_type );
+ osync_message_read_string( message, &msg );
+
+ osync_error_set( error, (OSyncErrorType)error_type, msg );
+ } else
+ osync_error_free(error);
+}
+
+/*FIXME: review these get_size_*() functions
+ *
+ * - check if the data is being marhsalled as specified in the functions
+ * - check (proabably invalid) usage of strlen() without considering the
+ * string length bytes and the nul terminator
+ */
+int osync_marshal_get_size_message( OSyncMessage *message )
+{
+ int size = 0;
+
+ if ( !message )
+ return size;
+
+ size += sizeof( int ); // message->cmd
+ size += sizeof( long long int ); // message->id
+ size += sizeof( int ); // has error
+
+ return 0;
+}
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_serializer.h b/debian/opensync/opensync-0.22/opensync/opensync_serializer.h
new file mode 100644
index 00000000..6191725c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_serializer.h
@@ -0,0 +1,48 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2006 Tobias Koenig <tokoe@kde.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 _OPENSYNC_SERIALIZER_H_
+#define _OPENSYNC_SERIALIZER_H_
+
+#define TYPE_OSYNC_CHANGE 1
+#define TYPE_OSYNC_MEMBER 2
+
+int osync_marshal_get_size_changetype( OSyncChangeType changetype );
+void osync_marshal_changetype( OSyncMessage *message, OSyncChangeType changetype );
+void osync_demarshal_changetype( OSyncMessage *message, OSyncChangeType *changetype );
+
+int osync_marshal_get_size_change( OSyncChange *change );
+void osync_marshal_change( OSyncMessage *message, OSyncChange *change );
+void osync_demarshal_change( OSyncMessage *message, OSyncFormatEnv *conv_env, OSyncChange **change );
+
+int osync_marshal_get_size_member( OSyncMember *member );
+void osync_marshal_member( OSyncMessage *message, OSyncMember *member );
+void osync_demarshal_member( OSyncMessage *message, OSyncMember **member );
+
+int osync_marshal_get_size_error( OSyncError **error );
+void osync_marshal_error( OSyncMessage *message, OSyncError *error );
+void osync_demarshal_error( OSyncMessage *message, OSyncError **error );
+
+int osync_marshal_get_size_message( OSyncMessage *message );
+
+void osync_marshal_changedata(OSyncMessage *message, OSyncChange *change);
+void osync_demarshal_changedata(OSyncMessage *message, OSyncChange *change);
+
+#endif
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_support.h b/debian/opensync/opensync-0.22/opensync/opensync_support.h
new file mode 100644
index 00000000..cc94887d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_support.h
@@ -0,0 +1,18 @@
+#ifndef _OPENSYNC_SUPPORT_H
+#define _OPENSYNC_SUPPORT_H
+
+typedef struct OSyncThread {
+ GThread *thread;
+ GCond *started;
+ GMutex *started_mutex;
+ GMainContext *context;
+ GMainLoop *loop;
+} OSyncThread;
+
+OSyncThread *osync_thread_new(GMainContext *context, OSyncError **error);
+void osync_thread_free(OSyncThread *thread);
+void osync_thread_start(OSyncThread *thread);
+void osync_thread_stop(OSyncThread *thread);
+osync_bool osync_pattern_match(const char *pattern, const char *data, int size);
+
+#endif
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_time.c b/debian/opensync/opensync-0.22/opensync/opensync_time.c
new file mode 100644
index 00000000..2fd88545
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_time.c
@@ -0,0 +1,1092 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ * Copyright (C) 2006 Daniel Gollub <dgollub@suse.de>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <time.h>
+
+#include "opensync.h"
+#include "opensync_internals.h"
+
+/*
+ * On solaris no timegm function exists,
+ * we must implement it here
+ */
+#ifdef SOLARIS
+time_t timegm(struct tm *t)
+{
+ time_t tl, tb;
+ struct tm *tg;
+
+ tl = mktime (t);
+ if (tl == -1)
+ {
+ t->tm_hour--;
+ tl = mktime (t);
+ if (tl == -1)
+ return -1; /* can't deal with output from strptime */
+ tl += 3600;
+ }
+ tg = gmtime (&tl);
+ tg->tm_isdst = 0;
+ tb = mktime (tg);
+ if (tb == -1)
+ {
+ tg->tm_hour--;
+ tb = mktime (tg);
+ if (tb == -1)
+ return -1; /* can't deal with output from gmtime */
+ tb += 3600;
+ }
+ return (tl - (tb - tl));
+}
+#endif
+
+/* Floating Timestamps...... (handle tzid!) */
+
+/*
+ * Time formatting helper
+ */
+
+/*! @brief Function remove dashes from datestamp and colon
+ *
+ * @param timestamp The timestamp which gets cleaned
+ * @returns valid vtime stamp in YYYYMMDD[THHMMDD[Z]] (the caller is responsible for freeing)
+ */
+static char *osync_time_timestamp_remove_dash(const char *timestamp) {
+ int i, len;
+ GString *str = g_string_new("");
+
+ len = strlen(timestamp);
+
+ for (i=0; i < len; i++) {
+ if (timestamp[i] == '-')
+ continue;
+
+ if (timestamp[i] == ':')
+ continue;
+
+ str = g_string_append_c(str, timestamp[i]);
+ }
+
+ return (char*) g_string_free(str, FALSE);
+}
+
+/*! @brief Function returns a date-timestamp in OSyncTime Spec format
+ *
+ * @param vtime The timestamp which gets converted to a valid osync date-timestamp
+ * @returns vtime date-timestring (the caller is responsible for freeing)
+ */
+char *osync_time_timestamp(const char *vtime) {
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, vtime);
+
+ char *timestamp;
+
+ timestamp = osync_time_timestamp_remove_dash(vtime);
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, timestamp);
+ return timestamp;
+}
+
+/*! @brief Function returns a date without timestamp in OSyncTime Spec format
+ *
+ * @param vtime The timestamp which gets converted to a single datestamp
+ * @returns valid single datestamp YYYYMMDD (the caller is responsible for freeing)
+ */
+char *osync_time_datestamp(const char *vtime) {
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, vtime);
+
+ char *tmp;
+ const char *p;
+ GString *str = g_string_new ("");
+
+ tmp = osync_time_timestamp_remove_dash(vtime);
+
+ for (p=tmp; *p && *p != 'T'; p++)
+ str = g_string_append_c (str, *p);
+
+ free(tmp);
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, str->str);
+ return (char*) g_string_free(str, FALSE);
+}
+
+/*! @brief Function returns TRUE if vtime is a valid datestamp (YYYYMMDD)
+ *
+ * @returns FALSE if vtime includes a timestamp, TRUE on a single datestamp
+ */
+osync_bool osync_time_isdate(const char *vtime) {
+
+ int year, month, day;
+
+ if (strstr(vtime, "T"))
+ return FALSE;
+
+ /* YYYYMMDD */
+ if (sscanf(vtime, "%04d%02d%02d", &year, &month, &day) != 3)
+ return FALSE;
+
+ return TRUE;
+}
+
+/*! @brief Function returns TRUE if vtime is in UTC (YYYYMMDDTHH:MM:SSZ)
+ *
+ * @returns FALSE if vtime includes no Zulu, TRUE if the timestamp is UTC
+ */
+osync_bool osync_time_isutc(const char *vtime) {
+
+ if (!strstr(vtime, "Z"))
+ return FALSE;
+
+ return TRUE;
+}
+
+/*! @brief Function sets the time of vtime timestamp to the given time parameter
+ *
+ * If vtime only stores date (without THHMMSS[Z]) parameter time will
+ * appended. The is_utc append a Z (Zulu) for UTC if not present.
+ *
+ * Mainly used for workarounds.
+ *
+ * @param vtime The original data-timestamp which gets modified
+ * @param time The time which should be set
+ * @param is_utc If the given time is UTC is_utc have to be TRUE
+ * @returns data-timestamp in UTC if is_utc TRUE
+ */
+/*
+char *osync_time_set_vtime(const char *vtime, const char *time, osync_bool is_utc) {
+ osync_trace(TRACE_ENTRY, "%s(%s, %s)", __func__, vtime, time);
+
+ char *tmp = NULL;
+
+ // TODO
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, tmp);
+ return tmp;
+}
+*/
+
+/*
+ * Timetype helper
+ */
+
+/*! @brief Function converts vtime to tm struct
+ *
+ * @param vtime The formatted timestamp (YYYYMMDDTHHMMSS)
+ * @returns struct tm (caller is responsible for freeing)
+ */
+struct tm *osync_time_vtime2tm(const char *vtime) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, vtime);
+
+ struct tm *utime = g_malloc0(sizeof(struct tm));
+
+ utime->tm_year = 0;
+ utime->tm_mon = 0;
+ utime->tm_mday = 0;
+ utime->tm_hour = 0;
+ utime->tm_min = 0;
+ utime->tm_sec = 0;
+
+ sscanf(vtime, "%04d%02d%02dT%02d%02d%02d%*01c",
+ &(utime->tm_year), &(utime->tm_mon), &(utime->tm_mday),
+ &(utime->tm_hour), &(utime->tm_min), &(utime->tm_sec));
+
+ utime->tm_year -= 1900;
+ utime->tm_mon -= 1;
+
+ /* isdst is handled by tz offset calcualtion */
+ utime->tm_isdst = -1;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return utime;
+}
+
+/*! @brief Function converts struct tm in vtime string
+ *
+ * YYYYMMDDTHHMMSS[Z]
+ * Returned timezone is equal to the timezone of struct tm.
+ *
+ * @param time The tm struct which gets converted
+ * @param is_utc If struct tm is UTC time is_utc have to be TRUE
+ * @returns vtime formatted as YYYYMMDDTHHMMSS[Z] (caller is responsible for freeing)
+ */
+char *osync_time_tm2vtime(const struct tm *time, osync_bool is_utc) {
+
+ osync_trace(TRACE_ENTRY, "%s(%p, %i)", __func__, time, is_utc);
+ GString *vtime = g_string_new("");
+
+ g_string_printf(vtime, "%04d%02d%02dT%02d%02d%02d",
+ time->tm_year + 1900, time->tm_mon + 1, time->tm_mday,
+ time->tm_hour, time->tm_min, time->tm_sec);
+
+ if (is_utc)
+ vtime = g_string_append(vtime, "Z");
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, vtime->str);
+ return g_string_free(vtime, FALSE);
+}
+
+/*! @brief Function converts vtime to unix time
+ *
+ * @param offset Seconds of UTC offset
+ * @param vtime The osync formmatted timestamp
+ * @returns Unix timestamp in time_t (UTC)
+ */
+time_t osync_time_vtime2unix(const char *vtime, int offset) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s, %i)", __func__, vtime, offset);
+ struct tm *utime = NULL;
+ time_t timestamp;
+ char *utc = NULL;
+
+ utc = osync_time_vtime2utc(vtime, offset);
+ utime = osync_time_vtime2tm(utc);
+
+ timestamp = osync_time_tm2unix(utime);
+
+ g_free(utc);
+ g_free(utime);
+
+ osync_trace(TRACE_EXIT, "%s: %lu", __func__, timestamp);
+ return timestamp;
+}
+
+/*! @brief Function converts unix timestamp to vtime in UTC
+ *
+ * @param timestamp The unix timestamp which gets converted
+ * @returns vtime formatted as YYYYMMDDTHHMMSSZ (caller is responsible for freeing)
+ */
+char *osync_time_unix2vtime(const time_t *timestamp) {
+
+ osync_trace(TRACE_ENTRY, "%s(%lu)", __func__, *timestamp);
+ char *vtime;
+ struct tm utc;
+
+ gmtime_r(timestamp, &utc);
+ vtime = osync_time_tm2vtime(&utc, TRUE);
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, vtime);
+ return vtime;
+}
+
+/*! @brief Function converts struct tm to unix timestamp
+ *
+ * @param tmtime The struct tm which gets converted
+ * @returns time_t (in UTC)
+ */
+time_t osync_time_tm2unix(const struct tm *tmtime) {
+
+ time_t timestamp;
+ struct tm *tmp = g_malloc0(sizeof(struct tm));
+
+ memcpy(tmp, tmtime, sizeof(struct tm));
+
+ timestamp = timegm(tmp);
+
+ g_free(tmp);
+
+ return timestamp;
+}
+
+/*! @brief Function converts unix timestamp to struct tm
+ *
+ * @param timestamp The unixtimestamp which gets converted
+ * @returns: struct tm (in UTC)
+ */
+struct tm *osync_time_unix2tm(const time_t *timestamp) {
+
+ struct tm *ptr_tm;
+ struct tm tmtime;
+
+ gmtime_r(timestamp, &tmtime);
+
+ ptr_tm = &tmtime;
+
+ return ptr_tm;
+}
+
+/*
+ * Timezone helper
+ */
+
+/*! @brief Function gets offset of parameter time between UTC and localtime in seconds.
+ *
+ * @param time is the point in time when the offset have to be calculated (need for CEST/CET)
+ * @returns Seconds of timezone offset
+ */
+int osync_time_timezone_diff(const struct tm *time) {
+ osync_trace(TRACE_ENTRY, "%s()", __func__);
+
+ struct tm ltime, utime;
+ unsigned int lsecs, usecs;
+ long zonediff;
+ time_t timestamp;
+
+ timestamp = osync_time_tm2unix(time);
+
+ tzset();
+
+ localtime_r(&timestamp, &ltime);
+ gmtime_r(&timestamp, &utime);
+
+ lsecs = 3600 * ltime.tm_hour + 60 * ltime.tm_min + ltime.tm_sec;
+ usecs = 3600 * utime.tm_hour + 60 * utime.tm_min + utime.tm_sec;
+
+ zonediff = lsecs - usecs;
+
+ /* check for different day */
+ if (utime.tm_mday != ltime.tm_mday) {
+ if (utime.tm_mday < ltime.tm_mday)
+ zonediff += 24 * 3600;
+ else
+ zonediff -= 24 * 3600;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, zonediff);
+ return zonediff;
+}
+
+/*! @brief Function converts (struct tm) ltime from localtime to UTC.
+ * Paramter offset is used as UTC offset.
+ *
+ * @param ltime The struct tm which gets converted to UTC timezone
+ * @param offset Seconds of UTC offset
+ * @returns struct tm in UTC (caller is responsible for freeing)
+ */
+struct tm *osync_time_tm2utc(const struct tm *ltime, int offset) {
+
+ osync_trace(TRACE_ENTRY, "%s(%p, %i)", __func__, ltime, offset);
+ struct tm *tmtime = g_malloc0(sizeof(struct tm));
+
+ tmtime->tm_year = ltime->tm_year;
+ tmtime->tm_mon = ltime->tm_mon;
+ tmtime->tm_mday = ltime->tm_mday;
+ tmtime->tm_hour = ltime->tm_hour;
+ tmtime->tm_min = ltime->tm_min;
+ tmtime->tm_sec = ltime->tm_sec;
+
+ /* in seconds - to have a exactly timezone diff like -13.5h */
+ tmtime->tm_hour -= offset / 3600;
+ tmtime->tm_min -= (offset % 3600) / 60;
+
+ if (tmtime->tm_hour > 23 || tmtime->tm_hour < 0) {
+
+ if (tmtime->tm_hour < 0) {
+ tmtime->tm_hour += 24;
+ tmtime->tm_mday -= 1;
+ } else {
+ tmtime->tm_hour -= 24;
+ tmtime->tm_mday += 1;
+ }
+ }
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, tmtime);
+ return tmtime;
+}
+
+/*! @brief Function converts (struct tm) utime from UTC to localtime
+ * Parameter is used as UTC offset.
+ *
+ * @param utime The struct tm which gets converted to localtime
+ * @param offset Seconds of UTC offset
+ * @returns struct tm in localtime (caller is responsible for freeing)
+ */
+struct tm *osync_time_tm2localtime(const struct tm *utime, int offset) {
+
+ struct tm *tmtime = g_malloc0(sizeof(struct tm));
+
+ tmtime->tm_year = utime->tm_year;
+ tmtime->tm_mon = utime->tm_mon;
+ tmtime->tm_mday = utime->tm_mday;
+ tmtime->tm_hour = utime->tm_hour;
+ tmtime->tm_min = utime->tm_min;
+ tmtime->tm_sec = utime->tm_sec;
+
+ tmtime->tm_hour += offset / 3600;
+ tmtime->tm_min += (offset % 3600) / 60;
+
+ if (tmtime->tm_hour > 23 || tmtime->tm_hour < 0) {
+
+ if (tmtime->tm_hour < 0) {
+ tmtime->tm_mday -= 1;
+ tmtime->tm_hour += 24;
+ } else {
+ tmtime->tm_mday += 1;
+ tmtime->tm_hour -= 24;
+ }
+ }
+
+ return tmtime;
+}
+
+/*! @brief Functions converts a localtime vtime stamp to a UTC vtime stamp
+ *
+ * @param localtime The local timestamp in vtime format
+ * @param offset Seconds of UTC offset
+ * @returns vtime in UTC timezone (caller is responsible for freeing)
+ */
+char *osync_time_vtime2utc(const char* localtime, int offset) {
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, localtime);
+
+ char *utc = NULL;
+ struct tm *tm_local = NULL, *tm_utc = NULL;
+
+ if (strstr(localtime, "Z")) {
+ utc = strdup(localtime);
+ goto end;
+ }
+
+ tm_local = osync_time_vtime2tm(localtime);
+ tm_utc = osync_time_tm2utc(tm_local, offset);
+ utc = osync_time_tm2vtime(tm_utc, TRUE);
+
+ g_free(tm_local);
+// FIXME is it really a memory leak?
+// g_free(tm_utc);
+
+end:
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, utc);
+ return utc;
+}
+
+/*! @brief Functions converts a UTC vtime stamp to a localtime vtime stamp
+ *
+ * @param utc The timestap in UTC timezone whic gets converted to localtime
+ * @returns vtime in local timezon (caller is preponsible for freeing)
+ */
+char *osync_time_vtime2localtime(const char* utc, int offset) {
+
+ char *localtime = NULL;
+ struct tm *tm_local = NULL, *tm_utc = NULL;
+
+ if (!strstr(utc, "Z")) {
+ localtime = strdup(utc);
+ return localtime;
+ }
+
+ tm_utc = osync_time_vtime2tm(utc);
+ tm_local = osync_time_tm2localtime(tm_utc, offset);
+ localtime = osync_time_tm2vtime(tm_local, FALSE);
+
+ g_free(tm_local);
+ g_free(tm_utc);
+
+ return localtime;
+}
+
+
+
+/* XXX This functions should only be used as workaround for plugins which
+ only supports localtime without any timezone information. */
+
+/*! List of vcal fields which have should be converted by following
+ * workaround functions.
+ */
+const char *_time_attr[] = {
+ "DTSTART:",
+ "DTEND:",
+ "DTSTAMP:",
+ "AALARM:",
+ "DALARM:",
+ "DUE:",
+ NULL
+};
+
+/*! @brief Functions converts a UTC vtime stamp to a localtime vtime stamp
+ *
+ * @param entry The whole vcal entry as GString which gets modified.
+ * @param field The field name which should be modified.
+ * @param toUTC The toggle in which direction we convert. TRUE = convert to UTC
+ */
+static void _convert_time_field(GString *entry, const char *field, osync_bool toUTC) {
+
+ int i, tzdiff;
+ char *res = NULL;
+ char *new_stamp = NULL;
+
+ GString *stamp = g_string_new("");
+
+ if ((res = strstr(entry->str, field))) {
+ res += strlen(field);
+
+ for (i=0; res[i] != '\n' && res[i] != '\r'; i++)
+ stamp = g_string_append_c(stamp, res[i]);
+
+ gssize pos = res - entry->str;
+ entry = g_string_erase(entry, pos, i);
+
+ // Get System offset to UTC
+ struct tm *tm_stamp = osync_time_vtime2tm(stamp->str);
+ tzdiff = osync_time_timezone_diff(tm_stamp);
+ g_free(tm_stamp);
+
+ if (toUTC)
+ new_stamp = osync_time_vtime2utc(stamp->str, tzdiff);
+ else
+ new_stamp = osync_time_vtime2localtime(stamp->str, tzdiff);
+
+ entry = g_string_insert(entry, pos, new_stamp);
+ g_free(new_stamp);
+ }
+}
+
+/*! @brief Functions converts timestamps of vcal in localtime or UTC.
+ *
+ * @param vcal The vcalendar which has to be converted.
+ * @param toUTC If TRUE conversion from localtime to UTC.
+ * @return timestamp modified vcalendar
+ */
+char *_convert_entry(const char *vcal, osync_bool toUTC) {
+
+ int i = 0;
+ GString *new_entry = g_string_new(vcal);
+
+ for (i=0; _time_attr[i] != NULL; i++)
+ _convert_time_field(new_entry, _time_attr[i], toUTC);
+
+ return g_string_free(new_entry, FALSE);
+}
+
+/*! @brief Functions converts timestamps of vcal to localtime
+ *
+ * @param vcal The vcalendar which has to be converted.
+ * @return modified vcalendar with local timestamps (related to system time)
+ */
+char *osync_time_vcal2localtime(const char *vcal) {
+
+ return _convert_entry(vcal, FALSE);
+}
+
+/*! @brief Functions converts timestamps of vcal to UTC
+ *
+ * @param vcal The vcalendar which has to be converted.
+ * @return modified vcalendar with UTC timestamps (related to system time)
+ */
+char *osync_time_vcal2utc(const char *vcal) {
+
+ return _convert_entry(vcal, TRUE);
+}
+
+/*! @brief Functions converts seconds in duration before or after alarm event
+ *
+ * @param seconds
+ * @returns ical alarm duration string (caller is preponsible for freeing)
+ */
+
+char *osync_time_sec2alarmdu(int seconds) {
+
+ osync_trace(TRACE_ENTRY, "%s(%i)", __func__, seconds);
+
+ char *tmp = NULL;
+ char *prefix = NULL;
+
+ if (!seconds) {
+ tmp = g_strdup("PT0S");
+ goto end;
+ }
+
+ if (seconds > 0) {
+ prefix = g_strdup("P");
+ } else {
+ prefix = g_strdup("-P");
+ seconds *= -1;
+ }
+
+ // Days
+ if (!(seconds % (3600 * 24))) {
+ tmp = g_strdup_printf("%s%iD", prefix, seconds / (3600 * 24));
+ goto end;
+ }
+
+ // Hours
+ if (!(seconds % 3600)) {
+ tmp = g_strdup_printf("%sT%iH", prefix, seconds / 3600);
+ goto end;
+ }
+
+ // Minutes
+ if (!(seconds % 60) && seconds < 3600) {
+ tmp = g_strdup_printf("%sT%iM", prefix, seconds / 60);
+ goto end;
+ }
+
+ // Seconds
+ if (seconds < 60) {
+ tmp = g_strdup_printf("%sT%iS", prefix, seconds);
+ goto end;
+ }
+
+ if (seconds > 60)
+ tmp = g_strdup_printf("%sT%iM", prefix, seconds / 60);
+
+ if (seconds > 3600)
+ tmp = g_strdup_printf("%sT%iH%iM", prefix, seconds / 3600,
+ (seconds % 3600) / 60);
+
+ if (seconds > (3600 * 24))
+ tmp = g_strdup_printf("%s%iDT%iH%iM", prefix, seconds / (3600 * 24),
+ seconds % (3600 * 24) / 3600,
+ ((seconds % (3600 * 24) % 3600)) / 60);
+
+end:
+ g_free(prefix);
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, tmp);
+ return tmp;
+}
+
+/*! @brief Functions converts alarm duration event to seconds needed for reminder of vcal/ical
+ *
+ * TODO: Test support for ALARM after/before end and after start
+ *
+ * @param alarm
+ * @returns seconds of alarm and duration
+ */
+
+int osync_time_alarmdu2sec(const char *alarm) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, alarm);
+
+ int i, secs, digits;
+ int is_digit = 0;
+ int sign = 1; // when ical stamp doesn't start with '-' => seconds after event
+ int days = 0, weeks = 0, hours = 0, minutes = 0, seconds = 0;
+
+ for (i=0; i < (int) strlen(alarm); i++) {
+
+ switch (alarm[i]) {
+ case '-':
+ sign = -1; // seconds before event - change the sign
+ case 'P':
+ case 'T':
+ is_digit = 0;
+ break;
+ case 'W':
+ is_digit = 0;
+ weeks = digits;
+ break;
+ case 'D':
+ is_digit = 0;
+ days = digits;
+ break;
+ case 'H':
+ is_digit = 0;
+ hours = digits;
+ break;
+ case 'M':
+ is_digit = 0;
+ minutes = digits;
+ break;
+ case 'S':
+ is_digit = 0;
+ seconds = digits;
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (is_digit)
+ break;
+
+ sscanf((char*)(alarm+i),"%d",&digits);
+ is_digit = 1;
+ break;
+ }
+ }
+
+ secs = (weeks * 7 * 24 * 3600) + (days * 24 * 3600) + (hours * 3600) + (minutes * 60) + seconds;
+
+ secs = secs * sign; // change sign if the alarm is in seconds before event (leading '-')
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, secs);
+ return secs;
+}
+
+/*
+ * Timezone ID helper
+ */
+
+/*! @brief Function converts a week day string to the struct tm wday integer.
+ *
+ * @param weekday string of the week day
+ * @returns integer of the weekday (Sunday = 0)
+ */
+int osync_time_str2wday(const char *swday) {
+
+ int weekday = -1;
+
+ if (!strcmp(swday, "SU"))
+ weekday = 0;
+ else if (!strcmp(swday, "MO"))
+ weekday = 1;
+ else if (!strcmp(swday, "TU"))
+ weekday = 2;
+ else if (!strcmp(swday, "WE"))
+ weekday = 3;
+ else if (!strcmp(swday, "TH"))
+ weekday = 4;
+ else if (!strcmp(swday, "FR"))
+ weekday = 5;
+ else if (!strcmp(swday, "SA"))
+ weekday = 6;
+
+ return weekday;
+}
+
+/*! @brief Function determines the exactly date of relative information
+ * It is used for example to determine the last sunday of a month (-1SU)
+ * in a specific year.
+ *
+ * @param byday string of the relative day of month modifier
+ * @param bymonth calendar number of the monath (January = 1)
+ * @param year calendar year (year = 1970)
+ * @returns struct tm of the relative information date with 00:00:00 timestamp.
+ * (Caller is responsible for freeing)
+ */
+struct tm *osync_time_relative2tm(const char *byday, const int bymonth, const int year) {
+
+ struct tm *datestamp = g_malloc0(sizeof(struct tm));
+ char weekday[3];
+ int first_wday = 0, last_wday = 0;
+ int daymod, mday, searched_wday;
+
+ sscanf(byday, "%d%s", &daymod, weekday);
+ weekday[2] = '\0';
+
+ searched_wday = osync_time_str2wday(weekday);
+
+ datestamp->tm_year = year - 1900;
+ datestamp->tm_mon = bymonth - 1;
+ datestamp->tm_mday = 0;
+ datestamp->tm_hour = 0;
+ datestamp->tm_min = 0;
+ datestamp->tm_sec = 0;
+ datestamp->tm_isdst = -1;
+
+ for (mday = 0; mday <= 31; mday++) {
+ datestamp->tm_mday = mday;
+ mktime(datestamp);
+
+ if (datestamp->tm_wday == searched_wday) {
+ if (!first_wday)
+ first_wday = searched_wday;
+
+ last_wday = searched_wday;
+ }
+ }
+
+ if (daymod > 0)
+ datestamp->tm_mday = first_wday + (7 * (daymod - 1));
+ else
+ datestamp->tm_mday = last_wday - (7 * (daymod - 1));
+
+ mktime(datestamp);
+
+ return datestamp;
+}
+
+/*! @brief Function converts UTC offset string in offset in seconds
+ *
+ * @param offset The offset string of the form a timezone field (Example +0200)
+ * @returns seconds of UTC offset
+ */
+int osync_time_utcoffset2sec(const char *offset) {
+ osync_trace(TRACE_ENTRY, "%s(%s)", __func__, offset);
+
+ char csign = 0;
+ int seconds = 0, sign = 1;
+ int hours = 0, minutes = 0;
+
+ sscanf(offset, "%c%2d%2d", &csign, &hours, &minutes);
+
+ if (csign == '-')
+ sign = -1;
+
+ seconds = (hours * 3600 + minutes * 60) * sign;
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, seconds);
+ return seconds;
+}
+
+/*! @brief Functions determines the change timestamp of daylight saving of the given
+ * XML Timezone from dstNode.
+ *
+ * @param dstNode daylight saving or standard XML information of a timezone.
+ * @returns struct tm of exactly date-timestamp of the change from/to daylight saving time.
+ * (Caller is responsible for freeing!)
+ */
+struct tm *osync_time_dstchange(xmlNode *dstNode) {
+
+ int month;
+ struct tm *dst_change = NULL, *tm_started = NULL;
+ char *started = NULL, *rule = NULL, *byday = NULL;
+
+ xmlNode *current = osxml_get_node(dstNode, "DateStarted");
+ started = (char*) xmlNodeGetContent(current);
+ tm_started = osync_time_vtime2tm(started);
+
+ g_free(started);
+
+ current = osxml_get_node(dstNode, "RecurrenceRule");
+ current = current->children;
+
+ while (current) {
+ rule = (char *) xmlNodeGetContent(current);
+
+ if (strstr(rule, "BYDAY="))
+ byday = g_strdup(rule + 6);
+ else if (strstr(rule, "BYMONTH="))
+ sscanf(rule, "BYMONTH=%d", &month);
+
+ g_free(rule);
+
+ current = current->next;
+ }
+
+ dst_change = osync_time_relative2tm(byday, month, tm_started->tm_year + 1900);
+
+ g_free(byday);
+
+ dst_change->tm_hour = tm_started->tm_hour;
+ dst_change->tm_min = tm_started->tm_min;
+
+ g_free(tm_started);
+
+ return dst_change;
+}
+
+/*! @brief Functions determines if parameter vtime is Daylight Saving time in given Timezone ID (tzid)
+ *
+ * @param vtime Timestamp of time which should be determined
+ * @param tzid Timezone ID of timestamp
+ * @returns TRUE if vtime is daylight saving time of tzid
+ */
+osync_bool osync_time_isdst(const char *vtime, xmlNode *tzid) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, vtime, tzid);
+
+ int year;
+ char *newyear = NULL;
+ time_t newyear_t, timestamp;
+ struct tm *std_changetime, *dst_changetime;
+ time_t dstStamp, stdStamp;
+ xmlNode *current = NULL;
+
+ sscanf(vtime, "%4d%*2d%*2dT%*2d%*d%*2d%*c", &year);
+
+ newyear = g_strdup_printf("%4d0101T000000", year);
+ newyear_t = osync_time_vtime2unix(newyear, 0);
+ timestamp = osync_time_vtime2unix(vtime, 0);
+
+ /* Handle XML Timezone field */
+ current = osxml_get_node(tzid, "Standard");
+ std_changetime = osync_time_dstchange(current);
+
+ current = osxml_get_node(tzid, "DaylightSavings");
+ dst_changetime = osync_time_dstchange(current);
+
+ /* determine in which timezone is vtime */
+ dstStamp = osync_time_tm2unix(dst_changetime);
+ stdStamp = osync_time_tm2unix(std_changetime);
+
+ if (timestamp > stdStamp && timestamp < dstStamp) {
+ osync_trace(TRACE_EXIT, "%s: FALSE (Standard Timezone)", __func__);
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: TRUE (Daylight Saving Timezone)", __func__);
+ return TRUE;
+}
+
+/*! @brief Functions returns the current UTC offset of the given vtime and interprets
+ * the Timezone XML information tz.
+ *
+ * @param vtime Timestamp of given Timezone information
+ * @param tz Timezone information in XML
+ * @returns seconds seconds of current DST state and timezone
+ */
+int osync_time_tzoffset(const char *vtime, xmlNode *tz) {
+
+ osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, vtime, tz);
+
+ int seconds;
+ char *offset = NULL;
+ xmlNode *current = NULL;
+
+ if (osync_time_isdst(vtime, tz))
+ current = osxml_get_node(tz, "DaylightSavings");
+ else
+ current = osxml_get_node(tz, "Standard");
+
+ offset = osxml_find_node(current, "TZOffsetFrom");
+ seconds = osync_time_utcoffset2sec(offset);
+
+ osync_trace(TRACE_EXIT, "%s: %i", __func__, seconds);
+ return seconds;
+}
+
+/*! @brief Functions returns the Timezone id of the Timezone information XML.
+ *
+ * @param tz Timezone information in XML
+ * @returns Timezone ID (Caller is responsible for freeing!)
+ */
+char *osync_time_tzid(xmlNode *tz) {
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, tz);
+
+ char *id = NULL;
+
+ id = osxml_find_node(tz, "TimezoneID");
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, id);
+ return id;
+}
+
+/*! @brief Functions returns the Timezone location of the Timezone information XML.
+ *
+ * @param tz Timezone information in XML
+ * @returns Timezone location (Caller is responsible for freeing!)
+ */
+char *osync_time_tzlocation(xmlNode *tz) {
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, tz);
+
+ char *location = NULL;
+
+ location = osxml_find_node(tz, "TimezoneLocation");
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, location);
+ return location;
+}
+
+/*! @brief Function search for the matching Timezode node of tzid.
+ *
+ * @param root XML of entry
+ * @param tzid The TimezoneID which should match
+ * @returns *xmlNode Node of the matching Timezone
+ */
+xmlNode *osync_time_tzinfo(xmlNode *root, const char *tzid) {
+
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, root, tzid);
+
+ int numnodes, i;
+ char *tzinfo_tzid = NULL;
+
+ xmlNode *tz = NULL;
+ xmlNodeSet *nodes = NULL;
+ xmlXPathObject *xobj = NULL;
+
+ /* search matching Timezone information */
+ xobj = osxml_get_nodeset(root->doc, "/vcal/Timezone");
+ nodes = xobj->nodesetval;
+ numnodes = (nodes) ? nodes->nodeNr : 0;
+
+ osync_trace(TRACE_INTERNAL, "Found %i Timezone field(s)", numnodes);
+
+ if (!numnodes)
+ goto noresult;
+
+
+ for (i=0; i < numnodes; i++) {
+ tz = nodes->nodeTab[i];
+ tzinfo_tzid = osync_time_tzid(tz);
+
+ if (!tzinfo_tzid) {
+ g_free(tzinfo_tzid);
+ tz = NULL;
+ continue;
+ }
+
+ if (!strcmp(tzinfo_tzid, tzid))
+ break;
+ }
+
+ g_free(tzinfo_tzid);
+
+ if (!tz)
+ goto noresult;
+
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, tz);
+ return tz;
+
+noresult:
+ osync_trace(TRACE_EXIT, "%s: No matching Timezone node found. Seems to be a be a floating timestamp.", __func__);
+ return NULL;
+}
+
+/*! @brief Functions converts a field with localtime with timezone information to UTC timestamp.
+ *
+ * @param root XML of entry
+ * @param field Name of field node with timestamp and timezone information
+ * @returns UTC timestamp, or NULL when TZ information is missing (floating time) or field is not found
+ */
+char *osync_time_tzlocal2utc(xmlNode *root, const char *field) {
+ osync_trace(TRACE_ENTRY, "%s(%p, %s)", __func__, root, field);
+
+ int offset = 0;
+ char *utc = NULL, *field_tzid = NULL, *vtime = NULL;
+ xmlNode *tz = NULL;
+
+ /*
+ node = osxml_get_node(root, field);
+ if (!node) {
+ osync_trace(TRACE_EXIT, "%s: field \"%s\" not found", __func__, field);
+ return NULL;
+ }
+ */
+
+ field_tzid = osync_time_tzid(root);
+ if (!field_tzid) {
+ g_free(field_tzid);
+ goto noresult;
+ }
+
+ tz = osync_time_tzinfo(root, field_tzid);
+ g_free(field_tzid);
+
+ if (!tz)
+ goto noresult;
+
+ vtime = osxml_find_node(root, "Content");
+
+ /* Handle UTC offset like 13.5h */
+ offset = osync_time_tzoffset(vtime, tz);
+ struct tm *ttm = osync_time_vtime2tm(vtime);
+ ttm->tm_hour -= offset / 3600;
+ ttm->tm_min -= (offset % 3600) / 60;
+ mktime(ttm);
+ utc = osync_time_tm2vtime(ttm, TRUE);
+
+ g_free(vtime);
+ g_free(ttm);
+
+ osync_trace(TRACE_EXIT, "%s: %s", __func__, utc);
+ return utc;
+
+noresult:
+ osync_trace(TRACE_EXIT, "%s: No matching Timezone node is found.", __func__);
+ return NULL;
+}
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_time.h b/debian/opensync/opensync-0.22/opensync/opensync_time.h
new file mode 100644
index 00000000..69666897
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_time.h
@@ -0,0 +1,45 @@
+#ifndef _OPENSYNC_TIME_H_
+#define _OPENSYNC_TIME_H_
+
+/* Timeformat helper */
+char *osync_time_timestamp(const char *vtime);
+char *osync_time_datestamp(const char *vtime);
+osync_bool osync_time_isdate(const char *vformat);
+osync_bool osync_time_isutc(const char *vformat);
+//char *osync_time_set_vtime(const char *vtime, const char *time, osync_bool is_utc);
+
+/* Timetype helper */
+struct tm *osync_time_vtime2tm(const char *vtime);
+char *osync_time_tm2vtime(const struct tm *time, osync_bool is_utc);
+time_t osync_time_vtime2unix(const char *vtime, int offset);
+char *osync_time_unix2vtime(const time_t *timestamp);
+time_t osync_time_tm2unix(const struct tm *tmtime);
+struct tm *osync_time_unix2tm(const time_t *timestamp);
+
+/* Timezone helper */
+/* System Timezone-Reliable Helpers */
+int osync_time_timezone_diff(const struct tm *time);
+struct tm *osync_time_tm2utc(const struct tm *ltime, int offset);
+struct tm *osync_time_tm2localtime(const struct tm *utime, int offset);
+char *osync_time_vtime2utc(const char* localtime, int offset);
+char *osync_time_vtime2localtime(const char* utc, int offset);
+
+/* XXX This functions should only be used as workaround for plugins which
+ only supports localtime without any timezone information. */
+char *osync_time_vcal2localtime(const char *vcal);
+char *osync_time_vcal2utc(const char *vcal);
+
+/* Smart Timezone Helpers */
+// TODO
+
+/* Alarm Duration Timeformat helper */
+char *osync_time_sec2alarmdu(int seconds);
+int osync_time_alarmdu2sec(const char *alarm);
+
+/* Timezone ID helper */
+int osync_time_str2wday(const char *weekday);
+struct tm *osync_time_relative2tm(const char *byday, const int bymonth, const int year);
+int osync_time_utcoffset2sec(const char *offset);
+
+#endif // _OPENSYNC_TIME_H_
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_time_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_time_internals.h
new file mode 100644
index 00000000..fed57e48
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_time_internals.h
@@ -0,0 +1,17 @@
+
+#ifndef _OPENSYNC_TIME_INTERNALS_H_
+#define _OPENSYNC_TIME_INTERNALS_H_
+
+#include "opensync_xml.h"
+
+/* Timezone ID helper */
+struct tm *osync_time_dstchange(xmlNode *dstNode);
+osync_bool osync_time_isdst(const char *vtime, xmlNode *tzid);
+int osync_time_tzoffset(const char *vtime, xmlNode *tz);
+char *osync_time_tzid(xmlNode *tz);
+char *osync_time_tzlocation(xmlNode *tz);
+xmlNode *osync_time_tzinfo(xmlNode *root, const char *tzid);
+char *osync_time_tzlocal2utc(xmlNode *root, const char *field);
+
+#endif // _OPENSYNC_TIME_INTERNALS_H_
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_user.c b/debian/opensync/opensync-0.22/opensync/opensync_user.c
new file mode 100644
index 00000000..fcfe950f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_user.c
@@ -0,0 +1,99 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+/**
+ * @defgroup OSyncEnvUserPrivate OpenSync User Internals
+ * @ingroup OSyncPrivate
+ * @brief The private API of dealing with users
+ *
+ */
+/*@{*/
+
+
+/*! @brief This will create a new user
+ *
+ * The user will hold information like uid, gid, home directory etc
+ *
+ * @returns A pointer to a newly allocated OSyncUserInfo
+ *
+ */
+OSyncUserInfo *osync_user_new(OSyncError **error)
+{
+ OSyncUserInfo *user = osync_try_malloc0(sizeof(OSyncUserInfo), error);
+ if (!user)
+ return NULL;
+
+ user->uid = getuid();
+ user->gid = getgid();
+
+ user->homedir = g_get_home_dir();
+ user->username = g_get_user_name();
+
+ user->confdir = g_strdup_printf("%s/.opensync", user->homedir);
+
+ osync_trace(TRACE_INTERNAL, "Detected User:\nUID: %i\nGID: %i\nHome: %s\nOSyncDir: %s", user->uid, user->gid, user->homedir, user->confdir);
+
+ return user;
+}
+
+
+void osync_user_free(OSyncUserInfo *info)
+{
+ g_free(info->confdir);
+
+ g_free(info);
+}
+
+/*! @brief This will set the configdir for the given user
+ *
+ * This will set the configdir for the given user
+ *
+ * @param user The user to change
+ * @param path The new configdir path
+ *
+ */
+void osync_user_set_confdir(OSyncUserInfo *user, const char *path)
+{
+ g_assert(user);
+
+ if (user->confdir)
+ g_free(user->confdir);
+
+ user->confdir = g_strdup(path);
+}
+
+/*! @brief This will get the configdir for the given user
+ *
+ * This will set the configdir for the given user
+ *
+ * @param user The user to get the path from
+ * @returns The configdir path
+ *
+ */
+const char *osync_user_get_confdir(OSyncUserInfo *user)
+{
+ g_assert(user);
+ return user->confdir;
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_user_internals.h b/debian/opensync/opensync-0.22/opensync/opensync_user_internals.h
new file mode 100644
index 00000000..cc06a91c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_user_internals.h
@@ -0,0 +1,23 @@
+#ifndef _OPENSYNC_USER_INTERNALS_H_
+#define _OPENSYNC_USER_INTERNALS_H_
+
+/*! @brief Represent a user
+ * @ingroup OSyncEnvUserPrivate
+ **/
+struct OSyncUserInfo
+{
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ uid_t uid;
+ gid_t gid;
+ G_CONST_RETURN gchar *username;
+ G_CONST_RETURN gchar *homedir;
+ char *confdir;
+#endif
+};
+
+OSyncUserInfo *osync_user_new(OSyncError **error);
+void osync_user_free(OSyncUserInfo *info);
+void osync_user_set_confdir(OSyncUserInfo *user, const char *path);
+const char *osync_user_get_confdir(OSyncUserInfo *user);
+
+#endif //_OPENSYNC_USER_INTERNALS_H_
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_xml.c b/debian/opensync/opensync-0.22/opensync/opensync_xml.c
new file mode 100644
index 00000000..2a816df3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_xml.c
@@ -0,0 +1,222 @@
+/*
+ * xml - A plugin for xml objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "opensync.h"
+#include "opensync_internals.h"
+
+xmlNode *osxml_node_add_root(xmlDoc *doc, const char *name)
+{
+ doc->children = xmlNewDocNode(doc, NULL, (xmlChar*)name, NULL);
+ return doc->children;
+}
+
+xmlNode *osxml_node_get_root(xmlDoc *doc, const char *name, OSyncError **error)
+{
+ xmlNode *cur = xmlDocGetRootElement(doc);
+ if (!cur) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get xml root element");
+ return NULL;
+ }
+
+ if (xmlStrcmp((cur)->name, (const xmlChar *) name)) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Wrong xml root element");
+ return NULL;
+ }
+
+ cur = (cur)->xmlChildrenNode;
+ return cur;
+}
+
+void osxml_node_set(xmlNode *node, const char *name, const char *data, OSyncXMLEncoding encoding)
+{
+ if (name)
+ xmlNodeSetName(node, (xmlChar*)name); //FIXME Free previous name?
+
+ if (data)
+ xmlNewTextChild(node, NULL, (xmlChar*)"Content", (xmlChar*)data);
+}
+
+xmlNode *osxml_node_add(xmlNode *parent, const char *name, const char *data)
+{
+ if (!data)
+ return NULL;
+ if (strlen(data) == 0)
+ return NULL;
+ xmlNode *node = xmlNewTextChild(parent, NULL, (xmlChar*)name, (xmlChar*)data);
+ return node;
+}
+
+void osxml_node_add_property(xmlNode *parent, const char *name, const char *data)
+{
+ xmlNewProp(parent, (xmlChar*)name, (xmlChar*)data);
+}
+
+void osxml_node_mark_unknown(xmlNode *parent)
+{
+ if (!xmlHasProp(parent, (xmlChar*)"Type"))
+ xmlNewProp(parent, (xmlChar*)"Type", (xmlChar*)"Unknown");
+}
+
+void osxml_node_remove_unknown_mark(xmlNode *node)
+{
+ xmlAttr *attr = xmlHasProp(node, (xmlChar*)"Type");
+ if (!attr)
+ return;
+ xmlRemoveProp(attr);
+}
+
+xmlNode *osxml_get_node(xmlNode *parent, const char *name)
+{
+ xmlNode *cur = (parent)->xmlChildrenNode;
+ while (cur) {
+ if (!xmlStrcmp(cur->name, (const xmlChar *)name))
+ return cur;
+ cur = cur->next;
+ }
+ return NULL;
+}
+
+char *osxml_find_node(xmlNode *parent, const char *name)
+{
+ return (char*)xmlNodeGetContent(osxml_get_node(parent, name));
+}
+
+xmlXPathObject *osxml_get_nodeset(xmlDoc *doc, const char *expression)
+{
+ xmlXPathContext *xpathCtx = NULL;
+ xmlXPathObject *xpathObj = NULL;
+
+ /* Create xpath evaluation context */
+ xpathCtx = xmlXPathNewContext(doc);
+ if(xpathCtx == NULL) {
+ fprintf(stderr,"Error: unable to create new XPath context\n");
+ return NULL;
+ }
+
+ /* Evaluate xpath expression */
+ xpathObj = xmlXPathEvalExpression((xmlChar*)expression, xpathCtx);
+ if(xpathObj == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression \"%s\"\n", expression);
+ xmlXPathFreeContext(xpathCtx);
+ return NULL;
+ }
+
+ xmlXPathFreeContext(xpathCtx);
+ /* Cleanup of XPath data */
+ // xmlXPathFreeObject(xpathObj);
+ return xpathObj;
+}
+
+xmlXPathObject *osxml_get_unknown_nodes(xmlDoc *doc)
+{
+ return osxml_get_nodeset(doc, "/*/*[@Type='Unknown']");
+}
+
+void osxml_map_unknown_param(xmlNode *node, const char *paramname, const char *newname)
+{
+ xmlNode *cur = node->xmlChildrenNode;
+ while (cur) {
+ if (xmlStrcmp(cur->name, (const xmlChar *)"UnknownParam"))
+ goto next;
+
+ char *name = osxml_find_node(cur, "ParamName");
+ char *content = osxml_find_node(cur, "Content");
+ if (!strcmp(name, paramname)) {
+ osxml_node_add(node, newname, content);
+ osxml_node_remove_unknown_mark(node);
+
+ xmlUnlinkNode(cur);
+ xmlFreeNode(cur);
+ g_free(name);
+ g_free(content);
+ return;
+ }
+
+ g_free(name);
+ g_free(content);
+
+ next:;
+ cur = cur->next;
+ }
+}
+
+osync_bool osxml_has_property_full(xmlNode *parent, const char *name, const char *data)
+{
+ if (osxml_has_property(parent, name))
+ return (strcmp((char*)xmlGetProp(parent, (xmlChar*)name), data) == 0);
+ return FALSE;
+}
+
+char *osxml_find_property(xmlNode *parent, const char *name)
+{
+ return (char*)xmlGetProp(parent, (xmlChar*)name);
+}
+
+osync_bool osxml_has_property(xmlNode *parent, const char *name)
+{
+ return (xmlHasProp(parent, (xmlChar*)name) != NULL);
+}
+
+xmlChar *osxml_write_to_string(xmlDoc *doc)
+{
+ xmlKeepBlanksDefault(0);
+ xmlChar *temp = NULL;
+ int size = 0;
+ xmlDocDumpFormatMemoryEnc(doc, &temp, &size, NULL, 1);
+ return temp;
+}
+
+osync_bool osxml_copy(const char *input, int inpsize, char **output, int *outpsize)
+{
+ xmlDoc *doc = (xmlDoc *)(input);
+ xmlDoc *newdoc = xmlCopyDoc(doc, TRUE);
+ *output = (char *)newdoc;
+ *outpsize = sizeof(newdoc);
+ return TRUE;
+}
+
+osync_bool osxml_marshall(const char *input, int inpsize, char **output, int *outpsize, OSyncError **error)
+{
+ xmlDoc *doc = (xmlDoc*)input;
+ xmlChar *result;
+ int size;
+ xmlDocDumpMemory(doc, &result, &size);
+ *output = (char*)result;
+ *outpsize = size;
+ return TRUE;
+}
+
+osync_bool osxml_demarshall(const char *input, int inpsize, char **output, int *outpsize, OSyncError **error)
+{
+ xmlDoc *doc = xmlParseMemory(input, inpsize);
+ if (!doc) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Invalid XML data received");
+ goto error;
+ }
+
+ *output = (char*)doc;
+ *outpsize = sizeof(*doc);
+ return TRUE;
+
+error:
+ return FALSE;
+}
+
+
diff --git a/debian/opensync/opensync-0.22/opensync/opensync_xml.h b/debian/opensync/opensync-0.22/opensync/opensync_xml.h
new file mode 100644
index 00000000..5ab34c45
--- /dev/null
+++ b/debian/opensync/opensync-0.22/opensync/opensync_xml.h
@@ -0,0 +1,60 @@
+#ifndef _OPENSYNC_XML_H
+#define _OPENSYNC_XML_H
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef enum osxmlEncoding {
+ OSXML_8BIT = 0,
+ OSXML_QUOTED_PRINTABLE = 1,
+ OSXML_BASE64 = 2
+} osxmlEncoding;
+
+typedef enum osxmlCharset {
+ OSXML_ASCII = 0,
+ OSXML_UTF8 = 1
+} osxmlCharset;
+
+typedef struct OSyncXMLEncoding OSyncXMLEncoding;
+struct OSyncXMLEncoding {
+ osxmlEncoding encoding;
+ osxmlCharset charset;
+};
+
+xmlNode *osxml_node_add_root(xmlDoc *doc, const char *name);
+xmlNode *osxml_node_get_root(xmlDoc *doc, const char *name, OSyncError **error);
+xmlNode *osxml_get_node(xmlNode *parent, const char *name);
+
+xmlNode *osxml_node_add(xmlNode *parent, const char *name, const char *data);
+//void osxml_format_dump(OSyncXML *xml, char **data, int *size);
+xmlNode *osxml_format_parse(const char *input, int size, const char *rootname, OSyncError **error);
+char *osxml_find_node(xmlNode *parent, const char *name);
+void osxml_node_add_property(xmlNode *parent, const char *name, const char *data);
+char *osxml_find_property(xmlNode *parent, const char *name);
+osync_bool osxml_has_property(xmlNode *parent, const char *name);
+osync_bool osxml_has_property_full(xmlNode *parent, const char *name, const char *data);
+
+void osxml_node_mark_unknown(xmlNode *parent);
+void osxml_node_remove_unknown_mark(xmlNode *node);
+void osxml_map_unknown_param(xmlNode *node, const char *paramname, const char *newname);
+
+void osxml_node_set(xmlNode *node, const char *name, const char *data, OSyncXMLEncoding encoding);
+xmlXPathObject *osxml_get_nodeset(xmlDoc *doc, const char *expression);
+xmlXPathObject *osxml_get_unknown_nodes(xmlDoc *doc);
+xmlChar *osxml_write_to_string(xmlDoc *doc);
+osync_bool osxml_copy(const char *input, int inpsize, char **output, int *outpsize);
+
+osync_bool osxml_marshall(const char *input, int inpsize, char **output, int *outpsize, OSyncError **error);
+osync_bool osxml_demarshall(const char *input, int inpsize, char **output, int *outpsize, OSyncError **error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _OPENSYNC_XML_H
diff --git a/debian/opensync/opensync-0.22/osengine-1.0-uninstalled.pc.in b/debian/opensync/opensync-0.22/osengine-1.0-uninstalled.pc.in
new file mode 100644
index 00000000..ef39fbf6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine-1.0-uninstalled.pc.in
@@ -0,0 +1,9 @@
+libdir=@ac_workaround_abs_builddir@
+includedir=@ac_workaround_abs_srcdir@
+datarootdir=@datarootdir@
+
+Name: osengine
+Description: OpenSync sync engine (uninstalled version)
+Version: @VERSION@
+Libs: -L${libdir} -losengine
+Cflags: -I${includedir}
diff --git a/debian/opensync/opensync-0.22/osengine-1.0.pc.in b/debian/opensync/opensync-0.22/osengine-1.0.pc.in
new file mode 100644
index 00000000..80ee3ca8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine-1.0.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+datarootdir=@datarootdir@
+
+Name: osengine
+Description: OpenSync sync engine
+Version: @VERSION@
+Libs: -L${libdir} -losengine
+Cflags: -I${includedir}/opensync-1.0
diff --git a/debian/opensync/opensync-0.22/osengine/Makefile.am b/debian/opensync/opensync-0.22/osengine/Makefile.am
new file mode 100755
index 00000000..115a428a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/Makefile.am
@@ -0,0 +1,47 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CFLAGS = -Werror -Wall @GCOV_CFLAGS@ @XML_CFLAGS@
+
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@
+
+if BUILD_ENGINE
+lib_LTLIBRARIES = libosengine.la
+endif
+
+if BUILD_ENGINE
+osengineincludedir = @OPENSYNC_ENGINEHEADERDIR@
+osengineinclude_HEADERS = \
+ engine.h \
+ osengine_mapping.h \
+ osengine_engine.h \
+ osengine_status.h \
+ osengine_debug.h
+endif
+
+libosengine_la_SOURCES = \
+ osengine_client.c \
+ osengine_engine.c \
+ osengine_status.c \
+ osengine_debug.c \
+ osengine_mapping.c \
+ osengine_mapcmds.c \
+ osengine_deciders.c \
+ osengine_flags.c
+
+EXTRA_DIST = \
+ engine_internals.h \
+ osengine_client_internals.h \
+ osengine_engine_internals.h \
+ osengine_flags_internals.h \
+ osengine_mapping_internals.h \
+ osengine_mapcmds_internals.h \
+ osengine_deciders_internals.h \
+ osengine_debug_internals.h
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+libosengine_la_LDFLAGS = $(PACKAGE_LIBS) -R $(libdir) @GCOV_LDFLAGS@
+libosengine_la_LIBADD = $(top_builddir)/opensync/libopensync.la
diff --git a/debian/opensync/opensync-0.22/osengine/Makefile.in b/debian/opensync/opensync-0.22/osengine/Makefile.in
new file mode 100644
index 00000000..4474986f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/Makefile.in
@@ -0,0 +1,577 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = osengine
+DIST_COMMON = $(am__osengineinclude_HEADERS_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+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)$(osengineincludedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libosengine_la_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+am_libosengine_la_OBJECTS = osengine_client.lo osengine_engine.lo \
+ osengine_status.lo osengine_debug.lo osengine_mapping.lo \
+ osengine_mapcmds.lo osengine_deciders.lo osengine_flags.lo
+libosengine_la_OBJECTS = $(am_libosengine_la_OBJECTS)
+@BUILD_ENGINE_TRUE@am_libosengine_la_rpath = -rpath $(libdir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libosengine_la_SOURCES)
+DIST_SOURCES = $(libosengine_la_SOURCES)
+am__osengineinclude_HEADERS_DIST = engine.h osengine_mapping.h \
+ osengine_engine.h osengine_status.h osengine_debug.h
+osengineincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(osengineinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = -Werror -Wall @GCOV_CFLAGS@ @XML_CFLAGS@
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@
+@BUILD_ENGINE_TRUE@lib_LTLIBRARIES = libosengine.la
+@BUILD_ENGINE_TRUE@osengineincludedir = @OPENSYNC_ENGINEHEADERDIR@
+@BUILD_ENGINE_TRUE@osengineinclude_HEADERS = \
+@BUILD_ENGINE_TRUE@ engine.h \
+@BUILD_ENGINE_TRUE@ osengine_mapping.h \
+@BUILD_ENGINE_TRUE@ osengine_engine.h \
+@BUILD_ENGINE_TRUE@ osengine_status.h \
+@BUILD_ENGINE_TRUE@ osengine_debug.h
+
+libosengine_la_SOURCES = \
+ osengine_client.c \
+ osengine_engine.c \
+ osengine_status.c \
+ osengine_debug.c \
+ osengine_mapping.c \
+ osengine_mapcmds.c \
+ osengine_deciders.c \
+ osengine_flags.c
+
+EXTRA_DIST = \
+ engine_internals.h \
+ osengine_client_internals.h \
+ osengine_engine_internals.h \
+ osengine_flags_internals.h \
+ osengine_mapping_internals.h \
+ osengine_mapcmds_internals.h \
+ osengine_deciders_internals.h \
+ osengine_debug_internals.h
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+libosengine_la_LDFLAGS = $(PACKAGE_LIBS) -R $(libdir) @GCOV_LDFLAGS@
+libosengine_la_LIBADD = $(top_builddir)/opensync/libopensync.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign osengine/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign osengine/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-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) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --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
+libosengine.la: $(libosengine_la_OBJECTS) $(libosengine_la_DEPENDENCIES)
+ $(LINK) $(am_libosengine_la_rpath) $(libosengine_la_LDFLAGS) $(libosengine_la_OBJECTS) $(libosengine_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_client.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_debug.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_deciders.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_engine.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_flags.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_mapcmds.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_mapping.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osengine_status.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-osengineincludeHEADERS: $(osengineinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(osengineincludedir)" || $(mkdir_p) "$(DESTDIR)$(osengineincludedir)"
+ @list='$(osengineinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(osengineincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(osengineincludedir)/$$f'"; \
+ $(osengineincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(osengineincludedir)/$$f"; \
+ done
+
+uninstall-osengineincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(osengineinclude_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(osengineincludedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(osengineincludedir)/$$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; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(osengineincludedir)"; 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:
+ -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-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-osengineincludeHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
+ uninstall-osengineincludeHEADERS
+
+.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-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES install-man \
+ install-osengineincludeHEADERS install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+ uninstall-libLTLIBRARIES uninstall-osengineincludeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/osengine/engine.h b/debian/opensync/opensync-0.22/osengine/engine.h
new file mode 100644
index 00000000..30e7262a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/engine.h
@@ -0,0 +1,31 @@
+#ifndef HAVE_ENGINE_H
+#define HAVE_ENGINE_H
+
+#include <opensync/opensync.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**************************************************************
+ * Structs
+ *************************************************************/
+typedef struct OSyncEngine OSyncEngine;
+typedef struct OSyncClient OSyncClient;
+typedef struct OSyncMapping OSyncMapping;
+
+/**************************************************************
+ * Includes
+ *************************************************************/
+
+#include "osengine_status.h"
+#include "osengine_engine.h"
+#include "osengine_mapping.h"
+#include "osengine_debug.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/debian/opensync/opensync-0.22/osengine/engine_internals.h b/debian/opensync/opensync-0.22/osengine/engine_internals.h
new file mode 100644
index 00000000..d5a0b12f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/engine_internals.h
@@ -0,0 +1,24 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <glib.h>
+
+#define segfault_me char **blablabla = NULL; *blablabla = "test";
+
+typedef void (* OSyncFlagTriggerFunc) (gpointer user_data1, gpointer user_data2);
+
+typedef struct OSyncFlag OSyncFlag;
+typedef struct OSyncMappingTable OSyncMappingTable;
+typedef struct OSyncMappingView OSyncMappingView;
+typedef struct OSyncMappingEntry OSyncMappingEntry;
+
+#include "opensync/opensync_message_internals.h"
+
+#include "osengine_deciders_internals.h"
+#include "osengine_debug.h"
+#include "osengine_flags_internals.h"
+#include "osengine_engine_internals.h"
+#include "osengine_mapping_internals.h"
+#include "osengine_mapcmds_internals.h"
+#include "osengine_client_internals.h"
+#include "osengine_debug_internals.h"
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_client.c b/debian/opensync/opensync-0.22/osengine/osengine_client.c
new file mode 100644
index 00000000..76b0b652
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_client.c
@@ -0,0 +1,891 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+#include <glib.h>
+#include <opensync/opensync_support.h>
+#include "opensync/opensync_format_internals.h"
+#include "opensync/opensync_member_internals.h"
+#include "opensync/opensync_message_internals.h"
+#include "opensync/opensync_queue_internals.h"
+
+#include "engine_internals.h"
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <signal.h>
+
+/*! @brief This function can be used to receive GET_ENTRY command replies
+ *
+ * See OSyncMessageHandler
+ *
+ */
+void _get_changes_reply_receiver(OSyncMessage *message, OSyncClient *sender)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, sender);
+ OSyncEngine *engine = sender->engine;
+
+ if (osync_message_is_error(message)) {
+ OSyncError *error = NULL;
+ osync_demarshal_error(message, &error);
+ osync_error_duplicate(&engine->error, &error);
+ osync_debug("ENG", 1, "Get changes command reply was a error: %s", osync_error_print(&error));
+ osync_status_update_member(engine, sender, MEMBER_GET_CHANGES_ERROR, &error);
+ osync_error_update(&engine->error, "Unable to read from one of the members");
+ osync_flag_unset(sender->fl_sent_changes);
+ //osync_flag_set(sender->fl_finished);
+ osync_flag_set(sender->fl_done);
+ /*
+ * FIXME: For now we want to stop the engine if
+ * one of the member didnt connect yet. Later it should
+ * be that if >= 2 members connect, the sync should continue
+ */
+ osync_flag_set(engine->fl_stop);
+
+ } else {
+ osync_status_update_member(engine, sender, MEMBER_SENT_CHANGES, NULL);
+ osync_flag_set(sender->fl_sent_changes);
+ }
+
+ osengine_client_decider(engine, sender);
+ osync_trace(TRACE_EXIT, "_get_changes_reply_receiver");
+}
+
+/*! @brief This function can be used to receive CONNECT command replies
+ *
+ * See OSyncMessageHandler
+ *
+ */
+void _connect_reply_receiver(OSyncMessage *message, OSyncClient *sender)
+{
+ osync_trace(TRACE_ENTRY, "_connect_reply_receiver(%p, %p)", message, sender);
+
+ osync_trace(TRACE_INTERNAL, "connect reply %i", osync_message_is_error(message));
+ OSyncEngine *engine = sender->engine;
+
+ if (osync_message_is_error(message)) {
+ OSyncError *error = NULL;
+ osync_demarshal_error(message, &error);
+ osync_error_duplicate(&engine->error, &error);
+ osync_debug("ENG", 1, "Connect command reply was a error: %s", osync_error_print(&error));
+ osync_status_update_member(engine, sender, MEMBER_CONNECT_ERROR, &error);
+ osync_error_update(&engine->error, "Unable to connect one of the members");
+ osync_flag_unset(sender->fl_connected);
+ osync_flag_set(sender->fl_finished);
+ osync_flag_set(sender->fl_sent_changes);
+ osync_flag_set(sender->fl_done);
+ /*
+ * FIXME: For now we want to stop the engine if
+ * one of the member didnt connect yet. Later it should
+ * be that if >= 2 members connect, the sync should continue
+ */
+ osync_flag_set(engine->fl_stop);
+
+ } else {
+ osync_member_read_sink_info(sender->member, message);
+
+ osync_status_update_member(engine, sender, MEMBER_CONNECTED, NULL);
+ osync_flag_set(sender->fl_connected);
+ }
+
+ osengine_client_decider(engine, sender);
+ osync_trace(TRACE_EXIT, "_connect_reply_receiver");
+}
+
+void _sync_done_reply_receiver(OSyncMessage *message, OSyncClient *sender)
+{
+ osync_trace(TRACE_ENTRY, "_sync_done_reply_receiver(%p, %p)", message, sender);
+
+ OSyncEngine *engine = sender->engine;
+
+ if (osync_message_is_error(message)) {
+ OSyncError *error = NULL;
+ osync_demarshal_error(message, &error);
+ osync_error_duplicate(&engine->error, &error);
+ osync_debug("ENG", 1, "Sync done command reply was a error: %s", osync_error_print(&error));
+ osync_status_update_member(engine, sender, MEMBER_SYNC_DONE_ERROR, &error);
+ osync_error_update(&engine->error, "Unable to finish the sync for one of the members");
+ }
+
+ osync_flag_set(sender->fl_done);
+ osengine_client_decider(engine, sender);
+ osync_trace(TRACE_EXIT, "_sync_done_reply_receiver");
+}
+
+void _committed_all_reply_receiver(OSyncMessage *message, OSyncClient *sender)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, sender);
+
+ OSyncEngine *engine = sender->engine;
+
+ if (osync_message_is_error(message)) {
+ OSyncError *error = NULL;
+ osync_demarshal_error(message, &error);
+ osync_error_duplicate(&engine->error, &error);
+ osync_debug("ENG", 1, "Committed all command reply was a error: %s", osync_error_print(&error));
+ osync_status_update_member(engine, sender, MEMBER_COMMITTED_ALL_ERROR, &error);
+ osync_error_update(&engine->error, "Unable to write changes to one of the members");
+ } else
+ osync_status_update_member(engine, sender, MEMBER_COMMITTED_ALL, NULL);
+
+ osync_flag_set(sender->fl_committed_all);
+ osengine_client_decider(engine, sender);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void _disconnect_reply_receiver(OSyncMessage *message, OSyncClient *sender)
+{
+ osync_trace(TRACE_ENTRY, "_disconnect_reply_receiver(%p, %p)", message, sender);
+
+ OSyncEngine *engine = sender->engine;
+
+ if (osync_message_is_error(message)) {
+ OSyncError *error = NULL;
+ osync_demarshal_error(message, &error);
+ osync_debug("ENG", 1, "Sync done command reply was a error: %s", osync_error_print(&error));
+ osync_status_update_member(engine, sender, MEMBER_DISCONNECT_ERROR, &error);
+ } else
+ osync_status_update_member(engine, sender, MEMBER_DISCONNECTED, NULL);
+
+ osync_flag_unset(sender->fl_connected);
+ osync_flag_set(sender->fl_finished);
+ osengine_client_decider(engine, sender);
+ osync_trace(TRACE_EXIT, "_disconnect_reply_receiver");
+}
+
+void _get_change_data_reply_receiver(OSyncMessage *message, OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_ENTRY, "_get_change_data_reply_receiver(%p, %p, %p)", message, entry);
+ OSyncEngine *engine = entry->client->engine;
+
+ if (osync_message_is_error(message)) {
+ OSyncError *error = NULL;
+ osync_demarshal_error(message, &error);
+ osync_error_duplicate(&engine->error, &error);
+ osync_debug("MAP", 1, "Commit change command reply was a error: %s", osync_error_print(&error));
+ osync_status_update_change(engine, entry->change, CHANGE_RECV_ERROR, &error);
+ osync_error_update(&engine->error, "Unable to read one or more objects");
+
+ //FIXME Do we need to do anything here?
+ //osync_flag_unset(entry->fl_has_data);
+ } else {
+
+ osync_demarshal_changedata(message, entry->change);
+
+ osync_flag_set(entry->fl_has_data);
+ osync_status_update_change(engine, entry->change, CHANGE_RECEIVED, NULL);
+ }
+
+ osync_change_save(entry->change, TRUE, NULL);
+ osengine_mappingentry_decider(engine, entry);
+ osync_trace(TRACE_EXIT, "_get_change_data_reply_receiver");
+}
+
+void _read_change_reply_receiver(OSyncClient *sender, OSyncMessage *message, OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "_read_change_reply_receiver(%p, %p, %p)", sender, message, engine);
+
+ /*OSyncMappingEntry *entry = osync_message_get_data(message, "entry");
+
+ osync_flag_detach(entry->fl_read);
+
+ osync_flag_unset(entry->mapping->fl_solved);
+ osync_flag_unset(entry->mapping->fl_chkconflict);
+ osync_flag_unset(entry->mapping->fl_multiplied);
+
+ if (osync_change_get_changetype(entry->change) == CHANGE_DELETED)
+ osync_flag_set(entry->fl_deleted);
+
+ osync_flag_set(entry->fl_has_info);
+ osync_flag_unset(entry->fl_synced);
+
+ osync_change_save(entry->change, TRUE, NULL);
+
+ osync_status_update_change(engine, entry->change, CHANGE_RECEIVED, NULL);
+
+ osengine_mappingentry_decider(engine, entry);*/
+ osync_trace(TRACE_EXIT, "_read_change_reply_receiver");
+}
+
+void _commit_change_reply_receiver(OSyncMessage *message, OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_ENTRY, "_commit_change_reply_receiver(%p, %p)", message, entry);
+ OSyncEngine *engine = entry->client->engine;
+
+ if (osync_message_is_error(message)) {
+ OSyncError *error = NULL;
+ osync_demarshal_error(message, &error);
+ osync_error_duplicate(&engine->error, &error);
+ osync_debug("MAP", 1, "Commit change command reply was a error: %s", osync_error_print(&error));
+ osync_status_update_change(engine, entry->change, CHANGE_WRITE_ERROR, &error);
+ OSyncError *maperror = NULL;
+ osync_error_duplicate(&maperror, &error);
+ osync_status_update_mapping(engine, entry->mapping, MAPPING_WRITE_ERROR, &maperror);
+ osync_error_update(&engine->error, "Unable to write one or more objects");
+
+ //FIXME Do we need to do anything here?
+ osync_flag_unset(entry->fl_dirty);
+ osync_flag_set(entry->fl_synced);
+ } else {
+ /* The plugin may have generated a new UID after committing the change. The commit
+ * change reply will return the new UID of the change
+ */
+
+ char *newuid;
+ osync_message_read_string(message, &newuid);
+ osync_change_set_uid(entry->change, newuid);
+
+ osync_status_update_change(engine, entry->change, CHANGE_SENT, NULL);
+ osync_flag_unset(entry->fl_dirty);
+ osync_flag_set(entry->fl_synced);
+ }
+
+ if (osync_change_get_changetype(entry->change) == CHANGE_DELETED)
+ osync_flag_set(entry->fl_deleted);
+
+ osync_change_reset(entry->change);
+
+ OSyncError *error = NULL;
+ osync_change_save(entry->change, TRUE, &error);
+
+ osengine_mappingentry_decider(engine, entry);
+ osync_trace(TRACE_EXIT, "_commit_change_reply_receiver");
+}
+
+OSyncClient *osync_client_new(OSyncEngine *engine, OSyncMember *member, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, engine, member, error);
+ OSyncClient *client = osync_try_malloc0(sizeof(OSyncClient), error);
+ if (!client)
+ goto error;
+
+ client->member = member;
+ osync_member_set_data(member, client);
+ client->engine = engine;
+ engine->clients = g_list_append(engine->clients, client);
+
+ char *name = g_strdup_printf("%s/pluginpipe", osync_member_get_configdir(member));
+ client->commands_to_osplugin = osync_queue_new(name, error);
+ g_free(name);
+
+ name = g_strdup_printf("%s/enginepipe", osync_member_get_configdir(member));
+ client->commands_from_osplugin = osync_queue_new(name, error);
+ g_free(name);
+
+ if (!client->commands_to_osplugin || !client->commands_from_osplugin)
+ goto error_free_client;
+
+ client->fl_connected = osync_flag_new(engine->cmb_connected);
+ client->fl_sent_changes = osync_flag_new(engine->cmb_sent_changes);
+ client->fl_done = osync_flag_new(NULL);
+ client->fl_committed_all = osync_flag_new(engine->cmb_committed_all_sent);
+ client->fl_finished = osync_flag_new(engine->cmb_finished);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, client);
+ return client;
+
+error_free_client:
+ g_free(client);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+}
+
+void osync_client_reset(OSyncClient *client)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, client);
+ osync_flag_set_state(client->fl_connected, FALSE);
+ osync_flag_set_state(client->fl_sent_changes, FALSE);
+ osync_flag_set_state(client->fl_done, FALSE);
+ osync_flag_set_state(client->fl_finished, FALSE);
+ osync_flag_set_state(client->fl_committed_all, FALSE);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_client_free(OSyncClient *client)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, client);
+ osync_queue_free(client->commands_to_osplugin);
+ osync_queue_free(client->commands_from_osplugin);
+
+ osync_flag_free(client->fl_connected);
+ osync_flag_free(client->fl_sent_changes);
+ osync_flag_free(client->fl_done);
+ osync_flag_free(client->fl_finished);
+ osync_flag_free(client->fl_committed_all);
+
+ g_free(client);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void *osync_client_message_sink(OSyncMember *member, const char *name, void *data, osync_bool synchronous)
+{
+ OSyncClient *client = osync_member_get_data(member);
+ OSyncEngine *engine = client->engine;
+ if (!synchronous) {
+ /*OSyncMessage *message = itm_message_new_signal(client, "PLUGIN_MESSAGE");
+ osync_debug("CLI", 3, "Sending message %p PLUGIN_MESSAGE for message %s", message, name);
+ itm_message_set_data(message, "data", data);
+ itm_message_set_data(message, "name", g_strdup(name));
+ itm_queue_send(engine->incoming, message);*/
+ return NULL;
+ } else {
+ return engine->plgmsg_callback(engine, client, name, data, engine->plgmsg_userdata);
+ }
+}
+
+OSyncPluginTimeouts osync_client_get_timeouts(OSyncClient *client)
+{
+ return osync_plugin_get_timeouts(osync_member_get_plugin(client->member));
+}
+
+void osync_client_call_plugin(OSyncClient *client, char *function, void *data, OSyncPluginReplyHandler replyhandler, void *userdata)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p, %p)", __func__, client, function, data, replyhandler, userdata);
+
+ /*OSyncEngine *engine = client->engine;
+ ITMessage *message = itm_message_new_methodcall(engine, "CALL_PLUGIN");
+ itm_message_set_data(message, "data", data);
+ itm_message_set_data(message, "function", g_strdup(function));
+
+ if (replyhandler) {
+ OSyncPluginCallContext *ctx = g_malloc0(sizeof(OSyncPluginCallContext));
+ ctx->handler = replyhandler;
+ ctx->userdata = userdata;
+ itm_message_set_handler(message, engine->incoming, (ITMessageHandler)_recv_plugin_answer, ctx);
+
+ itm_message_set_data(message, "want_reply", GINT_TO_POINTER(1));
+ } else
+ itm_message_set_data(message, "want_reply", GINT_TO_POINTER(0));
+
+ itm_queue_send(client->incoming, message);*/
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+osync_bool osync_client_get_changes(OSyncClient *target, OSyncEngine *sender, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, target, sender, error);
+
+ osync_flag_changing(target->fl_sent_changes);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_GET_CHANGES, 0, error);
+ if (!message)
+ goto error;
+
+ osync_message_set_handler(message, (OSyncMessageHandler)_get_changes_reply_receiver, target);
+
+ osync_member_write_sink_info(target->member, message);
+
+ OSyncPluginTimeouts timeouts = osync_client_get_timeouts(target);
+ if (!osync_queue_send_message_with_timeout(target->commands_to_osplugin, target->commands_from_osplugin, message, timeouts.get_changeinfo_timeout, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_client_get_change_data(OSyncClient *target, OSyncEngine *sender, OSyncMappingEntry *entry, OSyncError **error)
+{
+ osync_flag_changing(entry->fl_has_data);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_GET_CHANGEDATA, 0, error);
+ if (!message)
+ goto error;
+
+ osync_message_set_handler(message, (OSyncMessageHandler)_get_change_data_reply_receiver, entry);
+
+ osync_marshal_change(message, entry->change);
+
+ osync_debug("ENG", 3, "Sending get_changedata message %p to client %p", message, entry->client);
+
+ OSyncPluginTimeouts timeouts = osync_client_get_timeouts(target);
+ if (!osync_queue_send_message_with_timeout(target->commands_to_osplugin, target->commands_from_osplugin, message, timeouts.get_data_timeout, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+/*void osync_client_read_change(OSyncEngine *sender, OSyncMappingEntry *entry)
+{
+ //osync_flag_changing(entry->fl_has_data);
+ OSyncMessage *message = osync_message_new_methodcall(sender, "READ_CHANGE");
+ osync_message_set_handler(message, sender->incoming, (OSyncMessageHandler)_read_change_reply_receiver, sender);
+ osync_message_set_data(message, "change", entry->change);
+ osync_message_set_data(message, "entry", entry);
+ osync_debug("ENG", 3, "Sending read_change message %p to client %p", message, entry->client);
+
+ OSyncPluginTimeouts timeouts = osync_client_get_timeouts(entry->client);
+ osync_queue_send_with_timeout(entry->client->incoming, message, timeouts.read_change_timeout, sender);
+}*/
+
+osync_bool osync_client_connect(OSyncClient *target, OSyncEngine *sender, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, target, sender, error);
+
+ osync_flag_changing(target->fl_connected);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_CONNECT, 0, error);
+ if (!message)
+ goto error;
+
+ osync_member_write_sink_info(target->member, message);
+
+ osync_message_set_handler(message, (OSyncMessageHandler)_connect_reply_receiver, target);
+
+ OSyncPluginTimeouts timeouts = osync_client_get_timeouts(target);
+ if (!osync_queue_send_message_with_timeout(target->commands_to_osplugin, target->commands_from_osplugin, message, timeouts.connect_timeout, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_client_commit_change(OSyncClient *target, OSyncEngine *sender, OSyncMappingEntry *entry, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, target, sender, entry);
+ osync_trace(TRACE_INTERNAL, "Committing change with uid %s, changetype %i, data %p, size %i, objtype %s and format %s from member %lli", osync_change_get_uid(entry->change), osync_change_get_changetype(entry->change), osync_change_get_data(entry->change), osync_change_get_datasize(entry->change), osync_change_get_objtype(entry->change) ? osync_objtype_get_name(osync_change_get_objtype(entry->change)) : "None", osync_change_get_objformat(entry->change) ? osync_objformat_get_name(osync_change_get_objformat(entry->change)) : "None", osync_member_get_id(entry->client->member));
+
+ osync_flag_changing(entry->fl_dirty);
+
+ // convert the data to the format accepted by the member
+ if (!osync_change_convert_member_sink(osync_group_get_format_env(sender->group), entry->change, target->member, error))
+ goto error;
+
+ if (osync_change_get_changetype(entry->change) == CHANGE_ADDED) {
+ int elevated = 0;
+ // Generate a new UID, if necessary
+ OSyncMappingView *view = osengine_mappingtable_find_view(sender->maptable, target->member);
+ while (!osengine_mappingview_uid_is_unique(view, entry, TRUE)) {
+ if (!osync_change_elevate(sender, entry->change, 1))
+ break;
+ elevated++;
+ }
+
+ if (elevated) {
+ // Save the newly generated UID
+ if (!osync_change_save(entry->change, TRUE, error))
+ goto error;
+ }
+ }
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_COMMIT_CHANGE, 0, error);
+ if (!message)
+ goto error;
+
+ osync_marshal_change(message, entry->change);
+
+ osync_message_set_handler(message, (OSyncMessageHandler)_commit_change_reply_receiver, entry);
+ OSyncPluginTimeouts timeouts = osync_client_get_timeouts(entry->client);
+
+ if (!osync_queue_send_message_with_timeout(target->commands_to_osplugin, target->commands_from_osplugin, message, timeouts.commit_timeout, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ g_assert(osync_flag_is_attached(entry->fl_committed) == TRUE);
+ osync_flag_detach(entry->fl_committed);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_client_sync_done(OSyncClient *target, OSyncEngine *sender, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, target, sender, error);
+
+ osync_flag_changing(target->fl_done);
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_SYNC_DONE, 0, error);
+ if (!message)
+ goto error;
+
+ osync_message_set_handler(message, (OSyncMessageHandler)_sync_done_reply_receiver, target);
+
+ OSyncPluginTimeouts timeouts = osync_client_get_timeouts(target);
+ if (!osync_queue_send_message_with_timeout(target->commands_to_osplugin, target->commands_from_osplugin, message, timeouts.sync_done_timeout, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_client_committed_all(OSyncClient *target, OSyncEngine *sender, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, target, sender);
+
+ osync_flag_changing(target->fl_committed_all);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_COMMITTED_ALL, 0, error);
+ if (!message)
+ goto error;
+
+ osync_message_set_handler(message, (OSyncMessageHandler)_committed_all_reply_receiver, target);
+
+ //OSyncPluginTimeouts timeouts = osync_client_get_timeouts(target);
+ /*FIXME: Add timeout to committed_all message */
+ if (!osync_queue_send_message(target->commands_to_osplugin, target->commands_from_osplugin, message, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_client_disconnect(OSyncClient *target, OSyncEngine *sender, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, target, sender);
+
+ osync_flag_changing(target->fl_connected);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_DISCONNECT, 0, error);
+ if (!message)
+ goto error;
+
+ osync_message_set_handler(message, (OSyncMessageHandler)_disconnect_reply_receiver, target);
+
+ OSyncPluginTimeouts timeouts = osync_client_get_timeouts(target);
+ if (!osync_queue_send_message_with_timeout(target->commands_to_osplugin, target->commands_from_osplugin, message, timeouts.disconnect_timeout, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+
+/*
+void osync_client_call_plugin_with_reply(OSyncClient *client, char *function, void *data, void ( *replyhandler)(OSyncEngine *, OSyncClient *, void *, OSyncError *), int timeout)
+{
+ OSyncEngine *engine = client->engine;
+ ITMessage *message = itm_message_new_signal(engine, "CALL_PLUGIN");
+ osync_debug("CLI", 3, "Sending message %p CALL_PLUGIN for function %s", message, function);
+ itm_message_set_data(message, "data", data);
+ itm_message_set_data(message, "function", g_strdup(function));
+ itm_queue_send_with_reply(client->incoming, message);
+}*/
+
+char *osync_client_pid_filename(OSyncClient *client)
+{
+ return g_strdup_printf("%s/osplugin.pid", client->member->configdir);
+}
+
+osync_bool osync_client_remove_pidfile(OSyncClient *client, OSyncError **error)
+{
+ osync_bool ret = FALSE;
+ char *pidpath = osync_client_pid_filename(client);
+
+ if (unlink(pidpath) < 0) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Couldn't remove pid file: %s", strerror(errno));
+ goto out_free_path;
+ }
+
+ /* Success */
+ ret = TRUE;
+
+out_free_path:
+ g_free(pidpath);
+//out:
+ return ret;
+}
+
+osync_bool osync_client_create_pidfile(OSyncClient *client, OSyncError **error)
+{
+ osync_bool ret = FALSE;
+ char *pidpath = osync_client_pid_filename(client);
+ char *pidstr = g_strdup_printf("%ld", (long)client->child_pid);
+
+ if (!osync_file_write(pidpath, pidstr, strlen(pidstr), 0644, error))
+ goto out_free_pidstr;
+
+ /* Success */
+ ret = TRUE;
+
+out_free_pidstr:
+ g_free(pidstr);
+//out_free_path:
+ g_free(pidpath);
+//out:
+ return ret;
+}
+
+osync_bool osync_client_kill_old_osplugin(OSyncClient *client, OSyncError **error)
+{
+ osync_bool ret = FALSE;
+
+ char *pidstr;
+ int pidlen;
+ pid_t pid;
+
+ char *pidpath = osync_client_pid_filename(client);
+
+ /* Simply returns if there is no PID file */
+ if (!g_file_test(pidpath, G_FILE_TEST_EXISTS)) {
+ ret = TRUE;
+ goto out_free_path;
+ }
+
+ if (!osync_file_read(pidpath, &pidstr, &pidlen, error))
+ goto out_free_path;
+
+ pid = atol(pidstr);
+ if (!pid)
+ goto out_free_str;
+
+ osync_trace(TRACE_INTERNAL, "Killing old osplugin process. PID: %ld", (long)pid);
+
+ if (kill(pid, SIGTERM) < 0) {
+ osync_trace(TRACE_INTERNAL, "Error killing old osplugin: %s. Stale pid file?", strerror(errno));
+ /* Don't return failure if kill() failed, because it may be a stale pid file */
+ }
+
+ int count = 0;
+ while (osync_queue_is_alive(client->commands_to_osplugin)) {
+ if (count++ > 10) {
+ osync_trace(TRACE_INTERNAL, "Killing old osplugin process with SIGKILL");
+ kill(pid, SIGKILL);
+ break;
+ }
+ osync_trace(TRACE_INTERNAL, "Waiting for other side to terminate");
+ /*FIXME: Magic numbers are evil */
+ usleep(500000);
+ }
+
+ if (unlink(pidpath) < 0) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Couldn't erase PID file: %s", strerror(errno));
+ goto out_free_str;
+ }
+
+ /* Success */
+ ret = TRUE;
+
+out_free_str:
+ g_free(pidstr);
+out_free_path:
+ g_free(pidpath);
+//out:
+ return ret;
+}
+
+
+osync_bool osync_client_spawn(OSyncClient *client, OSyncEngine *engine, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, client, engine, error);
+
+ int waiting = 0;
+
+ if (!osync_client_kill_old_osplugin(client, error))
+ goto error;
+
+ if (!osync_queue_exists(client->commands_to_osplugin) || !osync_queue_is_alive(client->commands_to_osplugin)) {
+ pid_t cpid = fork();
+ if (cpid == 0) {
+ osync_trace_reset_indent();
+
+ /* Export all options to osplugin through environment variables */
+ osync_env_export_all_options(osync_group_get_env(engine->group));
+
+ OSyncMember *member = client->member;
+ OSyncPlugin *plugin = osync_member_get_plugin(member);
+ const char *path = osync_plugin_get_path(plugin);
+ setenv("OSYNC_MODULE_LIST", path, 1);
+
+ osync_env_export_loaded_modules(osync_group_get_env(engine->group));
+
+ char *memberstring = g_strdup_printf("%lli", osync_member_get_id(client->member));
+ execlp(OSPLUGIN, OSPLUGIN, osync_group_get_configdir(engine->group), memberstring, NULL);
+
+ if (errno == ENOENT) {
+ execlp("./osplugin", "osplugin", osync_group_get_configdir(engine->group), memberstring, NULL);
+ }
+
+ osync_trace(TRACE_INTERNAL, "unable to exec");
+ exit(1);
+ }
+
+ client->child_pid = cpid;
+
+ /* We are going to wait 5 seconds for plugin */
+ while (!osync_queue_exists(client->commands_to_osplugin) && waiting <= 5) {
+ osync_trace(TRACE_INTERNAL, "Waiting for other side to create fifo");
+
+ sleep(1);
+ waiting++;
+ }
+
+ osync_trace(TRACE_INTERNAL, "Queue was created");
+ }
+
+ if (client->child_pid) {
+ if (!osync_client_create_pidfile(client, error))
+ goto error;
+ }
+
+ if (!osync_queue_connect(client->commands_to_osplugin, OSYNC_QUEUE_SENDER, error))
+ goto error;
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, error);
+ if (!message)
+ goto error_disconnect;
+
+ osync_message_write_string(message, client->commands_from_osplugin->name);
+
+ if (!osync_queue_send_message(client->commands_to_osplugin, NULL, message, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error_disconnect:
+ osync_queue_disconnect(client->commands_to_osplugin, NULL);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_client_init(OSyncClient *client, OSyncEngine *engine, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, client, engine, error);
+
+ OSyncMessage *reply = osync_queue_get_message(client->commands_from_osplugin);
+
+ osync_trace(TRACE_INTERNAL, "reply received %i", reply->cmd);
+ if (reply->cmd == OSYNC_MESSAGE_ERRORREPLY) {
+ if (error)
+ osync_demarshal_error(reply, error);
+ goto error_free_reply;
+ }
+
+ if (reply->cmd != OSYNC_MESSAGE_REPLY) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Invalid answer from plugin process");
+ goto error_free_reply;
+ }
+
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_reply:
+ osync_message_unref(reply);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+osync_bool osync_client_finalize(OSyncClient *client, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, client, error);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_FINALIZE, 0, error);
+ if (!message)
+ goto error;
+
+ if (!osync_queue_send_message(client->commands_to_osplugin, NULL, message, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ if (client->child_pid) {
+ int status;
+ if (waitpid(client->child_pid, &status, 0) == -1) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Error waiting for osplugin process: %s", strerror(errno));
+ goto error;
+ }
+
+ if (!WIFEXITED(status))
+ osync_trace(TRACE_INTERNAL, "Child has exited abnormally");
+ else if (WEXITSTATUS(status) != 0)
+ osync_trace(TRACE_INTERNAL, "Child has returned non-zero exit status (%d)", WEXITSTATUS(status));
+
+ if (!osync_client_remove_pidfile(client, error))
+ goto error;
+ }
+
+ osync_queue_disconnect(client->commands_to_osplugin, NULL);
+
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_client_internals.h b/debian/opensync/opensync-0.22/osengine/osengine_client_internals.h
new file mode 100644
index 00000000..87ffe301
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_client_internals.h
@@ -0,0 +1,45 @@
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct OSyncClient {
+ OSyncMember *member;
+ OSyncQueue *commands_to_osplugin;
+ OSyncQueue *commands_from_osplugin;
+ OSyncEngine *engine;
+
+ OSyncFlag *fl_connected;
+ OSyncFlag *fl_sent_changes;
+ OSyncFlag *fl_done;
+ OSyncFlag *fl_finished;
+ OSyncFlag *fl_committed_all;
+
+ pid_t child_pid;
+ //GList *changes;
+};
+#endif
+
+typedef void (* OSyncPluginReplyHandler) (void *, void *, OSyncError *);
+
+typedef struct OSyncPluginCallContext {
+ OSyncPluginReplyHandler handler;
+ void *userdata;
+} OSyncPluginCallContext;
+
+OSyncClient *osync_client_new(OSyncEngine *engine, OSyncMember *member, OSyncError **error);
+void osync_client_free(OSyncClient *client);
+
+osync_bool osync_client_spawn(OSyncClient *client, OSyncEngine *engine, OSyncError **error);
+OSyncEngine *osync_client_get_engine(OSyncClient *client);
+void osync_client_call_plugin(OSyncClient *client, char *function, void *data, OSyncPluginReplyHandler replyhandler, void *userdata);
+
+osync_bool osync_client_init(OSyncClient *client, OSyncEngine *engine, OSyncError **error);
+osync_bool osync_client_finalize(OSyncClient *client, OSyncError **error);
+OSyncPluginTimeouts osync_client_get_timeouts(OSyncClient *client);
+void osync_client_reset(OSyncClient *client);
+
+osync_bool osync_client_connect(OSyncClient *target, OSyncEngine *sender, OSyncError **error);
+osync_bool osync_client_get_changes(OSyncClient *target, OSyncEngine *sender, OSyncError **error);
+osync_bool osync_client_committed_all(OSyncClient *target, OSyncEngine *sender, OSyncError **error);
+osync_bool osync_client_sync_done(OSyncClient *target, OSyncEngine *sender, OSyncError **error);
+osync_bool osync_client_disconnect(OSyncClient *target, OSyncEngine *sender, OSyncError **error);
+osync_bool osync_client_commit_change(OSyncClient *target, OSyncEngine *sender, OSyncMappingEntry *entry, OSyncError **error);
+osync_bool osync_client_get_change_data(OSyncClient *target, OSyncEngine *sender, OSyncMappingEntry *entry, OSyncError **error);
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_debug.c b/debian/opensync/opensync-0.22/osengine/osengine_debug.c
new file mode 100644
index 00000000..7a370bbb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_debug.c
@@ -0,0 +1,138 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+#include "engine_internals.h"
+
+void osengine_print_all(OSyncEngine *engine)
+{
+ GList *i;
+ GList *n;
+ osync_debug("ENG", 2, "ENGINE:");
+ osync_debug("ENG", 2, "running: %s", osync_flag_get_state(engine->fl_running) ? "YES" : "NO");
+ osync_debug("ENG", 2, "sync: %s", osync_flag_get_state(engine->fl_sync) ? "YES" : "NO");
+ osync_debug("ENG", 2, "stop: %s", osync_flag_get_state(engine->fl_stop) ? "YES" : "NO");
+ osync_debug("ENG", 2, "sent changes: %s (no: %i, yes: %i)", osync_flag_get_state(engine->cmb_sent_changes) ? "YES" : "NO", engine->cmb_sent_changes->num_not_set, engine->cmb_sent_changes->num_set);
+ osync_debug("ENG", 2, "all mapped: %s (no: %i, yes: %i)", osync_flag_get_state(engine->cmb_entries_mapped) ? "YES" : "NO", engine->cmb_entries_mapped->num_not_set, engine->cmb_entries_mapped->num_set);
+ osync_debug("ENG", 2, "synced: %s (no: %i, yes: %i)", osync_flag_get_state(engine->cmb_synced) ? "YES" : "NO", engine->cmb_synced->num_not_set, engine->cmb_synced->num_set);
+ osync_debug("ENG", 2, "conflicts checked: %s (no: %i, yes: %i)", osync_flag_get_state(engine->cmb_chkconflict) ? "YES" : "NO", engine->cmb_chkconflict->num_not_set, engine->cmb_chkconflict->num_set);
+ osync_debug("ENG", 2, "finished: %s (no: %i, yes: %i)", osync_flag_get_state(engine->cmb_finished) ? "YES" : "NO", engine->cmb_finished->num_not_set, engine->cmb_finished->num_set);
+ osync_debug("ENG", 2, "connected: %s (no: %i, yes: %i)", osync_flag_get_state(engine->cmb_connected) ? "YES" : "NO", engine->cmb_connected->num_not_set, engine->cmb_connected->num_set);
+ osync_debug("ENG", 2, "Multiplied: %s (no: %i, yes: %i)", osync_flag_get_state(engine->cmb_multiplied) ? "YES" : "NO", engine->cmb_multiplied->num_not_set, engine->cmb_multiplied->num_set);
+
+ for (i = engine->clients; i; i = i->next) {
+ OSyncClient *client = i->data;
+ osync_debug("ENG", 2, "\tCLIENT %lli %s:", osync_member_get_id(client->member), osync_member_get_pluginname(client->member));
+ osync_debug("ENG", 2, "\tconnected: %s", osync_flag_get_state(client->fl_connected) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\tsent changes: %s", osync_flag_get_state(client->fl_sent_changes) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\tdone: %s", osync_flag_get_state(client->fl_done) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\tfinished: %s", osync_flag_get_state(client->fl_finished) ? "YES" : "NO");
+ }
+
+ for (i = engine->maptable->mappings; i; i = i->next) {
+ OSyncMapping *mapping = i->data;
+ osync_debug("ENG", 2, "MAPPING %p ID: %lli:", mapping, mapping->id);
+ osync_debug("ENG", 2, "solved: %s", osync_flag_get_state(mapping->fl_solved) ? "YES" : "NO");
+ osync_debug("ENG", 2, "synced: %s (no: %i, yes: %i)", osync_flag_get_state(mapping->cmb_synced) ? "YES" : "NO", mapping->cmb_synced->num_not_set, mapping->cmb_synced->num_set);
+ osync_debug("ENG", 2, "conflict checked: %s", osync_flag_get_state(mapping->fl_chkconflict) ? "YES" : "NO");
+ osync_debug("ENG", 2, "muliplied: %s", osync_flag_get_state(mapping->fl_multiplied) ? "YES" : "NO");
+ osync_debug("ENG", 2, "has data: %s", osync_flag_get_state(mapping->cmb_has_data) ? "YES" : "NO");
+ osync_debug("ENG", 2, "has info: %s (no: %i, yes: %i)", osync_flag_get_state(mapping->cmb_has_info) ? "YES" : "NO", mapping->cmb_has_info->num_not_set, mapping->cmb_has_info->num_set);
+ osync_debug("ENG", 2, "delete: %s (no: %i, yes: %i)", osync_flag_get_state(mapping->cmb_deleted) ? "YES" : "NO", mapping->cmb_deleted->num_not_set, mapping->cmb_deleted->num_set);
+
+ for (n = mapping->entries; n; n = n->next) {
+ OSyncMappingEntry *entry = n->data;
+ osync_debug("ENG", 2, "\tENTRY: %p, CHANGE %p, Member %lli:", entry, entry->change, osync_member_get_id(entry->client->member));
+ osync_debug("ENG", 2, "\tuid: %s, changetype: %i", osync_change_get_uid(entry->change), osync_change_get_changetype(entry->change));
+ osync_debug("ENG", 2, "\tObjType: %s, Format %s", osync_change_get_objtype(entry->change) ? osync_objtype_get_name(osync_change_get_objtype(entry->change)) : "None", osync_change_get_objformat(entry->change) ? osync_objformat_get_name(osync_change_get_objformat(entry->change)) : "None");
+ osync_debug("ENG", 2, "\thas data: %s", osync_flag_get_state(entry->fl_has_data) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\tdirty: %s", osync_flag_get_state(entry->fl_dirty) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\tmapped: %s", osync_flag_get_state(entry->fl_mapped) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\thas info: %s", osync_flag_get_state(entry->fl_has_info) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\tsynced: %s", osync_flag_get_state(entry->fl_synced) ? "YES" : "NO");
+ osync_debug("ENG", 2, "\tdeleted: %s", osync_flag_get_state(entry->fl_deleted) ? "YES" : "NO");
+ }
+ }
+
+ for (n = engine->maptable->unmapped; n; n = n->next) {
+ OSyncMappingEntry *entry = n->data;
+ osync_debug("ENG", 2, "UNMAPPED ENTRY %p with change %p:", entry, entry->change);
+ osync_debug("ENG", 2, "uid: %s, changetype: %i", osync_change_get_uid(entry->change), osync_change_get_changetype(entry->change));
+ osync_debug("ENG", 2, "ObjType: %s, Format %s", osync_change_get_objtype(entry->change) ? osync_objtype_get_name(osync_change_get_objtype(entry->change)) : "None", osync_change_get_objformat(entry->change) ? osync_objformat_get_name(osync_change_get_objformat(entry->change)) : "None");
+ osync_debug("ENG", 2, "has data: %s", osync_flag_get_state(entry->fl_has_data) ? "YES" : "NO");
+ osync_debug("ENG", 2, "dirty: %s", osync_flag_get_state(entry->fl_dirty) ? "YES" : "NO");
+ osync_debug("ENG", 2, "mapped: %s", osync_flag_get_state(entry->fl_mapped) ? "YES" : "NO");
+ osync_debug("ENG", 2, "has info: %s", osync_flag_get_state(entry->fl_has_info) ? "YES" : "NO");
+ osync_debug("ENG", 2, "synced: %s", osync_flag_get_state(entry->fl_synced) ? "YES" : "NO");
+ }
+}
+
+void osengine_print_flags(OSyncEngine *engine)
+{
+ osync_trace(TRACE_INTERNAL, "ENG(RUN%i,STOP%i,SENT%i,READ%i,MAP%i,CHK%i,MUL%i,SYNC%i,COMMITTED%i)", \
+ osync_flag_is_set(engine->fl_running), \
+ osync_flag_is_not_set(engine->fl_stop), \
+ osync_flag_is_set(engine->cmb_sent_changes), \
+ osync_flag_is_set(engine->cmb_read_all), \
+ osync_flag_is_set(engine->cmb_entries_mapped), \
+ osync_flag_is_set(engine->cmb_chkconflict), \
+ osync_flag_is_set(engine->cmb_multiplied), \
+ osync_flag_is_set(engine->cmb_synced), \
+ osync_flag_is_set(engine->cmb_committed_all));
+}
+
+void osync_client_print_flags(OSyncClient *client)
+{
+ osync_trace(TRACE_INTERNAL, "CL(CON%i,SENT%i,DONE%i,FIN%i,COMMITTED%i)", \
+ osync_flag_is_set(client->fl_connected), \
+ osync_flag_is_set(client->fl_sent_changes), \
+ osync_flag_is_set(client->fl_done), \
+ osync_flag_is_set(client->fl_finished), \
+ osync_flag_is_set(client->fl_committed_all));
+}
+
+void osengine_mappingentry_print_flags(OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_INTERNAL, "ENT(DATA%i,DRY%i,MAP%i,INFO%i,SYNC%i,DEL%i)", \
+ osync_flag_is_set(entry->fl_has_data), \
+ osync_flag_is_set(entry->fl_dirty), \
+ osync_flag_is_set(entry->fl_mapped), \
+ osync_flag_is_set(entry->fl_has_info), \
+ osync_flag_is_set(entry->fl_synced), \
+ osync_flag_is_set(entry->fl_deleted));
+}
+
+void osengine_mapping_print_flags(OSyncMapping *mapping)
+{
+ osync_trace(TRACE_INTERNAL, "MAP(SOLV%i,SYNC%i,DATA%i,INFO%i,DEL%i,CHK%i,MUL%i)", \
+ osync_flag_is_set(mapping->fl_solved), \
+ osync_flag_is_set(mapping->cmb_synced), \
+ osync_flag_is_set(mapping->cmb_has_data), \
+ osync_flag_is_set(mapping->cmb_has_info), \
+ osync_flag_is_set(mapping->cmb_deleted), \
+ osync_flag_is_set(mapping->fl_chkconflict), \
+ osync_flag_is_set(mapping->fl_multiplied));
+}
+
+void osengine_get_wasted(OSyncEngine *engine, int *all, int *wasted)
+{
+ *all = engine->alldeciders;
+ *wasted = engine->wasted;
+}
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_debug.h b/debian/opensync/opensync-0.22/osengine/osengine_debug.h
new file mode 100644
index 00000000..45536456
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_debug.h
@@ -0,0 +1,10 @@
+#ifndef _OSENGINE__DEBUG_H
+#define _OSENGINE__DEBUG_H
+
+void osengine_print_all(OSyncEngine *engine);
+void osengine_print_flags(OSyncEngine *engine);
+void osync_client_print_flags(OSyncClient *client);
+void osengine_mapping_print_flags(OSyncMapping *mapping);
+void osengine_get_wasted(OSyncEngine *engine, int *all, int *wasted);
+
+#endif
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_debug_internals.h b/debian/opensync/opensync-0.22/osengine/osengine_debug_internals.h
new file mode 100644
index 00000000..d3654cdf
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_debug_internals.h
@@ -0,0 +1,6 @@
+#ifndef _OSENGINE__DEBUG_INTERNALS_H
+#define _OSENGINE__DEBUG_INTERNALS_H
+
+void osengine_mappingentry_print_flags(OSyncMappingEntry *entry);
+
+#endif
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_deciders.c b/debian/opensync/opensync-0.22/osengine/osengine_deciders.c
new file mode 100644
index 00000000..d2fdb2c9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_deciders.c
@@ -0,0 +1,248 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+#include "engine_internals.h"
+
+/**
+ * @defgroup OSEngineDeciders OpenSync Deciders Internals
+ * @ingroup OSEnginePrivate
+ * @brief The internals of the engine (communication part)
+ *
+ * This gives you an insight in the inner workings of the sync engine
+ *
+ *
+ */
+/*@{*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+void osengine_mappingentry_decider(OSyncEngine *engine, OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mappingentry_decider(%p, %p)", engine, entry);
+ osengine_print_flags(engine);
+ osengine_mappingentry_print_flags(entry);
+
+ engine->alldeciders++;
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_set(engine->fl_sync) \
+ && osync_flag_is_set(entry->fl_has_info) \
+ && osync_flag_is_not_set(entry->fl_has_data)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Get data (Entry %p) ++++", entry);
+ osync_client_get_change_data(entry->client, engine, entry, NULL);
+ osync_trace(TRACE_EXIT, "osengine_mappingentry_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_set(engine->cmb_read_all) \
+ && osync_flag_is_set(engine->cmb_sent_changes) \
+ && osync_flag_is_set(engine->fl_sync) \
+ && osync_flag_is_set(entry->fl_has_info) \
+ && osync_flag_is_set(entry->fl_has_data)) {
+ if (osync_flag_is_not_set(entry->fl_mapped)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Mapping entry (Entry %p) ++++", entry);
+ osengine_change_map(engine, entry);
+ osync_trace(TRACE_EXIT, "osengine_mappingentry_decider");
+ return;
+ }
+ if (osync_flag_is_set(entry->fl_dirty)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Commiting (Entry %p) ++++", entry);
+ osync_client_commit_change(entry->client, engine, entry, NULL);
+ osync_trace(TRACE_EXIT, "osengine_mappingentry_decider");
+ return;
+ }
+ }
+
+ engine->wasted++;
+ osync_trace(TRACE_EXIT, "osengine_mappingentry_decider: Waste");
+}
+
+void osengine_mappingentry_all_deciders(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ osync_debug("ENG", 3, "Calling all mappingentry deciders (%i) for mapping %p", g_list_length(mapping->entries), mapping);
+ GList *e;
+ for (e = mapping->entries; e ; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ send_mappingentry_changed(engine, entry);
+ }
+}
+
+void osengine_mapping_decider(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mapping_decider(%p, %p)", engine, mapping);
+ osengine_print_flags(engine);
+ osengine_mapping_print_flags(mapping);
+
+ engine->alldeciders++;
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_set(engine->cmb_sent_changes) \
+ && osync_flag_is_set(engine->cmb_read_all) \
+ && osync_flag_is_set(engine->cmb_entries_mapped) \
+ && osync_flag_is_set(mapping->cmb_has_data) \
+ && osync_flag_is_not_set(mapping->cmb_synced) \
+ && osync_flag_is_not_set(mapping->fl_solved) \
+ && osync_flag_is_not_set(mapping->fl_chkconflict)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Check Conflict (Mapping %p) ++++", mapping);
+ osengine_mapping_check_conflict(engine, mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_set(engine->cmb_sent_changes) \
+ && osync_flag_is_set(engine->cmb_read_all) \
+ && osync_flag_is_set(engine->cmb_entries_mapped) \
+ && osync_flag_is_set(mapping->cmb_has_data) \
+ && osync_flag_is_not_set(mapping->cmb_synced) \
+ && osync_flag_is_set(mapping->fl_solved) \
+ && osync_flag_is_set(mapping->fl_chkconflict) \
+ && osync_flag_is_not_set(mapping->fl_multiplied)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Multiply (Mapping %p) ++++", mapping);
+ osengine_mapping_multiply_master(engine, mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_set(engine->cmb_synced) \
+ && osync_flag_is_set(mapping->cmb_has_info) \
+ && osync_flag_is_not_set(mapping->cmb_deleted) \
+ && osync_flag_is_set(engine->cmb_multiplied)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Reset Mapping (Mapping %p) ++++", mapping);
+ osengine_mapping_reset(mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_set(mapping->cmb_synced) \
+ && osync_flag_is_set(mapping->cmb_deleted)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Deleting Mapping (Mapping %p) ++++", mapping);
+ osengine_mapping_delete(mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_decider");
+ return;
+ }
+
+ engine->wasted++;
+ osync_trace(TRACE_EXIT, "osengine_mapping_decider: Waste");
+}
+
+void osengine_mapping_all_deciders(OSyncEngine *engine)
+{
+ GList *m;
+ osync_trace(TRACE_INTERNAL, "Calling all mapping deciders (%i)", g_list_length(engine->maptable->mappings));
+ for (m = engine->maptable->mappings; m; m = m->next) {
+ OSyncMapping *mapping = m->data;
+ send_mapping_changed(engine, mapping);
+ }
+}
+
+void osengine_client_decider(OSyncEngine *engine, OSyncClient *client)
+{
+ osync_trace(TRACE_ENTRY, "osengine_client_decider(%p, %p)", engine, client);
+ osengine_print_flags(engine);
+ osync_client_print_flags(client);
+
+ engine->alldeciders++;
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_not_set(engine->fl_stop) \
+ && osync_flag_is_not_set(client->fl_done) \
+ && osync_flag_is_not_set(client->fl_connected) \
+ && osync_flag_is_not_set(client->fl_finished)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Connecting (Client %p) ++++", client);
+ osync_client_connect(client, engine, NULL);
+ osync_trace(TRACE_EXIT, "osengine_client_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_not_set(engine->fl_stop) \
+ && osync_flag_is_not_set(client->fl_done) \
+ && osync_flag_is_set(client->fl_connected) \
+ && osync_flag_is_not_set(client->fl_sent_changes) \
+ && osync_flag_is_set(engine->cmb_connected)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Get changes (Client %p) ++++", client);
+ osync_client_get_changes(client, engine, NULL);
+ osync_trace(TRACE_EXIT, "osengine_client_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_not_set(engine->fl_stop) \
+ && osync_flag_is_not_set(client->fl_done) \
+ && osync_flag_is_set(client->fl_connected) \
+ && osync_flag_is_set(client->fl_sent_changes) \
+ && osync_flag_is_not_set(client->fl_committed_all) \
+ && osync_flag_is_set(engine->cmb_sent_changes) \
+ && osync_flag_is_set(engine->cmb_multiplied) \
+ && osync_flag_is_set(engine->cmb_read_all) \
+ && osync_flag_is_set(engine->cmb_entries_mapped) \
+ && osync_flag_is_set(engine->cmb_committed_all)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Committed all (Client %p) ++++", client);
+ osync_client_committed_all(client, engine, NULL);
+ osync_trace(TRACE_EXIT, "osengine_client_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && osync_flag_is_not_set(engine->fl_stop) \
+ && osync_flag_is_not_set(client->fl_done) \
+ && osync_flag_is_set(client->fl_connected) \
+ && osync_flag_is_set(client->fl_sent_changes) \
+ && osync_flag_is_set(client->fl_committed_all) \
+ && osync_flag_is_set(engine->cmb_read_all) \
+ && osync_flag_is_set(engine->cmb_sent_changes) \
+ && osync_flag_is_set(engine->cmb_synced) \
+ && osync_flag_is_set(engine->cmb_entries_mapped)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Sync done (Client %p) ++++", client);
+ osync_client_sync_done(client, engine, NULL);
+ osync_trace(TRACE_EXIT, "osengine_client_decider");
+ return;
+ }
+
+ if (osync_flag_is_set(engine->fl_running) \
+ && (osync_flag_is_set(client->fl_done) \
+ || osync_flag_is_set(engine->fl_stop)) \
+ && osync_flag_is_set(client->fl_connected)) {
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Disconnecting (Client %p) ++++", client);
+ osync_client_disconnect(client, engine, NULL);
+ osync_trace(TRACE_EXIT, "osengine_client_decider");
+ return;
+ }
+
+ engine->wasted++;
+ osync_trace(TRACE_EXIT, "osengine_client_decider: Waste");
+}
+
+void osengine_client_all_deciders(OSyncEngine *engine)
+{
+ GList *c;
+ osync_debug("ENG", 3, "Calling all client deciders (%i)", g_list_length(engine->clients));
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ osengine_client_decider(engine, client);
+ }
+}
+#endif
+
+/** @} */
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_deciders_internals.h b/debian/opensync/opensync-0.22/osengine/osengine_deciders_internals.h
new file mode 100644
index 00000000..a4cf00e4
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_deciders_internals.h
@@ -0,0 +1,5 @@
+void osengine_mappingentry_decider(OSyncEngine *engine, OSyncMappingEntry *entry);
+void osengine_mappingentry_all_deciders(OSyncEngine *engine, OSyncMapping *mapping);
+
+void osengine_mapping_decider(OSyncEngine *engine, OSyncMapping *mapping);
+void osengine_mapping_all_deciders(OSyncEngine *engine);
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_engine.c b/debian/opensync/opensync-0.22/osengine/osengine_engine.c
new file mode 100644
index 00000000..c5a98f43
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_engine.c
@@ -0,0 +1,1233 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <glib.h>
+
+#include <opensync/opensync_support.h>
+#include "opensync/opensync_message_internals.h"
+#include "opensync/opensync_queue_internals.h"
+#include "opensync/opensync_format_internals.h"
+
+#include "engine_internals.h"
+#include <opensync/opensync_user_internals.h>
+
+OSyncMappingEntry *osengine_mappingtable_find_entry(OSyncMappingTable *table, const char *uid, const char *objtype, long long int memberid);
+/**
+ * @defgroup OSEnginePrivate OpenSync Engine Private API
+ * @ingroup PrivateAPI
+ * @brief The internals of the multisync engine
+ *
+ */
+
+/**
+ * @defgroup OSyncEnginePrivate OpenSync Engine Internals
+ * @ingroup OSEnginePrivate
+ * @brief The internals of the engine (communication part)
+ *
+ * This gives you an insight in the inner workings of the sync engine,
+ * especially the communication part.
+ *
+ *
+ */
+/*@{*/
+
+void _new_change_receiver(OSyncEngine *engine, OSyncClient *client, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, engine, client, change);
+
+ OSyncError *error = NULL;
+ OSyncChangeType change_type = osync_change_get_changetype(change);
+ OSyncFormatEnv *format_env = osync_group_get_format_env(engine->group);
+ OSyncObjType *objtype = osync_change_get_objtype(change);
+ const char* uid = osync_change_get_uid(change);
+ OSyncObjFormat *objformat = osync_change_get_objformat(change);
+
+ osync_change_set_member(change, client->member);
+
+ osync_trace(TRACE_INTERNAL, "Handling new change with uid %s, changetype %i, objtype %s and format %s from member %lli", uid, change_type,
+ objtype ? osync_objtype_get_name(objtype) : "None", osync_change_get_objformat(change) ? osync_objformat_get_name(osync_change_get_objformat(change)) : "None",
+ osync_member_get_id(client->member));
+
+
+ /**
+ * first we need to detect the objtype because we use
+ * uid + objtype as identifier for an entry.
+ * Special case is file as objformat... we must not change
+ * the objtype with format file
+ **/
+ if ( (change_type != CHANGE_DELETED) &&
+ (osync_change_has_data(change))) {
+ osync_bool is_file_objformat = FALSE;
+ if(objformat)
+ is_file_objformat =
+ ((!strcmp(objformat->name, "file"))?(TRUE):(FALSE));
+ if ( (!objtype) || (!objformat) ||
+ (!strcmp(osync_objtype_get_name(objtype), "data")) ||
+ (!strcmp(objformat->name, "plain"))) {
+ OSyncObjType *objtype_test = osync_change_detect_objtype_full(format_env, change, &error);
+ objtype = (objtype_test)?(objtype_test):(objtype);
+ }
+ if (objtype) {
+ osync_trace(TRACE_INTERNAL, "Detected the object to be of type %s", osync_objtype_get_name(objtype));
+
+ osync_change_set_objtype(change, objtype);
+
+ /**
+ * do not use CHANGE_MODIFIED if slowsync or (change not
+ * exist before if not filesync)
+ **/
+ if ( ( (osync_group_get_slow_sync(engine->group,
+ osync_objtype_get_name(objtype))) ||
+ ( (!is_file_objformat) &&
+ (!osengine_mappingtable_find_entry(
+ engine->maptable, uid,
+ osync_objtype_get_name(objtype),
+ osync_member_get_id(client->member))) )
+ ) && (change_type == CHANGE_MODIFIED) ){
+ osync_change_set_changetype(change, CHANGE_ADDED);
+ change_type = osync_change_get_changetype(change);
+ }
+ }
+ } else
+ if (change_type == CHANGE_DELETED){
+ /**
+ * we need to handle the special delete case where objtype
+ * is data and no uid with objtype data exists from this
+ * member
+ **/
+ if ( !objtype ||
+ (( !strcmp(osync_objtype_get_name(objtype), "data") ) &&
+ ( !osengine_mappingtable_find_entry(
+ engine->maptable, uid,
+ osync_objtype_get_name(objtype),
+ osync_member_get_id(client->member)) )) ){
+
+ OSyncMappingEntry *entry =
+ osengine_mappingtable_find_entry(
+ engine->maptable, uid, NULL,
+ osync_member_get_id(client->member)
+ );
+ if (entry) {
+ osync_change_set_objtype(change,
+ osync_change_get_objtype(
+ entry->change));
+ objtype=osync_change_get_objtype(change);
+ } else {
+ osync_error_set(&error, OSYNC_ERROR_GENERIC,
+ "Could not find one entry with UID=%s to delete.", uid);
+ goto error;
+ }
+ }
+ } else {
+ osync_trace(TRACE_INTERNAL, "Change has no data!");
+ }
+
+ osync_trace(TRACE_INTERNAL, "Handling new change with uid %s, changetype %i, data %p, size %i, objtype %s and format %s from member %lli", uid, change_type, osync_change_get_data(change), osync_change_get_datasize(change), objtype ? osync_objtype_get_name(objtype) : "None", osync_change_get_objformat(change) ? osync_objformat_get_name(osync_change_get_objformat(change)) : "None", osync_member_get_id(client->member));
+
+ if (!objtype){
+ osync_error_set(&error, OSYNC_ERROR_GENERIC,
+ "ObjType not set for uid %s.", uid);
+ goto error;
+ }
+
+
+ OSyncMappingEntry *entry = osengine_mappingtable_store_change(engine->maptable, change);
+ change = entry->change;
+ if (!osync_change_save(change, TRUE, &error)) {
+ osync_error_duplicate(&engine->error, &error);
+ osync_status_update_change(engine, change, CHANGE_RECV_ERROR, &error);
+ osync_error_update(&engine->error, "Unable to receive one or more objects");
+ osync_flag_unset(entry->fl_has_data);
+ goto error;
+ }
+
+ osync_group_remove_changelog(engine->group, change, &error);
+
+ //We convert to the common format here to make sure we always pass it
+ osync_change_convert_to_common(change, NULL);
+
+ if (!entry->mapping) {
+ osync_flag_attach(entry->fl_mapped, engine->cmb_entries_mapped);
+ osync_flag_unset(entry->fl_mapped);
+ osync_debug("ENG", 3, "+It has no mapping");
+ } else {
+ osync_debug("ENG", 3, "+It has mapping");
+ osync_flag_set(entry->fl_mapped);
+ osync_flag_unset(entry->mapping->fl_solved);
+ osync_flag_unset(entry->mapping->fl_chkconflict);
+ osync_flag_unset(entry->mapping->fl_multiplied);
+ }
+
+ if (osync_change_has_data(change)) {
+ osync_debug("ENG", 3, "+It has data");
+ osync_flag_set(entry->fl_has_data);
+ osync_status_update_change(engine, change, CHANGE_RECEIVED, NULL);
+ } else {
+ osync_debug("ENG", 3, "+It has no data");
+ osync_flag_unset(entry->fl_has_data);
+ osync_status_update_change(engine, change, CHANGE_RECEIVED_INFO, NULL);
+ }
+
+ if (osync_change_get_changetype(change) == CHANGE_DELETED)
+ osync_flag_set(entry->fl_deleted);
+
+ osync_flag_set(entry->fl_has_info);
+ osync_flag_unset(entry->fl_synced);
+
+ osengine_mappingentry_decider(engine, entry);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return;
+}
+
+OSyncClient *osengine_get_client(OSyncEngine *engine, long long int memberId)
+{
+ GList *c = NULL;
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ if (osync_member_get_id(client->member) == memberId)
+ return client;
+ }
+ return NULL;
+}
+
+
+void send_engine_changed(OSyncEngine *engine)
+{
+ if (!engine->is_initialized)
+ return;
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_ENGINE_CHANGED, 0, NULL);
+ /*FIXME: Handle errors here */
+
+ osync_debug("ENG", 4, "Sending message %p:\"ENGINE_CHANGED\"", message);
+ osync_queue_send_message(engine->commands_to_self, NULL, message, NULL);
+}
+
+void send_mapping_changed(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_MAPPING_CHANGED, sizeof(long long), NULL);
+ osync_message_write_long_long_int(message, mapping->id);
+ /*FIXME: Handle errors here */
+
+ osync_queue_send_message(engine->commands_to_self, NULL, message, NULL);
+ /*FIXME: Handle errors here, too */
+}
+
+void send_mappingentry_changed(OSyncEngine *engine, OSyncMappingEntry *entry)
+{
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_MAPPINGENTRY_CHANGED, sizeof(long long)*2, NULL);
+
+ /*FIXME: don't pass a pointer through the messaging system */
+ long long ptr = (long long)(long)entry;
+ osync_message_write_long_long_int(message, ptr);
+ /*FIXME: Handle errors here */
+
+ osync_queue_send_message(engine->commands_to_self, NULL, message, NULL);
+ /*FIXME: Handle errors here, too */
+}
+
+/*! @brief The queue message handler of the engine
+ *
+ * @param sender The Client who sent this message
+ * @param message The message
+ * @param engine The engine
+ *
+ */
+static void engine_message_handler(OSyncMessage *message, OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "engine_message_handler(%p:%lli-%i, %p)", message, message->id1, message->id2, engine);
+
+ OSyncChange *change = NULL;
+
+ osync_trace(TRACE_INTERNAL, "engine received command %i", osync_message_get_command(message));
+
+ switch (osync_message_get_command(message)) {
+ case OSYNC_MESSAGE_SYNCHRONIZE:
+ osync_trace(TRACE_INTERNAL, "all deciders");
+ osengine_client_all_deciders(engine);
+ break;
+ case OSYNC_MESSAGE_NEW_CHANGE:
+ osync_demarshal_change(message, osync_group_get_format_env(engine->group), &change);
+
+ long long int member_id = 0;
+ osync_message_read_long_long_int(message, &member_id);
+ OSyncClient *sender = osengine_get_client(engine, member_id);
+
+ _new_change_receiver(engine, sender, change);
+ break;
+ case OSYNC_MESSAGE_ENGINE_CHANGED:
+ osengine_client_all_deciders(engine);
+ osengine_mapping_all_deciders(engine);
+ GList *u;
+ for (u = engine->maptable->unmapped; u; u = u->next) {
+ OSyncMappingEntry *unmapped = u->data;
+ send_mappingentry_changed(engine, unmapped);
+ }
+ break;
+ case OSYNC_MESSAGE_MAPPING_CHANGED:
+ {
+ long long id;
+ osync_message_read_long_long_int(message, &id);
+ /*FIXME: check errors by read_long_long_int */
+ OSyncMapping *mapping = osengine_mappingtable_mapping_from_id(engine->maptable, id);
+
+ if (!g_list_find(engine->maptable->mappings, mapping)) {
+ osync_trace(TRACE_EXIT, "%s: Mapping %p is dead", __func__, mapping);
+ return;
+ }
+
+ osengine_mapping_decider(engine, mapping);
+ }
+ break;
+ case OSYNC_MESSAGE_MAPPINGENTRY_CHANGED:
+ {
+ long long ptr;
+ osync_message_read_long_long_int(message, &ptr);
+ OSyncMappingEntry *entry = (OSyncMappingEntry*)(long)ptr;
+
+ if (!g_list_find(engine->maptable->entries, entry) && !g_list_find(engine->maptable->unmapped, entry)) {
+ osync_trace(TRACE_EXIT, "%s: Entry %p is dead", __func__, entry);
+ return;
+ }
+
+ osengine_mappingentry_decider(engine, entry);
+ }
+ break;
+ case OSYNC_MESSAGE_SYNC_ALERT:
+ if (engine->allow_sync_alert)
+ osync_flag_set(engine->fl_running);
+ else
+ osync_trace(TRACE_INTERNAL, "Sync Alert not allowed");
+ break;
+
+ default:
+ break;
+ }
+
+ /*TODO: Implement handling of the messages listed below, on commented code */
+
+ /*
+ if (osync_message_is_signal (message, "CLIENT_CHANGED")) {
+ OSyncClient *client = osync_message_get_data(message, "client");
+
+ if (!g_list_find(engine->clients, client)) {
+ osync_trace(TRACE_EXIT, "%s: Client %p is dead", __func__, client);
+ return;
+ }
+
+ osengine_client_decider(engine, client);
+ osync_trace(TRACE_EXIT, "engine_message_handler");
+ return;
+ }
+
+ if (osync_message_is_signal (message, "PLUGIN_MESSAGE")) {
+ char *name = osync_message_get_data(message, "name");
+ void *data = osync_message_get_data(message, "data");
+ engine->plgmsg_callback(engine, sender, name, data, engine->plgmsg_userdata);
+ osync_trace(TRACE_EXIT, "engine_message_handler");
+ return;
+ }
+
+ osync_debug("ENG", 0, "Unknown message \"%s\"", osync_message_get_msgname(message));
+ osync_trace(TRACE_EXIT_ERROR, "engine_message_handler: Unknown message");
+ g_assert_not_reached();*/
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void trigger_clients_sent_changes(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+ osync_status_update_engine(engine, ENG_ENDPHASE_READ, NULL);
+
+ g_mutex_lock(engine->info_received_mutex);
+ g_cond_signal(engine->info_received);
+ g_mutex_unlock(engine->info_received_mutex);
+
+ //Load the old mappings
+ osengine_mappingtable_inject_changes(engine->maptable);
+
+ send_engine_changed(engine);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void trigger_clients_read_all(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+
+ send_engine_changed(engine);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void trigger_status_end_conflicts(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+ osync_status_update_engine(engine, ENG_END_CONFLICTS, NULL);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void trigger_clients_connected(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+ osync_status_update_engine(engine, ENG_ENDPHASE_CON, NULL);
+ osengine_client_all_deciders(engine);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void trigger_clients_comitted_all(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+ osync_status_update_engine(engine, ENG_ENDPHASE_WRITE, NULL);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+
+/*void send_engine_committed_all(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+
+ engine->committed_all_sent = TRUE;
+
+ osync_trace(TRACE_INTERNAL, "++++ ENGINE COMMAND: Committed all ++++");
+
+ GList *c = NULL;
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ if (osync_flag_is_not_set(client->fl_committed_all))
+ send_committed_all(client, engine);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void trigger_engine_committed_all(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+
+ if (osync_flag_is_not_set(engine->cmb_multiplied)) {
+ osync_trace(TRACE_EXIT, "%s: Not multiplied yet", __func__);
+ return;
+ }
+
+ send_engine_committed_all(engine);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}*/
+
+static gboolean startupfunc(gpointer data)
+{
+ OSyncEngine *engine = data;
+ osync_trace(TRACE_INTERNAL, "+++++++++ This is the engine of group \"%s\" +++++++++", osync_group_get_name(engine->group));
+
+ OSyncError *error = NULL;
+ if (!osengine_mappingtable_load(engine->maptable, &error)) {
+ osync_error_duplicate(&engine->error, &error);
+ osync_status_update_engine(engine, ENG_ERROR, &error);
+ osync_error_update(&engine->error, "Unable to connect one of the members");
+ osync_flag_set(engine->fl_stop);
+ }
+
+ g_mutex_lock(engine->started_mutex);
+ g_cond_signal(engine->started);
+ g_mutex_unlock(engine->started_mutex);
+ return FALSE;
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSEnginePublic OpenSync Engine API
+ * @ingroup PublicAPI
+ * @brief The API of the syncengine available to everyone
+ *
+ * This gives you an insight in the public API of the opensync sync engine.
+ *
+ */
+/*@{*/
+
+/*! @brief This will reset the engine to its initial state
+ *
+ * This function will reset the engine to its initial state. The engine
+ * must not be running at this point.
+ *
+ * @param engine A pointer to the engine you want to reset
+ * @param error A pointer to a error struct
+ * @returns TRUE if command was succcessfull, FALSE otherwise
+ *
+ */
+osync_bool osengine_reset(OSyncEngine *engine, OSyncError **error)
+{
+ //FIXME Check if engine is running
+ osync_trace(TRACE_ENTRY, "osengine_reset(%p, %p)", engine, error);
+ GList *c = NULL;
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ osync_client_reset(client);
+ }
+
+ osync_flag_set_state(engine->fl_running, FALSE);
+ osync_flag_set_state(engine->fl_stop, FALSE);
+ osync_flag_set_state(engine->cmb_sent_changes, FALSE);
+ osync_flag_set_state(engine->cmb_entries_mapped, TRUE);
+ osync_flag_set_state(engine->cmb_synced, TRUE);
+ osync_flag_set_state(engine->cmb_chkconflict, TRUE);
+ osync_flag_set_state(engine->cmb_finished, FALSE);
+ osync_flag_set_state(engine->cmb_connected, FALSE);
+ osync_flag_set_state(engine->cmb_read_all, TRUE);
+ osync_flag_set_state(engine->cmb_committed_all, TRUE);
+ osync_flag_set_state(engine->cmb_committed_all_sent, FALSE);
+
+ osync_status_update_engine(engine, ENG_ENDPHASE_DISCON, NULL);
+
+ engine->committed_all_sent = FALSE;
+
+ osengine_mappingtable_reset(engine->maptable);
+
+ if (engine->error) {
+ //FIXME We might be leaking memory here
+ OSyncError *newerror = NULL;
+ osync_error_duplicate(&newerror, &engine->error);
+ osync_status_update_engine(engine, ENG_ERROR, &newerror);
+ osync_group_set_slow_sync(engine->group, "data", TRUE);
+ } else {
+ osync_status_update_engine(engine, ENG_SYNC_SUCCESSFULL, NULL);
+ osync_group_reset_slow_sync(engine->group, "data");
+ }
+
+ osync_trace(TRACE_INTERNAL, "engine error is %p", engine->error);
+
+ g_mutex_lock(engine->syncing_mutex);
+ g_cond_signal(engine->syncing);
+ g_mutex_unlock(engine->syncing_mutex);
+
+ osync_trace(TRACE_EXIT, "osengine_reset");
+ return TRUE;
+}
+
+/* Implementation of g_mkdir_with_parents()
+ *
+ * This function overwrite the contents of the 'dir' parameter
+ */
+static int __mkdir_with_parents(char *dir, int mode)
+{
+ if (g_file_test(dir, G_FILE_TEST_IS_DIR))
+ return 0;
+
+ char *slash = strrchr(dir, '/');
+ if (slash && slash != dir) {
+ /* Create parent directory if needed */
+
+ /* This is a trick: I don't want to allocate a new string
+ * for the parent directory. So, just put a NUL char
+ * in the last slash, and restore it after creating the
+ * parent directory
+ */
+ *slash = '\0';
+ if (__mkdir_with_parents(dir, mode) < 0)
+ return -1;
+ *slash = '/';
+ }
+
+ if (mkdir(dir, mode) < 0)
+ return -1;
+
+ return 0;
+}
+
+static int mkdir_with_parents(const char *dir, int mode)
+{
+ int r;
+ char *mydir = strdup(dir);
+ if (!mydir)
+ return -1;
+
+ r = __mkdir_with_parents(mydir, mode);
+ free(mydir);
+ return r;
+}
+
+/*! @brief This will create a new engine for the given group
+ *
+ * This will create a new engine for the given group
+ *
+ * @param group A pointer to the group, for which you want to create a new engine
+ * @param error A pointer to a error struct
+ * @returns Pointer to a newly allocated OSyncEngine on success, NULL otherwise
+ *
+ */
+OSyncEngine *osengine_new(OSyncGroup *group, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, group, error);
+
+ g_assert(group);
+ OSyncEngine *engine = g_malloc0(sizeof(OSyncEngine));
+ osync_group_set_data(group, engine);
+
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+
+ engine->context = g_main_context_new();
+ engine->syncloop = g_main_loop_new(engine->context, FALSE);
+ engine->group = group;
+
+ OSyncUserInfo *user = osync_user_new(error);
+ if (!user)
+ goto error;
+
+ char *enginesdir = g_strdup_printf("%s/engines", osync_user_get_confdir(user));
+ char *path = g_strdup_printf("%s/enginepipe", enginesdir);
+
+ if (mkdir_with_parents(enginesdir, 0755) < 0) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Couldn't create engines directory: %s", strerror(errno));
+ goto error_free_paths;
+ }
+
+ engine->syncing_mutex = g_mutex_new();
+ engine->info_received_mutex = g_mutex_new();
+ engine->syncing = g_cond_new();
+ engine->info_received = g_cond_new();
+ engine->started_mutex = g_mutex_new();
+ engine->started = g_cond_new();
+
+ //Set the default start flags
+ engine->fl_running = osync_flag_new(NULL);
+ osync_flag_set_pos_trigger(engine->fl_running, (OSyncFlagTriggerFunc)osengine_client_all_deciders, engine, NULL);
+
+ engine->fl_sync = osync_flag_new(NULL);
+ engine->fl_stop = osync_flag_new(NULL);
+ osync_flag_set_pos_trigger(engine->fl_stop, (OSyncFlagTriggerFunc)osengine_client_all_deciders, engine, NULL);
+
+ //The combined flags
+ engine->cmb_sent_changes = osync_comb_flag_new(FALSE, FALSE);
+ osync_flag_set_pos_trigger(engine->cmb_sent_changes, (OSyncFlagTriggerFunc)trigger_clients_sent_changes, engine, NULL);
+
+ engine->cmb_read_all = osync_comb_flag_new(FALSE, TRUE);
+ osync_flag_set_pos_trigger(engine->cmb_read_all, (OSyncFlagTriggerFunc)trigger_clients_read_all, engine, NULL);
+
+ engine->cmb_entries_mapped = osync_comb_flag_new(FALSE, FALSE);
+ osync_flag_set_pos_trigger(engine->cmb_entries_mapped, (OSyncFlagTriggerFunc)send_engine_changed, engine, NULL);
+
+
+ engine->cmb_synced = osync_comb_flag_new(FALSE, TRUE);
+ osync_flag_set_pos_trigger(engine->cmb_synced, (OSyncFlagTriggerFunc)send_engine_changed, engine, NULL);
+
+
+ engine->cmb_finished = osync_comb_flag_new(FALSE, TRUE);
+ osync_flag_set_pos_trigger(engine->cmb_finished, (OSyncFlagTriggerFunc)osengine_reset, engine, NULL);
+
+ engine->cmb_connected = osync_comb_flag_new(FALSE, FALSE);
+ osync_flag_set_pos_trigger(engine->cmb_connected, (OSyncFlagTriggerFunc)trigger_clients_connected, engine, NULL);
+
+ engine->cmb_chkconflict = osync_comb_flag_new(FALSE, TRUE);
+ osync_flag_set_pos_trigger(engine->cmb_chkconflict, (OSyncFlagTriggerFunc)trigger_status_end_conflicts, engine, NULL);
+
+ engine->cmb_multiplied = osync_comb_flag_new(FALSE, TRUE);
+
+ engine->cmb_committed_all = osync_comb_flag_new(FALSE, TRUE);
+ osync_flag_set_pos_trigger(engine->cmb_committed_all, (OSyncFlagTriggerFunc)send_engine_changed, engine, NULL);
+
+
+ engine->cmb_committed_all_sent = osync_comb_flag_new(FALSE, TRUE);
+ osync_flag_set_pos_trigger(engine->cmb_committed_all_sent, (OSyncFlagTriggerFunc)trigger_clients_comitted_all, engine, NULL);
+
+ osync_flag_set(engine->fl_sync);
+
+ int i;
+ for (i = 0; i < osync_group_num_members(group); i++) {
+ OSyncMember *member = osync_group_nth_member(group, i);
+ if (!osync_client_new(engine, member, error))
+ goto error_free_paths;
+ }
+
+ engine->maptable = osengine_mappingtable_new(engine);
+
+ osync_trace(TRACE_EXIT, "osengine_new: %p", engine);
+ return engine;
+
+error_free_paths:
+ g_free(path);
+ g_free(enginesdir);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+}
+
+/*! @brief This will free a engine and all resources associated
+ *
+ * This will free a engine and all resources associated
+ *
+ * @param engine A pointer to the engine, which you want to free
+ *
+ */
+void osengine_free(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "osengine_free(%p)", engine);
+
+ GList *c = NULL;
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ osync_client_free(client);
+ }
+
+ osengine_mappingtable_free(engine->maptable);
+ engine->maptable = NULL;
+
+ osync_flag_free(engine->fl_running);
+ osync_flag_free(engine->fl_sync);
+ osync_flag_free(engine->fl_stop);
+ osync_flag_free(engine->cmb_sent_changes);
+ osync_flag_free(engine->cmb_entries_mapped);
+ osync_flag_free(engine->cmb_synced);
+ osync_flag_free(engine->cmb_chkconflict);
+ osync_flag_free(engine->cmb_finished);
+ osync_flag_free(engine->cmb_connected);
+ osync_flag_free(engine->cmb_read_all);
+ osync_flag_free(engine->cmb_multiplied);
+ osync_flag_free(engine->cmb_committed_all);
+ osync_flag_free(engine->cmb_committed_all_sent);
+
+ g_list_free(engine->clients);
+ g_main_loop_unref(engine->syncloop);
+
+ g_main_context_unref(engine->context);
+
+ g_mutex_free(engine->syncing_mutex);
+ g_mutex_free(engine->info_received_mutex);
+ g_cond_free(engine->syncing);
+ g_cond_free(engine->info_received);
+ g_mutex_free(engine->started_mutex);
+ g_cond_free(engine->started);
+
+ g_free(engine);
+ osync_trace(TRACE_EXIT, "osengine_free");
+}
+
+/*! @brief This will set the conflict handler for the given engine
+ *
+ * The conflict handler will be called everytime a conflict occurs
+ *
+ * @param engine A pointer to the engine, for which to set the callback
+ * @param function A pointer to a function which will receive the conflict
+ * @param user_data Pointer to some data that will get passed to the status function as the last argument
+ *
+ */
+void osengine_set_conflict_callback(OSyncEngine *engine, void (* function) (OSyncEngine *, OSyncMapping *, void *), void *user_data)
+{
+ engine->conflict_callback = function;
+ engine->conflict_userdata = user_data;
+}
+
+/*! @brief This will set the change status handler for the given engine
+ *
+ * The change status handler will be called every time a new change is received, written etc
+ *
+ * @param engine A pointer to the engine, for which to set the callback
+ * @param function A pointer to a function which will receive the change status
+ * @param user_data Pointer to some data that will get passed to the status function as the last argument
+ *
+ */
+void osengine_set_changestatus_callback(OSyncEngine *engine, void (* function) (OSyncEngine *, OSyncChangeUpdate *, void *), void *user_data)
+{
+ engine->changestat_callback = function;
+ engine->changestat_userdata = user_data;
+}
+
+/*! @brief This will set the mapping status handler for the given engine
+ *
+ * The mapping status handler will be called every time a mapping is updated
+ *
+ * @param engine A pointer to the engine, for which to set the callback
+ * @param function A pointer to a function which will receive the mapping status
+ * @param user_data Pointer to some data that will get passed to the status function as the last argument
+ *
+ */
+void osengine_set_mappingstatus_callback(OSyncEngine *engine, void (* function) (OSyncMappingUpdate *, void *), void *user_data)
+{
+ engine->mapstat_callback = function;
+ engine->mapstat_userdata = user_data;
+}
+
+/*! @brief This will set the engine status handler for the given engine
+ *
+ * The engine status handler will be called every time the engine is updated (started, stoped etc)
+ *
+ * @param engine A pointer to the engine, for which to set the callback
+ * @param function A pointer to a function which will receive the engine status
+ * @param user_data Pointer to some data that will get passed to the status function as the last argument
+ *
+ */
+void osengine_set_enginestatus_callback(OSyncEngine *engine, void (* function) (OSyncEngine *, OSyncEngineUpdate *, void *), void *user_data)
+{
+ engine->engstat_callback = function;
+ engine->engstat_userdata = user_data;
+}
+
+/*! @brief This will set the member status handler for the given engine
+ *
+ * The member status handler will be called every time a member is updated (connects, disconnects etc)
+ *
+ * @param engine A pointer to the engine, for which to set the callback
+ * @param function A pointer to a function which will receive the member status
+ * @param user_data Pointer to some data that will get passed to the status function as the last argument
+ *
+ */
+void osengine_set_memberstatus_callback(OSyncEngine *engine, void (* function) (OSyncMemberUpdate *, void *), void *user_data)
+{
+ engine->mebstat_callback = function;
+ engine->mebstat_userdata = user_data;
+}
+
+/*! @brief This will set the callback handler for a custom message
+ *
+ * A custom message can be used to communicate with a plugin directly
+ *
+ * @param engine A pointer to the engine, for which to set the callback
+ * @param function A pointer to a function which will receive the member status
+ * @param user_data A pointer to some user data that the callback function will get passed
+ *
+ */
+void osengine_set_message_callback(OSyncEngine *engine, void *(* function) (OSyncEngine *, OSyncClient *, const char *, void *, void *), void *user_data)
+{
+ engine->plgmsg_callback = function;
+ engine->plgmsg_userdata = user_data;
+}
+
+/*! @brief This will initialize a engine
+ *
+ * After initialization, the engine will be ready to sync. The threads for the engine,
+ * the members are started. If one of the members has a listening server, the server will be
+ * started and listening.
+ *
+ * @param engine A pointer to the engine, which will be initialized
+ * @param error A pointer to a error struct
+ * @returns TRUE on success, FALSE otherwise. Check the error on FALSE.
+ *
+ */
+osync_bool osengine_init(OSyncEngine *engine, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osengine_init(%p, %p)", engine, error);
+
+ if (engine->is_initialized) {
+ osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "This engine was already initialized");
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ switch (osync_group_lock(engine->group)) {
+ case OSYNC_LOCKED:
+ osync_error_set(error, OSYNC_ERROR_LOCKED, "Group is locked");
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ case OSYNC_LOCK_STALE:
+ osync_debug("ENG", 1, "Detected stale lock file. Slow-syncing");
+ osync_status_update_engine(engine, ENG_PREV_UNCLEAN, NULL);
+ osync_group_set_slow_sync(engine->group, "data", TRUE);
+ break;
+ default:
+ break;
+ }
+
+ osync_flag_set(engine->cmb_entries_mapped);
+ osync_flag_set(engine->cmb_synced);
+ engine->allow_sync_alert = TRUE;
+
+ //OSyncMember *member = NULL;
+ OSyncGroup *group = engine->group;
+
+ if (osync_group_num_members(group) < 2) {
+ //Not enough members!
+ osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "You only configured %i members, but at least 2 are needed", osync_group_num_members(group));
+ osync_group_unlock(engine->group, TRUE);
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ engine->is_initialized = TRUE;
+
+ osync_trace(TRACE_INTERNAL, "Spawning clients");
+ GList *c = NULL;
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ osync_queue_create(client->commands_from_osplugin, NULL);
+
+ if (!osync_client_spawn(client, engine, error)) {
+ osync_group_unlock(engine->group, TRUE);
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_queue_set_message_handler(client->commands_from_osplugin, (OSyncMessageHandler)engine_message_handler, engine);
+ if (!(engine->man_dispatch))
+ osync_queue_setup_with_gmainloop(client->commands_from_osplugin, engine->context);
+ osync_trace(TRACE_INTERNAL, "opening client queue");
+ if (!osync_queue_connect(client->commands_from_osplugin, OSYNC_QUEUE_RECEIVER, 0 )) {
+ osync_group_unlock(engine->group, TRUE);
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+ }
+
+ osync_trace(TRACE_INTERNAL, "opening engine queue");
+ if (!osync_queue_new_pipes(&engine->commands_from_self, &engine->commands_to_self, error)) {
+ osync_group_unlock(engine->group, TRUE);
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ if (!osync_queue_connect(engine->commands_from_self, OSYNC_QUEUE_RECEIVER, 0 )) {
+ osync_group_unlock(engine->group, TRUE);
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ if (!osync_queue_connect(engine->commands_to_self, OSYNC_QUEUE_SENDER, 0 )) {
+ osync_group_unlock(engine->group, TRUE);
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_queue_set_message_handler(engine->commands_from_self, (OSyncMessageHandler)engine_message_handler, engine);
+ if (!(engine->man_dispatch))
+ osync_queue_setup_with_gmainloop(engine->commands_from_self, engine->context);
+
+ osync_trace(TRACE_INTERNAL, "initializing clients");
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ if (!osync_client_init(client, engine, error)) {
+ osengine_finalize(engine);
+ osync_group_unlock(engine->group, TRUE);
+ osync_trace(TRACE_EXIT_ERROR, "osengine_init: %s", osync_error_print(error));
+ return FALSE;
+ }
+ }
+
+ osync_debug("ENG", 3, "Running the main loop");
+
+ //Now we can run the main loop
+ //We protect the startup by a g_cond
+ g_mutex_lock(engine->started_mutex);
+ GSource *idle = g_idle_source_new();
+ g_source_set_priority(idle, G_PRIORITY_HIGH);
+ g_source_set_callback(idle, startupfunc, engine, NULL);
+ g_source_attach(idle, engine->context);
+ engine->thread = g_thread_create ((GThreadFunc)g_main_loop_run, engine->syncloop, TRUE, NULL);
+ g_cond_wait(engine->started, engine->started_mutex);
+ g_mutex_unlock(engine->started_mutex);
+
+ osync_trace(TRACE_EXIT, "osengine_init");
+ return TRUE;
+}
+
+/*! @brief This will finalize a engine
+ *
+ * Finalizing a engine will stop all threads and listening server.
+ * The engine can be initialized again.
+ *
+ * @param engine A pointer to the engine, which will be finalized
+ *
+ */
+void osengine_finalize(OSyncEngine *engine)
+{
+ //FIXME check if engine is running
+ osync_trace(TRACE_ENTRY, "osengine_finalize(%p)", engine);
+
+ if (!engine->is_initialized) {
+ osync_trace(TRACE_EXIT_ERROR, "osengine_finalize: Not initialized");
+ return;
+ }
+
+ g_assert(engine);
+ osync_debug("ENG", 3, "finalizing engine %p", engine);
+
+ if (engine->thread) {
+ g_main_loop_quit(engine->syncloop);
+ g_thread_join(engine->thread);
+ }
+
+ GList *c = NULL;
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ osync_queue_disconnect(client->commands_from_osplugin, NULL);
+ osync_client_finalize(client, NULL);
+ }
+
+ osync_queue_disconnect(engine->commands_from_self, NULL);
+ osync_queue_disconnect(engine->commands_to_self, NULL);
+
+ osync_queue_free(engine->commands_from_self);
+ engine->commands_from_self = NULL;
+ osync_queue_free(engine->commands_to_self);
+ engine->commands_to_self = NULL;
+
+ osengine_mappingtable_close(engine->maptable);
+
+ if (engine->error) {
+ /* If the error occured during connect, we
+ * dont want to trigger a slow-sync the next
+ * time. In the case the we have a slow-sync
+ * right in the beginning, we also dont remove
+ * the lockfile to trigger a slow-sync again
+ * next time */
+ if (!osync_flag_is_set(engine->cmb_connected) && !engine->slowsync)
+ osync_group_unlock(engine->group, TRUE);
+ else
+ osync_group_unlock(engine->group, FALSE);
+ } else
+ osync_group_unlock(engine->group, TRUE);
+
+ engine->is_initialized = FALSE;
+ osync_trace(TRACE_EXIT, "osengine_finalize");
+}
+
+/*! @brief Starts to synchronize the given OSyncEngine
+ *
+ * This function synchronizes a given engine. The Engine has to be created
+ * from a OSyncGroup before by using osengine_new(). This function will not block
+ *
+ * @param engine A pointer to the engine, which will be used to sync
+ * @param error A pointer to a error struct
+ * @returns TRUE on success, FALSE otherwise. Check the error on FALSE. Note that this just says if the sync has been started successfully, not if the sync itself was successfull
+ *
+ */
+osync_bool osengine_synchronize(OSyncEngine *engine, OSyncError **error)
+{
+ osync_trace(TRACE_INTERNAL, "synchronize now");
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, engine);
+ g_assert(engine);
+
+ if (!engine->is_initialized) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "osengine_synchronize: Not initialized");
+ goto error;
+ }
+
+ /* We now remember if slow-sync is set right from the start.
+ * If it is, we dont remove the lock file in the case of
+ * a error during connect. */
+ if (osync_group_get_slow_sync(engine->group, "data")) {
+ engine->slowsync = TRUE;
+ } else {
+ engine->slowsync = FALSE;
+ }
+
+ engine->wasted = 0;
+ engine->alldeciders = 0;
+
+ osync_flag_set(engine->fl_running);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_SYNCHRONIZE, 0, error);
+ if (!message)
+ goto error;
+
+ if (!osync_queue_send_message(engine->commands_to_self, NULL, message, error))
+ goto error_free_message;
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+/*! @brief Sets a flag on the engine that the engine should only request the info about sync objects
+ *
+ * This can be used to see only what has changed. The engine will not request the data itself from
+ * the members. Note that some members might not support this behaviour and might send the data anyways.
+ *
+ * @param engine A pointer to the engine, for which to set the flag
+ */
+void osengine_flag_only_info(OSyncEngine *engine)
+{
+ osync_flag_unset(engine->fl_sync);
+}
+
+/*! @brief Sets a flag on the engine that the engine should do single stepping (For debugging)
+ *
+ * This flag can be used to set single stepping on the engine. The engine will pause after each iteration.
+ * Use osengine_one_iteration to initialize the next iteration. This is only for debugging purposes.
+ *
+ * @param engine A pointer to the engine, for which to set the flag
+ */
+void osengine_flag_manual(OSyncEngine *engine)
+{
+ if (engine->syncloop) {
+ g_warning("Unable to flag manual since engine is already initialized\n");
+ }
+ engine->man_dispatch = TRUE;
+}
+
+/*! @brief This will pause the engine
+ *
+ * This flag can be used to temporarily suspend the engine
+ *
+ * @param engine A pointer to the engine, for which to set the flag
+ */
+void osengine_pause(OSyncEngine *engine)
+{
+ osync_flag_unset(engine->fl_running);
+}
+
+/*! @brief Sets a flag on the engine that the engine should do single stepping (For debugging)
+ *
+ * This flag can be used to set single stepping on the engine. The engine will pause after each iteration.
+ * Use osengine_one_iteration to initialize the next iteration. This is only for debugging purposes.
+ *
+ * @param engine A pointer to the engine, for which to set the flag
+ */
+void osengine_abort(OSyncEngine *engine)
+{
+ osync_flag_set(engine->fl_stop);
+}
+
+/*! @brief Allows that the engine can be started by a member
+ *
+ * Allow the engine to by started by a member by sending a sync alert.
+ *
+ * @param engine The engine
+ */
+void osengine_allow_sync_alert(OSyncEngine *engine)
+{
+ engine->allow_sync_alert = TRUE;
+}
+
+/*! @brief Do not allow that the engine can be started by a member
+ *
+ * Do not allow the engine to by started by a member by sending a sync alert.
+ *
+ * @param engine The engine
+ */
+void osengine_deny_sync_alert(OSyncEngine *engine)
+{
+ engine->allow_sync_alert = FALSE;
+}
+
+/*! @brief This function will synchronize once and block until the sync has finished
+ *
+ * This can be used to sync a group and wait for the synchronization end. DO NOT USE
+ * osengine_wait_sync_end for this as this might introduce a race condition.
+ *
+ * @param engine A pointer to the engine, which to sync and wait for the sync end
+ * @param error A pointer to a error struct
+ * @returns TRUE on success, FALSE otherwise.
+ *
+ */
+osync_bool osengine_sync_and_block(OSyncEngine *engine, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, engine, error);
+
+ g_mutex_lock(engine->syncing_mutex);
+
+ if (!osengine_synchronize(engine, error)) {
+ g_mutex_unlock(engine->syncing_mutex);
+ goto error;
+ }
+
+ g_cond_wait(engine->syncing, engine->syncing_mutex);
+ g_mutex_unlock(engine->syncing_mutex);
+
+ if (engine->error) {
+ osync_error_duplicate(error, &(engine->error));
+ goto error;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+}
+
+/*! @brief This function will block until a synchronization has ended
+ *
+ * This can be used to wait until the synchronization has ended. Note that this function will always
+ * block until 1 sync has ended. It can be used before the sync has started, to wait for one auto-sync
+ * to end
+ *
+ * @param engine A pointer to the engine, for which to wait for the sync end
+ * @param error Return location for the error if the sync was not successfull
+ * @returns TRUE on success, FALSE otherwise.
+ */
+osync_bool osengine_wait_sync_end(OSyncEngine *engine, OSyncError **error)
+{
+ g_mutex_lock(engine->syncing_mutex);
+ g_cond_wait(engine->syncing, engine->syncing_mutex);
+ g_mutex_unlock(engine->syncing_mutex);
+
+ if (engine->error) {
+ osync_error_duplicate(error, &(engine->error));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/*! @brief This function will block until all change object information has been received
+ *
+ * This will block until the information and not the data has been received.
+ *
+ * @param engine A pointer to the engine, for which to wait for the info
+ */
+void osengine_wait_info_end(OSyncEngine *engine)
+{
+ g_mutex_lock(engine->info_received_mutex);
+ g_cond_wait(engine->info_received, engine->info_received_mutex);
+ g_mutex_unlock(engine->info_received_mutex);
+}
+
+/*! @brief Does one iteration of the engine (For debugging)
+ *
+ * @param engine The engine to iterate
+ */
+void osengine_one_iteration(OSyncEngine *engine)
+{
+ /*TODO: Reimplement support to stepping mode on engine */
+ abort();//osync_queue_dispatch(engine->incoming);
+}
+
+/*! @brief Searches for a mapping by its id
+ *
+ * @param engine The engine
+ * @param id The id of the mapping
+ * @returns The mapping or NULL if not found
+ */
+OSyncMapping *osengine_mapping_from_id(OSyncEngine *engine, long long int id)
+{
+ return osengine_mappingtable_mapping_from_id(engine->maptable, id);
+}
+
+/** @}*/
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_engine.h b/debian/opensync/opensync-0.22/osengine/osengine_engine.h
new file mode 100644
index 00000000..0b8b1ea0
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_engine.h
@@ -0,0 +1,26 @@
+OSyncEngine *osengine_new(OSyncGroup *group, OSyncError **);
+void osengine_free(OSyncEngine *engine);
+
+void osengine_calculate_flags(OSyncEngine *engine);
+void osengine_client_all_deciders(OSyncEngine *engine);
+void osengine_decider(OSyncEngine *engine);
+void osengine_client_decider(OSyncEngine *engine, OSyncClient *client);
+void osengine_changes_done(OSyncEngine *engine, OSyncMember *member);
+osync_bool osengine_init(OSyncEngine *engine, OSyncError **);
+void osengine_finalize(OSyncEngine *engine);
+void osengine_flag_only_info(OSyncEngine *engine);
+osync_bool osengine_synchronize(OSyncEngine *engine, OSyncError **);
+void osengine_pause(OSyncEngine *engine);
+void osengine_abort(OSyncEngine *engine);
+osync_bool osengine_wait_sync_end(OSyncEngine *engine, OSyncError **error);
+void osengine_wait_info_end(OSyncEngine *engine);
+void osengine_one_iteration(OSyncEngine *engine);
+void osengine_flag_manual(OSyncEngine *engine);
+void osengine_set_message_callback(OSyncEngine *engine, void *(* function) (OSyncEngine *, OSyncClient *, const char *, void *, void *), void *user_data);
+void osengine_set_conflict_callback(OSyncEngine *engine, void (* function) (OSyncEngine *, OSyncMapping *, void *), void *user_data);
+void osengine_set_changestatus_callback(OSyncEngine *engine, void (* function) (OSyncEngine*, OSyncChangeUpdate *, void *), void *user_data);
+void osengine_set_mappingstatus_callback(OSyncEngine *engine, void (* function) (OSyncMappingUpdate *, void *), void *user_data);
+void osengine_set_enginestatus_callback(OSyncEngine *engine, void (* function) (OSyncEngine *, OSyncEngineUpdate *, void *), void *user_data);
+void osengine_set_memberstatus_callback(OSyncEngine *engine, void (* function) (OSyncMemberUpdate *, void *), void *user_data);
+osync_bool osengine_sync_and_block(OSyncEngine *engine, OSyncError **error);
+OSyncMapping *osengine_mapping_from_id(OSyncEngine *engine, long long id);
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_engine_internals.h b/debian/opensync/opensync-0.22/osengine/osengine_engine_internals.h
new file mode 100644
index 00000000..9f4170df
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_engine_internals.h
@@ -0,0 +1,80 @@
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct OSyncEngine {
+ /** The real opensync group **/
+ OSyncGroup *group;
+ void (* conflict_callback) (OSyncEngine *, OSyncMapping *, void *);
+ void *conflict_userdata;
+ void (* changestat_callback) (OSyncEngine *, OSyncChangeUpdate *, void *);
+ void *changestat_userdata;
+ void (* mebstat_callback) (OSyncMemberUpdate *, void *);
+ void *mebstat_userdata;
+ void (* engstat_callback) (OSyncEngine *, OSyncEngineUpdate *, void *);
+ void *engstat_userdata;
+ void (* mapstat_callback) (OSyncMappingUpdate *, void *);
+ void *mapstat_userdata;
+ void *(* plgmsg_callback) (OSyncEngine *, OSyncClient *, const char *, void *, void *);
+ void *plgmsg_userdata;
+ /** A list of connected clients **/
+ GList *clients;
+ /** The g_main_loop of this engine **/
+ GMainLoop *syncloop;
+ GMainContext *context;
+ /** The incoming queue of this engine **/
+ OSyncQueue *commands_from_self;
+ OSyncQueue *commands_to_self;
+
+ GCond* syncing;
+ GMutex* syncing_mutex;
+
+ GCond* info_received;
+ GMutex* info_received_mutex;
+
+ GCond* started;
+ GMutex* started_mutex;
+
+ //The normal flags
+ OSyncFlag *fl_running; //Is the syncengine running?
+ OSyncFlag *fl_sync; //Do we want to sync data or do we just want info?
+ OSyncFlag *fl_stop; //Do we want to stop the engine?
+
+ //The combined flags
+ OSyncFlag *cmb_connected; //Did all client connect or error?
+ OSyncFlag *cmb_sent_changes; //Did all clients sent changes?
+ OSyncFlag *cmb_entries_mapped; //Do we have unmapped entries?
+ OSyncFlag *cmb_synced; //Are all mappings synced?
+ OSyncFlag *cmb_finished; //Are all clients done and disconnected?
+ OSyncFlag *cmb_chkconflict;
+ OSyncFlag *cmb_read_all;
+ OSyncFlag *cmb_multiplied;
+ OSyncFlag *cmb_committed_all;
+ OSyncFlag *cmb_committed_all_sent;
+
+ osync_bool man_dispatch;
+ osync_bool allow_sync_alert;
+ OSyncMappingTable *maptable;
+ osync_bool is_initialized;
+ osync_bool committed_all_sent;
+
+ OSyncError *error;
+ GThread *thread;
+
+ int wasted;
+ int alldeciders;
+
+ osync_bool slowsync;
+};
+#endif
+
+void send_client_changed(OSyncEngine *engine, OSyncClient *client);
+void send_mappingentry_changed(OSyncEngine *engine, OSyncMappingEntry *entry);
+void send_mapping_changed(OSyncEngine *engine, OSyncMapping *mapping);
+void send_get_change_data(OSyncEngine *sender, OSyncMappingEntry *entry);
+void send_commit_change(OSyncEngine *sender, OSyncMappingEntry *entry);
+void send_connect(OSyncClient *target, OSyncEngine *sender);
+void send_get_changes(OSyncClient *target, OSyncEngine *sender, osync_bool data);
+void send_sync_done(OSyncClient *target, OSyncEngine *sender);
+void send_disconnect(OSyncClient *target, OSyncEngine *sender);
+void send_read_change(OSyncEngine *sender, OSyncMappingEntry *entry);
+void send_engine_changed(OSyncEngine *engine);
+void send_committed_all(OSyncClient *target, OSyncEngine *sender);
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_flags.c b/debian/opensync/opensync-0.22/osengine/osengine_flags.c
new file mode 100644
index 00000000..77c7f5df
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_flags.c
@@ -0,0 +1,221 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+#include "engine_internals.h"
+
+OSyncFlag *osync_flag_new(OSyncFlag *parent)
+{
+ OSyncFlag *flag = g_malloc0(sizeof(OSyncFlag));
+ flag->is_set = FALSE;
+ if (parent) {
+ flag->comb_flag = parent;
+ parent->num_not_set++;
+ osync_flag_calculate_comb(parent);
+ }
+ return flag;
+}
+
+void osync_flag_free(OSyncFlag *flag)
+{
+ g_free(flag);
+}
+
+OSyncFlag *osync_comb_flag_new(osync_bool any, osync_bool default_val)
+{
+ OSyncFlag *flag = osync_flag_new(NULL);
+ flag->is_comb = TRUE;
+ flag->is_any = any;
+ flag->default_val = default_val;
+ flag->is_set = default_val;
+ return flag;
+}
+
+void osync_flag_attach(OSyncFlag *flag, OSyncFlag *target)
+{
+ if (flag->comb_flag)
+ return;
+ g_assert(target->is_comb);
+ flag->comb_flag = target;
+ if (flag->is_set) {
+ target->num_set++;
+ } else {
+ target->num_not_set++;
+ }
+ osync_flag_calculate_comb(target);
+}
+
+osync_bool osync_flag_is_attached(OSyncFlag *flag)
+{
+ if (flag->comb_flag)
+ return TRUE;
+ return FALSE;
+}
+
+void osync_flag_detach(OSyncFlag *flag)
+{
+ OSyncFlag *target = flag->comb_flag;
+ if (!target)
+ return;
+ if (flag->is_set) {
+ target->num_set--;
+ } else {
+ target->num_not_set--;
+ }
+ flag->comb_flag = NULL;
+ osync_flag_calculate_comb(target);
+}
+
+void osync_flag_set_pos_trigger(OSyncFlag *flag, OSyncFlagTriggerFunc func, void *data1, void *data2)
+{
+ flag->pos_trigger_func = func;
+ flag->pos_user_data1 = data1;
+ flag->pos_user_data2 = data2;
+}
+
+void osync_flag_set_neg_trigger(OSyncFlag *flag, OSyncFlagTriggerFunc func, void *data1, void *data2)
+{
+ flag->neg_trigger_func = func;
+ flag->neg_user_data1 = data1;
+ flag->neg_user_data2 = data2;
+}
+
+void osync_flag_calculate_comb(OSyncFlag *flag)
+{
+ if (!flag->is_comb)
+ return;
+
+ if (!flag->num_not_set && !flag->num_set) {
+ if (flag->default_val)
+ osync_flag_set(flag);
+ else
+ osync_flag_unset(flag);
+ return;
+ }
+
+ if (!flag->is_any) {
+ if (!flag->num_not_set && flag->num_set) {
+ osync_flag_set(flag);
+ } else {
+ osync_flag_unset(flag);
+ }
+ } else {
+ if (flag->num_set) {
+ osync_flag_set(flag);
+ } else {
+ osync_flag_unset(flag);
+ }
+ }
+}
+
+osync_bool osync_flag_is_set(OSyncFlag *flag)
+{
+ if (flag->is_set == TRUE && flag->is_changing == FALSE)
+ return TRUE;
+ return FALSE;
+}
+
+osync_bool osync_flag_is_not_set(OSyncFlag *flag)
+{
+ if (flag->is_set == FALSE && flag->is_changing == FALSE)
+ return TRUE;
+ return FALSE;
+}
+
+void osync_comb_flag_update(OSyncFlag *combflag, OSyncFlag *flag, osync_bool prev_state)
+{
+ if (prev_state == flag->is_set)
+ return;
+ if (flag->is_set) {
+ combflag->num_not_set--;
+ combflag->num_set++;
+ } else {
+ combflag->num_not_set++;
+ combflag->num_set--;
+ }
+}
+
+void osync_flag_changing(OSyncFlag *flag)
+{
+ flag->is_changing = TRUE;
+}
+
+void osync_flag_cancel(OSyncFlag *flag)
+{
+ flag->is_changing = FALSE;
+}
+
+void osync_flag_unset(OSyncFlag *flag)
+{
+ osync_bool oldstate = flag->is_set;
+ flag->is_set = FALSE;
+ flag->is_changing = FALSE;
+ osync_flag_calc_trigger(flag, oldstate);
+ if (flag->comb_flag) {
+ osync_comb_flag_update(flag->comb_flag, flag, oldstate);
+ osync_flag_calculate_comb(flag->comb_flag);
+ }
+}
+
+void osync_flag_set(OSyncFlag *flag)
+{
+ osync_bool oldstate = flag->is_set;
+ flag->is_set = TRUE;
+ flag->is_changing = FALSE;
+ osync_flag_calc_trigger(flag, oldstate);
+ if (flag->comb_flag) {
+ osync_comb_flag_update(flag->comb_flag, flag, oldstate);
+ osync_flag_calculate_comb(flag->comb_flag);
+ }
+}
+
+void osync_flag_set_state(OSyncFlag *flag, osync_bool state)
+{
+ osync_bool oldstate = flag->is_set;
+ flag->is_set = state;
+ flag->is_changing = FALSE;
+ if (flag->comb_flag) {
+ osync_comb_flag_update(flag->comb_flag, flag, oldstate);
+ }
+ if (flag->is_comb) {
+ //flag->num_not_set = 0;
+ //flag->num_set = 0;
+ }
+}
+
+osync_bool osync_flag_get_state(OSyncFlag *flag)
+{
+ return flag->is_set;
+}
+
+void osync_flag_calc_trigger(OSyncFlag *flag, osync_bool oldstate)
+{
+ if (flag->is_set != oldstate) {
+ if (flag->is_set == TRUE) {
+ if (flag->pos_trigger_func) {
+ flag->pos_trigger_func(flag->pos_user_data1, flag->pos_user_data2);
+ }
+ } else {
+ if (flag->neg_trigger_func) {
+ flag->neg_trigger_func(flag->neg_user_data1, flag->neg_user_data2);
+ }
+ }
+ }
+}
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_flags_internals.h b/debian/opensync/opensync-0.22/osengine/osengine_flags_internals.h
new file mode 100644
index 00000000..c42adf5d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_flags_internals.h
@@ -0,0 +1,53 @@
+
+/*! @brief The functions that can be called on a plugin */
+struct OSyncFlag {
+ /** If this flag is raised */
+ osync_bool is_set;
+ /** If this flag is currently changing its value */
+ osync_bool is_changing;
+ /** The default value of the flag if no children are conencted */
+ osync_bool default_val;
+ /** The parent flag*/
+ OSyncFlag *comb_flag;
+ /** The cached number of unset child flags */
+ unsigned int num_not_set;
+ /** The cached number of set child flags */
+ unsigned int num_set;
+ /** If this flag is a combined flag */
+ osync_bool is_comb;
+ /** The function to be called when the value changes from neq to pos */
+ OSyncFlagTriggerFunc pos_trigger_func;
+ /** To first value to be passed to the pos triger function */
+ void *pos_user_data1;
+ /** To second value to be passed to the pos triger function */
+ void *pos_user_data2;
+ /** The function to be called when the value changes from pos to neq */
+ OSyncFlagTriggerFunc neg_trigger_func;
+ /** To first value to be passed to the neq triger function */
+ void *neg_user_data1;
+ /** To second value to be passed to the neq triger function */
+ void *neg_user_data2;
+ /** Should the combined flag be a OR or a AND flag? */
+ osync_bool is_any;
+};
+
+OSyncFlag *osync_flag_new(OSyncFlag *parent);
+OSyncFlag *osync_comb_flag_new(osync_bool any, osync_bool default_val);
+void osync_flag_set_pos_trigger(OSyncFlag *flag, OSyncFlagTriggerFunc func, void *data1, void *data2);
+void osync_flag_set_neg_trigger(OSyncFlag *flag, OSyncFlagTriggerFunc func, void *data1, void *data2);
+void osync_flag_calculate_comb(OSyncFlag *flag);
+osync_bool osync_flag_is_set(OSyncFlag *flag);
+osync_bool osync_flag_is_not_set(OSyncFlag *flag);
+void osync_comb_flag_update(OSyncFlag *combflag, OSyncFlag *flag, osync_bool prev_state);
+void osync_flag_changing(OSyncFlag *flag);
+void osync_flag_cancel(OSyncFlag *flag);
+void osync_flag_unset(OSyncFlag *flag);
+void osync_flag_set(OSyncFlag *flag);
+void osync_flag_calc_trigger(OSyncFlag *flag, osync_bool oldstate);
+void osync_change_flags_detach(OSyncChange *change);
+osync_bool osync_flag_get_state(OSyncFlag *flag);
+void osync_flag_free(OSyncFlag *flag);
+void osync_flag_set_state(OSyncFlag *flag, osync_bool state);
+void osync_flag_attach(OSyncFlag *flag, OSyncFlag *target);
+void osync_flag_detach(OSyncFlag *flag);
+osync_bool osync_flag_is_attached(OSyncFlag *flag);
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_mapcmds.c b/debian/opensync/opensync-0.22/osengine/osengine_mapcmds.c
new file mode 100644
index 00000000..045681a7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_mapcmds.c
@@ -0,0 +1,616 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+#include "engine_internals.h"
+
+/**
+ * @ingroup OSEngineMappingPrivate
+ */
+/*@{*/
+
+static OSyncMappingEntry *_osync_find_next_diff(OSyncMapping *mapping, OSyncMappingEntry *orig_entry)
+{
+ GList *e;
+ for (e = mapping->entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ if (osync_change_get_changetype(entry->change) == CHANGE_UNKNOWN)
+ continue;
+ if ((entry->change != orig_entry->change) && osync_change_compare(orig_entry->change, entry->change) != CONV_DATA_SAME)
+ return entry;
+ }
+ osync_debug("MAP", 3, "Could not find next diff");
+ return NULL;
+}
+
+static OSyncMappingEntry *_osync_find_next_same(OSyncMapping *mapping, OSyncMappingEntry *orig_entry)
+{
+ GList *e;
+ for (e = mapping->entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ if (osync_change_get_changetype(entry->change) == CHANGE_UNKNOWN)
+ continue;
+ if ((entry->change != orig_entry->change) && osync_change_compare(orig_entry->change, entry->change) == CONV_DATA_SAME)
+ return entry;
+ }
+ osync_debug("MAP", 3, "Could not find next diff");
+ return NULL;
+}
+
+static OSyncMappingEntry *_osync_change_clone(OSyncEngine *engine, OSyncMapping *new_mapping, OSyncMappingEntry *comp_entry)
+{
+ OSyncMappingEntry *newentry = osengine_mappingentry_new(NULL);
+ newentry->change = osync_change_new();
+ newentry->client = comp_entry->client;
+ osengine_mapping_add_entry(new_mapping, newentry);
+ osengine_mappingview_add_entry(comp_entry->view, newentry);
+ osengine_mappingentry_update(newentry, comp_entry->change);
+ osync_change_set_uid(newentry->change, osync_change_get_uid(comp_entry->change));
+ osync_flag_set(newentry->fl_has_data);
+ osync_flag_set(newentry->fl_mapped);
+ osync_flag_set(newentry->fl_has_info);
+ osync_flag_set(newentry->fl_dirty);
+ osync_flag_unset(newentry->fl_synced);
+ osync_change_save(newentry->change, TRUE, NULL);
+ return newentry;
+}
+
+osync_bool osync_change_elevate(OSyncEngine *engine, OSyncChange *change, int level)
+{
+ osync_debug("MAP", 3, "elevating change %s (%p) to level %i", osync_change_get_uid(change), change, level);
+ int i = 0;
+ for (i = 0; i < level; i++) {
+ if (!osync_change_duplicate(change))
+ return FALSE;
+ }
+ osync_debug("MAP", 3, "change after being elevated %s (%p)", osync_change_get_uid(change), change);
+ osync_change_save(change, TRUE, NULL);
+ return TRUE;
+}
+
+osync_bool osync_change_check_level(OSyncEngine *engine, OSyncMappingEntry *entry)
+{
+ GList *c;
+ osync_debug("MAP", 3, "checking level for change %s (%p)", osync_change_get_uid(entry->change), entry);
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ OSyncMappingView *view = osengine_mappingtable_find_view(engine->maptable, client->member);
+ if (!osengine_mappingview_uid_is_unique(view, entry, TRUE))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static int prod(int n)
+{
+ int ret;
+ for (ret = 0; n > 0; n--)
+ ret += n;
+ return ret;
+}
+
+void osengine_mapping_multiply_master(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, engine, mapping);
+ g_assert(engine);
+
+ OSyncMappingTable *table = engine->maptable;
+ OSyncMappingEntry *entry = NULL;
+ OSyncMappingEntry *master = NULL;
+
+ master = mapping->master;
+ g_assert(master);
+ if (osync_flag_is_not_set(master->fl_dirty))
+ osync_flag_set(master->fl_synced);
+ else
+ osync_flag_attach(master->fl_committed, table->engine->cmb_committed_all);
+
+ //Send the change to every source that is different to the master source and set state to writing in the changes
+ GList *v;
+ for (v = table->views; v; v = v->next) {
+ OSyncMappingView *view = v->data;
+ //Check if this client is already listed in the mapping
+ entry = osengine_mapping_find_entry(mapping, NULL, view);
+ if (entry == master)
+ continue;
+ if (entry && (osync_change_compare(entry->change, master->change) == CONV_DATA_SAME)) {
+ if (osync_flag_is_not_set(entry->fl_dirty))
+ osync_flag_set(entry->fl_synced);
+ continue;
+ }
+ if (!entry) {
+ entry = osengine_mappingentry_new(NULL);
+ entry->change = osync_change_new();
+ entry->client = view->client;
+ osengine_mappingview_add_entry(view, entry);
+ osengine_mappingentry_update(entry, master->change);
+ osync_change_set_uid(entry->change, osync_change_get_uid(master->change));
+ osync_change_set_member(entry->change, view->client->member);
+ osengine_mapping_add_entry(mapping, entry);
+ } else {
+ osync_bool had_data = osync_change_has_data(entry->change);
+ osengine_mappingentry_update(entry, master->change);
+ if (osync_change_get_changetype(entry->change) == CHANGE_ADDED || osync_change_get_changetype(entry->change) == CHANGE_UNKNOWN) {
+ osync_change_set_changetype(entry->change, CHANGE_MODIFIED);
+ }
+
+ if (osync_member_get_slow_sync(view->client->member, osync_objtype_get_name(osync_change_get_objtype(entry->change))) && !had_data) {
+ osync_change_set_changetype(entry->change, CHANGE_ADDED);
+ }
+ }
+ if (osync_flag_is_set(view->client->fl_sent_changes)) {
+ //osync_change_flags_attach(change, mapping);
+ osync_flag_set(entry->fl_dirty);
+ osync_flag_set(entry->fl_has_data);
+ osync_flag_set(entry->fl_mapped);
+ osync_flag_set(entry->fl_has_info);
+ osync_flag_unset(entry->fl_synced);
+ OSyncError *error = NULL;
+ osync_change_save(entry->change, TRUE, &error);
+ osync_flag_attach(entry->fl_committed, table->engine->cmb_committed_all);
+ }
+ }
+
+ OSyncError *error = NULL;
+ osync_change_save(master->change, TRUE, &error);
+
+ osync_flag_set(mapping->fl_multiplied);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+
+
+void osengine_mapping_check_conflict(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, engine, mapping);
+ GList *e;
+ GList *n;
+ osync_bool is_conflict = FALSE;
+ int is_same = 0;
+ OSyncMappingEntry *leftentry = NULL;
+ OSyncMappingEntry *rightentry = NULL;
+
+ g_assert(engine != NULL);
+ g_assert(mapping != NULL);
+ g_assert(!mapping->master);
+
+ for (e = mapping->entries; e; e = e->next) {
+ leftentry = e->data;
+ if (osync_change_get_changetype(leftentry->change) == CHANGE_UNKNOWN)
+ continue;
+ mapping->master = leftentry;
+ for (n = e->next; n; n = n->next) {
+ rightentry = n->data;
+ if (osync_change_get_changetype(rightentry->change) == CHANGE_UNKNOWN)
+ continue;
+
+ if (osync_change_compare(leftentry->change, rightentry->change) != CONV_DATA_SAME) {
+ is_conflict = TRUE;
+ goto conflict;
+ } else {
+ is_same++;
+ }
+ }
+ }
+
+ conflict:
+ if (is_conflict) {
+ //conflict, solve conflict
+ osync_debug("MAP", 2, "Got conflict for mapping %p", mapping);
+ osync_status_conflict(engine, mapping);
+ osync_flag_set(mapping->fl_chkconflict);
+ osync_trace(TRACE_EXIT, "%s: Got conflict", __func__);
+ return;
+ }
+ g_assert(mapping->master);
+ osync_flag_set(mapping->fl_chkconflict);
+
+ //Our mapping is already solved since there is no conflict
+ osync_flag_set(mapping->fl_solved);
+
+ if (is_same == prod(g_list_length(engine->maptable->views) - 1)) {
+ osync_trace(TRACE_INTERNAL, "No need to sync. All entries are the same");
+ osync_flag_set(mapping->cmb_synced);
+ osync_flag_set(mapping->fl_multiplied);
+ }
+
+ send_mapping_changed(engine, mapping);
+ osync_trace(TRACE_EXIT, "%s: No conflict", __func__);
+}
+
+static OSyncMapping *_osengine_mapping_find(OSyncMappingTable *table, OSyncMappingEntry *orig_entry)
+{
+ GList *i;
+ GList *n;
+ osync_bool mapping_found = FALSE;
+
+ for (i = table->mappings; i; i = i->next) {
+ OSyncMapping *mapping = i->data;
+ //We only need mapping where our member isnt listed yet.
+ if (!osengine_mapping_find_entry(mapping, NULL, orig_entry->view)) {
+ mapping_found = TRUE;
+ for (n = mapping->entries; n; n = n->next) {
+ OSyncMappingEntry *entry = n->data;
+ if (osync_change_compare_data(entry->change, orig_entry->change) == CONV_DATA_MISMATCH) {
+ mapping_found = FALSE;
+ continue;
+ }
+ }
+ if (mapping_found)
+ return mapping;
+ }
+ }
+ return NULL;
+}
+
+void osengine_change_map(OSyncEngine *engine, OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_ENTRY, "osengine_change_map(%p, %p)", engine, entry);
+ OSyncMapping *mapping = NULL;
+ if (!(mapping = _osengine_mapping_find(engine->maptable, entry))) {
+ mapping = osengine_mapping_new(engine->maptable);
+ osync_flag_unset(mapping->fl_chkconflict);
+ osync_flag_unset(mapping->fl_multiplied);
+ mapping->id = osengine_mappingtable_get_next_id(engine->maptable);
+ osync_trace(TRACE_INTERNAL, "No previous mapping found. Creating new one: %p", mapping);
+ }
+ osengine_mapping_add_entry(mapping, entry);
+ osync_flag_set(entry->fl_mapped);
+ osync_change_save(entry->change, FALSE, NULL);
+ osync_trace(TRACE_EXIT, "osengine_change_map");
+}
+
+/*@}*/
+
+/**
+ * @defgroup OSEngineMapping OpenSync Mapping
+ * @ingroup OSEnginePublic
+ * @brief The commands to manipulate mappings
+ *
+ */
+/*@{*/
+
+/** @brief Solves the conflict by duplicating the conflicting entries
+ *
+ * @param engine The engine
+ * @param dupe_mapping The conflicting mapping to duplicate
+ *
+ */
+void osengine_mapping_duplicate(OSyncEngine *engine, OSyncMapping *dupe_mapping)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mapping_duplicate(%p, %p)", engine, dupe_mapping);
+ g_assert(dupe_mapping);
+ int elevation = 0;
+ OSyncMappingEntry *orig_entry = NULL;
+ OSyncMappingEntry *first_diff_entry = NULL;
+ OSyncMappingEntry *next_entry = NULL;
+ OSyncMapping *new_mapping = NULL;
+
+ //Remove all deleted items first.
+ GList *entries, *e;
+ entries = g_list_copy(dupe_mapping->entries);
+ for (e = entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ if (osync_change_get_changetype(entry->change) == CHANGE_DELETED) {
+ osync_change_delete(entry->change, NULL);
+ osengine_mappingentry_free(entry);
+ }
+ }
+ g_list_free(entries);
+
+ //Choose the first modified change as the master of the mapping to duplicate
+ GList *i = dupe_mapping->entries;
+ do {
+ orig_entry = i->data;
+ i = i->next;
+ } while (osync_change_get_changetype(orig_entry->change) != CHANGE_MODIFIED && osync_change_get_changetype(orig_entry->change) != CHANGE_ADDED);
+ dupe_mapping->master = orig_entry;
+ osync_change_set_changetype(orig_entry->change, CHANGE_MODIFIED);
+
+ /* Now we go through the list of changes in the mapping to
+ * duplicate and search for the next entry that is different
+ * to our choosen master. This entry then has to be moved to a
+ * new mapping along with all changes to are the same as this next
+ * different change
+ */
+ while ((first_diff_entry = _osync_find_next_diff(dupe_mapping, orig_entry))) {
+ //We found a different change
+ elevation = 0;
+ new_mapping = osengine_mapping_new(engine->maptable);
+ new_mapping->id = osengine_mappingtable_get_next_id(engine->maptable);
+ osync_flag_unset(new_mapping->cmb_synced);
+ osync_flag_set(new_mapping->fl_chkconflict);
+ osync_flag_unset(new_mapping->fl_multiplied);
+ osync_flag_set(new_mapping->fl_solved);
+ send_mapping_changed(engine, new_mapping);
+ osync_debug("MAP", 3, "Created new mapping for duplication %p with mappingid %lli", new_mapping, new_mapping->id);
+
+ /* Now we copy the change that differs, and set it as the master of the new
+ * mapping.*/
+ OSyncMappingEntry *newentry = osengine_mappingentry_copy(first_diff_entry);
+ new_mapping->master = newentry;
+ osengine_mapping_add_entry(new_mapping, newentry);
+ osync_change_set_changetype(newentry->change, CHANGE_ADDED);
+ osync_flag_set(newentry->fl_has_data);
+ osync_flag_set(newentry->fl_mapped);
+ osync_flag_set(newentry->fl_has_info);
+ osync_flag_set(newentry->fl_dirty);
+ osync_flag_unset(newentry->fl_synced);
+
+ /* Now we elevate the change (which might be done by adding a -dupe
+ * or a (2) to the change uid. We then check if there is already
+ * another change on this level and if there is, we elevate again */
+ do {
+ if (!osync_change_elevate(engine, newentry->change, 1))
+ break;
+ elevation += 1;
+ } while (!osync_change_check_level(engine, newentry));
+ OSyncError *error = NULL;
+ osync_change_save(newentry->change, TRUE, &error);
+
+ /* Now we search for all changes to belong to the new mapping, so
+ * we are searching for changes to do not differ from the change we found
+ * to be different from the master of the mapping to duplicate */
+ while ((next_entry = _osync_find_next_same(dupe_mapping, first_diff_entry))) {
+ newentry = _osync_change_clone(engine, new_mapping, first_diff_entry);
+ osync_change_elevate(engine, newentry->change, elevation);
+ osengine_mappingentry_update(orig_entry, next_entry->change);
+ osync_change_save(next_entry->change, TRUE, NULL);
+ }
+
+ /* Now we can reset the different change and prepare it for
+ * being overwriten during mulitply_master */
+ osync_change_set_changetype(first_diff_entry->change, CHANGE_UNKNOWN);
+
+ //We can now add the new mapping into the queue so it get processed
+ send_mapping_changed(engine, new_mapping);
+ }
+
+ //Multiply our original mapping
+ osync_flag_set(dupe_mapping->fl_solved);
+ send_mapping_changed(engine, dupe_mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_duplicate");
+}
+
+/** @brief Solves the mapping by choosing a winner
+ *
+ * The winner will overwrite all other entries of this mapping
+ *
+ * @param engine The engine
+ * @param mapping The conflicting mapping
+ * @param change The winning change
+ *
+ */
+void osengine_mapping_solve(OSyncEngine *engine, OSyncMapping *mapping, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mapping_solve(%p, %p, %p)", engine, mapping, change);
+ OSyncMappingEntry *entry = osengine_mapping_find_entry(mapping, change, NULL);
+ mapping->master = entry;
+ osync_flag_set(mapping->fl_solved);
+ send_mapping_changed(engine, mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_solve");
+}
+
+/** @brief Ignores a conflict
+ *
+ * This ignores the conflict until the next sync. When the group is synchronized again
+ * the conflict is brought up again (unless the user solved it already outside of the engine)
+ *
+ * @param engine The engine
+ * @param mapping The mapping to ignore
+ *
+ */
+osync_bool osengine_mapping_ignore_conflict(OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, engine, mapping, error);
+
+ if (!osengine_mapping_ignore_supported(engine, mapping)) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Ignore is not supported for this mapping");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ GList *e = NULL;
+ for (e = mapping->entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ osync_trace(TRACE_INTERNAL, "Adding %p to logchanges", entry);
+ OSyncError *error = NULL;
+ if (osync_change_get_changetype(entry->change) != CHANGE_UNKNOWN)
+ osync_group_save_changelog(engine->group, entry->change, &error);
+ }
+
+ //And make sure we dont synchronize it this time
+ //osengine_mapping_reset(mapping);
+ osync_flag_set(mapping->fl_multiplied);
+ osync_flag_set(mapping->cmb_synced);
+ osync_flag_set(mapping->cmb_has_info);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/** @brief Checks if a conflict can be ignore
+ *
+ * To be able to ignore a conflict, you opensync must be able to read
+ * the changes of the conflict again during the next synchronization. This must be done
+ * even if they are not reported by the plugin. Therefore, all plugins should provide
+ * a "read" method. If there is a member in the engine's group that does not have this
+ * method (either since it is not possible to implement one or since it has not been done
+ * yet), this function will return FALSE.
+ *
+ * @param engine The engine
+ * @param mapping The mapping to check
+ * @returns TRUE if conflicts can be ignored, FALSE otherwise
+ */
+osync_bool osengine_mapping_ignore_supported(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, engine, mapping);
+
+ int i, count = 0;
+ OSyncChange *change = NULL;
+ OSyncMember *member = NULL;
+ OSyncObjType *objtype = NULL;
+
+ count = osengine_mapping_num_changes(mapping);
+ for (i = 0; i < count; ++i) {
+ change = osengine_mapping_nth_change(mapping, i);
+ objtype = osync_change_get_objtype(change);
+
+ member = osync_change_get_member(change);
+
+ if (!osync_member_has_read_function(member, objtype)) {
+ osync_trace(TRACE_EXIT, "%s: Ignore NOT supported", __func__);
+ return FALSE;
+ }
+ }
+
+ osync_trace(TRACE_EXIT, "%s: Ignore supported", __func__);
+ return TRUE;
+}
+
+/** @brief Solves a mapping by choosing the entry that was last modified
+ *
+ * Solves the mapping by choosing the last modified entry. Note that this can fail
+ * if one of the entries does not have a timestamp set or of the 2 latest timestamps
+ * were exactly equal. If it could not be solved you have to solve it with another function!
+ *
+ * @param engine The engine
+ * @param mapping The conflicting mapping
+ * @param error A pointer to an error
+ * @returns TRUE if the mapping was solved, FALSE otherwise
+ *
+ */
+osync_bool osengine_mapping_solve_latest(OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, engine, mapping, error);
+
+ time_t time = 0;
+ time_t latesttime = 0;
+ osync_bool preveq = FALSE;
+
+ GList *e = NULL;
+ for (e = mapping->entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+
+ if (osync_change_get_changetype(entry->change) != CHANGE_UNKNOWN) {
+ time = osync_change_get_revision(entry->change, error);
+ if (time == -1) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ mapping->master = NULL;
+ return FALSE;
+ }
+
+ if (time > latesttime) {
+ latesttime = time;
+ mapping->master = entry;
+ preveq = FALSE;
+ } else if (time == latesttime)
+ preveq = TRUE;
+ }
+ }
+
+ if (preveq == TRUE) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Could not decide for one entry. Timestamps where equal");
+ mapping->master = NULL;
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_flag_set(mapping->fl_solved);
+ send_mapping_changed(engine, mapping);
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, mapping->master);
+ return TRUE;
+}
+
+/** @brief Checks if the mapping could be solved with solve_latest
+ *
+ * This functions checks all changes to see if they contain valid
+ * timestamp information and if they could be used to solve but does
+ * not actually solve the mapping
+ *
+ * @param engine The engine
+ * @param mapping The conflicting mapping
+ * @param error A pointer to an error
+ * @returns TRUE if the mapping could be solved, FALSE otherwise
+ *
+ */
+osync_bool osengine_mapping_check_timestamps(OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, engine, mapping, error);
+
+ time_t time = 0;
+ time_t latesttime = 0;
+ osync_bool preveq = FALSE;
+
+ GList *e = NULL;
+ for (e = mapping->entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+
+ if (osync_change_get_changetype(entry->change) != CHANGE_UNKNOWN) {
+ time = osync_change_get_revision(entry->change, error);
+ if (time == -1) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (time > latesttime) {
+ latesttime = time;
+ preveq = FALSE;
+ } else if (time == latesttime)
+ preveq = TRUE;
+ }
+ }
+
+ if (preveq == TRUE) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Could not decide for one entry. Timestamps where equal");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+/** @brief Solves a mapping by setting an updated change
+ *
+ * Solves the mapping by setting an updated change. The change should have been edited by the user.
+ * This change will then be declared winner.
+ *
+ * @param engine The engine
+ * @param mapping The conflicting mapping
+ * @param change The updated change
+ *
+ */
+void osengine_mapping_solve_updated(OSyncEngine *engine, OSyncMapping *mapping, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, engine, mapping, change);
+ OSyncMappingEntry *entry = osengine_mapping_find_entry(mapping, change, NULL);
+ mapping->master = entry;
+
+ osync_flag_set(entry->fl_dirty);
+ osync_flag_unset(entry->fl_synced);
+ send_mappingentry_changed(engine, entry);
+
+ osync_flag_set(mapping->fl_solved);
+ send_mapping_changed(engine, mapping);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_mapcmds_internals.h b/debian/opensync/opensync-0.22/osengine/osengine_mapcmds_internals.h
new file mode 100644
index 00000000..053f4e56
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_mapcmds_internals.h
@@ -0,0 +1,14 @@
+/**
+ * @ingroup OSEngineMappingPrivate
+ *
+ */
+/*@{*/
+
+void osengine_change_map(OSyncEngine *engine, OSyncMappingEntry *entry);
+void osengine_mapping_check_conflict(OSyncEngine *engine, OSyncMapping *mapping);
+void osengine_mapping_multiply_master(OSyncEngine *engine, OSyncMapping *mapping);
+
+osync_bool osync_change_check_level(OSyncEngine *engine, OSyncMappingEntry *entry);
+osync_bool osync_change_elevate(OSyncEngine *engine, OSyncChange *change, int level);
+
+/*@}*/
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_mapping.c b/debian/opensync/opensync-0.22/osengine/osengine_mapping.c
new file mode 100644
index 00000000..5ff78fb3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_mapping.c
@@ -0,0 +1,637 @@
+/*
+ * libopensync - A synchronization framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+#include "engine_internals.h"
+
+/**
+ * @defgroup OSEngineMappingPrivate OpenSync Mapping Internals
+ * @ingroup OSEnginePrivate
+ * @brief The internals the mappings
+ *
+ */
+/*@{*/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+OSyncMappingTable *osengine_mappingtable_new(OSyncEngine *engine)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mappingtable_new(%p)", engine);
+ OSyncMappingTable *table = g_malloc0(sizeof(OSyncMappingTable));
+ table->engine = engine;
+ table->group = engine->group;
+
+ GList *c;
+ for (c = engine->clients; c; c = c->next) {
+ OSyncClient *client = c->data;
+ osengine_mappingview_new(table, client);
+ }
+
+ osync_trace(TRACE_EXIT, "osengine_mappingtable_new: %p", table);
+ return table;
+}
+
+void osengine_mappingtable_reset(OSyncMappingTable *table)
+{
+ GList *v;
+ for (v = table->views; v; v = v->next) {
+ OSyncMappingView *view = v->data;
+ osengine_mappingview_reset(view);
+ }
+}
+
+void osengine_mappingtable_free(OSyncMappingTable *table)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mappingtable_free(%p)", table);
+ GList *c = NULL;
+ GList *m = NULL;
+
+ GList *mappings = g_list_copy(table->mappings);
+ GList *unmapped = g_list_copy(table->unmapped);
+ GList *views = g_list_copy(table->views);
+ osync_trace(TRACE_INTERNAL, "Free mappings");
+ for (m = mappings; m; m = m->next) {
+ OSyncMapping *mapping = m->data;
+ osengine_mapping_free(mapping);
+ }
+ osync_trace(TRACE_INTERNAL, "Free unmapped");
+ for (c = unmapped; c; c = c->next) {
+ OSyncMappingEntry *entry = c->data;
+ osengine_mappingentry_free(entry);
+ }
+ for (c = views; c; c = c->next) {
+ OSyncMappingView *view = c->data;
+ osengine_mappingview_free(view);
+ }
+ g_list_free(mappings);
+ g_list_free(unmapped);
+ g_list_free(views);
+ g_free(table);
+ osync_trace(TRACE_EXIT, "osengine_mappingtable_free");
+}
+
+OSyncMappingEntry *osengine_mappingtable_find_entry(OSyncMappingTable *table, const char *uid, const char *objtype, long long int memberid)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %s, %s)", __func__, table, uid, objtype ? objtype : "None");
+ GList *v;
+ int count_of_entries = 0; /*must not be more the one for objtype=NULL*/
+ OSyncMappingEntry *ret_entry = NULL;
+ for (v = table->views; v; v = v->next) {
+ OSyncMappingView *view = v->data;
+ GList *c;
+
+ if (memberid && memberid != osync_member_get_id(view->client->member))
+ continue;
+
+ for (c = view->changes; c; c = c->next) {
+ OSyncMappingEntry *entry = c->data;
+ g_assert(entry->change);
+ if(objtype){
+ if ( (!strcmp(
+ osync_change_get_uid(entry->change), uid)) &&
+ (!strcmp(
+ osync_objtype_get_name(
+ osync_change_get_objtype(entry->change))
+ , objtype))
+ ) {
+ ret_entry = entry;
+ count_of_entries++;
+ }
+ } else { /**objtype is NULL ... try to find a entry based on uid*/
+ if (!strcmp(osync_change_get_uid(entry->change), uid)) {
+ ret_entry = entry;
+ count_of_entries++;
+ }
+ }
+ }
+ }
+ if(count_of_entries == 1 && ret_entry){
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, ret_entry);
+ return ret_entry;
+ }
+ if(count_of_entries >1){
+ if (!objtype)
+ {
+ osync_trace(TRACE_EXIT_ERROR, "%s: possible dataloss", __func__ );
+ } else {
+ osync_trace(TRACE_EXIT_ERROR, "%s: changes.db corrupted", __func__ );
+ }
+ return NULL;
+ }
+
+ osync_trace(TRACE_EXIT, "%s: Not Found", __func__);
+ return NULL;
+}
+
+OSyncMappingEntry *osengine_mappingtable_store_change(OSyncMappingTable *table, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mappingtable_store_change(%p, %p)", table, change);
+ OSyncMappingView *view = osengine_mappingtable_find_view(table, osync_change_get_member(change));
+ g_assert(view);
+ OSyncMappingEntry *entry = osengine_mappingview_store_change(view, change);
+ osync_trace(TRACE_EXIT, "osengine_mappingtable_store_change: %p", entry);
+ return entry;
+}
+
+OSyncMapping *osengine_mappingtable_find_mapping(OSyncMappingTable *table, OSyncChange *change)
+{
+ GList *m;
+ for (m = table->mappings; m; m = m->next) {
+ OSyncMapping *mapping = m->data;
+ if (osengine_mapping_find_entry(mapping, change, NULL))
+ return mapping;
+ }
+ return NULL;
+}
+
+OSyncMapping *osengine_mappingtable_mapping_from_id(OSyncMappingTable *table, long long int id)
+{
+ GList *m;
+ for (m = table->mappings; m; m = m->next) {
+ OSyncMapping *mapping = m->data;
+ if (mapping->id == id)
+ return mapping;
+ }
+ return NULL;
+}
+
+OSyncMappingView *osengine_mappingtable_find_view(OSyncMappingTable *table, OSyncMember *member)
+{
+ GList *v;
+ for (v = table->views; v; v = v->next) {
+ OSyncMappingView *view = v->data;
+ if (view->memberid == osync_member_get_id(member))
+ return view;
+ }
+ return NULL;
+}
+
+void osengine_mappingtable_add_mapping(OSyncMappingTable *table, OSyncMapping *mapping)
+{
+ table->mappings = g_list_append(table->mappings, mapping);
+ mapping->table = table;
+}
+
+osync_bool osengine_mappingtable_load(OSyncMappingTable *table, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mappingtable_load(%p, %p)", table, error);
+ OSyncChange **changes = NULL;
+ if (!osync_changes_load(table->group, &changes, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "osengine_mappingtable_load: %s", osync_error_print(error));
+ return FALSE;
+ }
+
+ int i = 0;
+ OSyncChange *change = NULL;
+ OSyncMapping *mapping = NULL;
+ while ((change = changes[i])) {
+ OSyncMappingEntry *entry = osengine_mappingentry_new(NULL);
+ entry->change = change;
+ //entry->orig_change = change;
+ entry->client = (OSyncClient *)osync_member_get_data(osync_change_get_member(change));
+
+ if (!osync_change_get_mappingid(change)) {
+ table->unmapped = g_list_append(table->unmapped, entry);
+ } else {
+ if (!mapping || mapping->id != osync_change_get_mappingid(change)) {
+ mapping = osengine_mapping_new(table);
+ mapping->id = osync_change_get_mappingid(change);
+ }
+ osengine_mapping_add_entry(mapping, entry);
+ }
+
+ osync_flag_set(entry->fl_has_data);
+
+ OSyncMappingView *view = osengine_mappingtable_find_view(table, osync_change_get_member(change));
+ if (view)
+ osengine_mappingview_add_entry(view, entry);
+
+ i++;
+ }
+
+ osync_trace(TRACE_EXIT, "osengine_mappingtable_load: TRUE");
+ return TRUE;
+}
+
+long long int osengine_mappingtable_get_next_id(OSyncMappingTable *table)
+{
+ long long int new_id = 1;
+ GList *m;
+ for (m = table->mappings; m; m = m->next) {
+ OSyncMapping *mapping = m->data;
+ if (new_id <= mapping->id)
+ new_id = mapping->id + 1;
+ }
+ return new_id;
+}
+
+void osengine_mappingtable_inject_changes(OSyncMappingTable *table)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, table);
+ //OSyncEngine *engine = table->engine;
+
+ char **uids = NULL;
+ char **objtypes = NULL;
+ long long int *memberids = NULL;
+ int *types = NULL;
+ char *uid = NULL;
+ char *objtype = NULL;
+ int type = 0;
+ int i = 0;
+ OSyncError *error = NULL;
+ osync_group_open_changelog(table->engine->group, &uids, &objtypes, &memberids, &types, &error);
+
+ for (i = 0; (uid = uids[i]) ; i++) {
+ type = types[i];
+ objtype = objtypes[i];
+ long long int memberid = memberids[i];
+ OSyncMappingEntry *entry = osengine_mappingtable_find_entry(table, uid, objtype, memberid);
+
+ if (!entry) {
+ osync_trace(TRACE_INTERNAL, "Mappingtable and changelog inconsistent: no entry with uid %s", uid);
+ /*FIXME: We should be able to return error here. What if entry == NULL? */
+ g_assert_not_reached();
+ }
+
+ osync_change_set_changetype(entry->change, type);
+ osync_trace(TRACE_INTERNAL, "Injecting %p with changetype %i", entry, osync_change_get_changetype(entry->change));
+ osync_flag_attach(entry->fl_read, table->engine->cmb_read_all);
+
+ /* Set fl_mapped accordingly, if the entry was already mapped previously */
+ if (entry->mapping)
+ osync_flag_set(entry->fl_mapped);
+
+ //send_read_change(engine, entry);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+OSyncMappingTable *_osengine_mappingtable_load_group(OSyncGroup *group)
+{
+ OSyncMappingTable *table = g_malloc0(sizeof(OSyncMappingTable));
+ table->group = group;
+
+ int i;
+ for (i = 0; i < osync_group_num_members(group); i++) {
+ OSyncMember *member = osync_group_nth_member(group, i);
+ OSyncMappingView *view = g_malloc0(sizeof(OSyncMappingView));
+ table->views = g_list_append(table->views, view);
+ view->table = table;
+ view->memberid = osync_member_get_id(member);
+ }
+
+ if (!osengine_mappingtable_load(table, NULL))
+ return NULL;
+ return table;
+}
+
+void osengine_mappingtable_close(OSyncMappingTable *table)
+{
+ osync_changes_close(table->group);
+ //FIXME Free the changes on the views
+}
+
+OSyncMapping *osengine_mapping_new(OSyncMappingTable *table)
+{
+ g_assert(table);
+ OSyncMapping *mapping = g_malloc0(sizeof(OSyncMapping));
+ osengine_mappingtable_add_mapping(table, mapping);
+ if (table->engine) {
+ mapping->fl_solved = osync_flag_new(NULL);
+
+ mapping->fl_chkconflict = osync_flag_new(NULL);
+ osync_flag_set(mapping->fl_chkconflict);
+
+ mapping->fl_multiplied = osync_flag_new(NULL);
+ osync_flag_set(mapping->fl_multiplied);
+
+ mapping->cmb_has_data = osync_comb_flag_new(FALSE, FALSE);
+ osync_flag_set_pos_trigger(mapping->cmb_has_data, (OSyncFlagTriggerFunc)send_mapping_changed, table->engine, mapping);
+
+ mapping->cmb_has_info = osync_comb_flag_new(FALSE, FALSE);
+
+ mapping->cmb_synced = osync_comb_flag_new(FALSE, TRUE);
+
+ mapping->cmb_deleted = osync_comb_flag_new(FALSE, FALSE);
+
+ osync_flag_attach(mapping->cmb_synced, table->engine->cmb_synced);
+ osync_flag_attach(mapping->fl_multiplied, table->engine->cmb_multiplied);
+ osync_flag_attach(mapping->fl_chkconflict, table->engine->cmb_chkconflict);
+ }
+ osync_trace(TRACE_INTERNAL, "osengine_mapping_new(%p): %p", table, mapping);
+ return mapping;
+}
+
+void osengine_mapping_free(OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mapping_free(%p)", mapping);
+
+ while (g_list_nth_data(mapping->entries, 0))
+ osengine_mappingentry_free(g_list_nth_data(mapping->entries, 0));
+
+ osync_flag_detach(mapping->cmb_synced);
+ osync_flag_detach(mapping->fl_chkconflict);
+ osync_flag_detach(mapping->fl_multiplied);
+
+ mapping->table->mappings = g_list_remove(mapping->table->mappings, mapping);
+ osync_flag_free(mapping->fl_solved);
+ osync_flag_free(mapping->cmb_has_data);
+ osync_flag_free(mapping->cmb_has_info);
+ osync_flag_free(mapping->cmb_synced);
+ osync_flag_free(mapping->fl_chkconflict);
+ osync_flag_free(mapping->cmb_deleted);
+ osync_flag_free(mapping->fl_multiplied);
+
+ g_free(mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_free");
+}
+
+void osengine_mapping_add_entry(OSyncMapping *mapping, OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_INTERNAL, "osengine_mapping_add_entry(%p, %p)", mapping, entry);
+ g_assert(!osengine_mapping_find_entry(mapping, NULL, entry->view));
+ mapping->entries = g_list_append(mapping->entries, entry);
+ entry->mapping = mapping;
+
+ if (mapping->table->engine) {
+ osync_flag_attach(entry->fl_has_data, mapping->cmb_has_data);
+ osync_flag_attach(entry->fl_has_info, mapping->cmb_has_info);
+ osync_flag_attach(entry->fl_synced, mapping->cmb_synced);
+ osync_flag_attach(entry->fl_deleted, mapping->cmb_deleted);
+ osync_flag_set_pos_trigger(entry->fl_dirty, (OSyncFlagTriggerFunc)send_mappingentry_changed, mapping->table->engine, entry);
+ }
+ osync_change_set_mappingid(entry->change, mapping->id);
+
+ mapping->table->unmapped = g_list_remove(mapping->table->unmapped, entry);
+ mapping->table->entries = g_list_append(mapping->table->entries, entry);
+}
+
+void osengine_mapping_remove_entry(OSyncMapping *mapping, OSyncMappingEntry *entry)
+{
+ mapping->entries = g_list_remove(mapping->entries, entry);
+ mapping->table->entries = g_list_remove(mapping->table->entries, entry);
+ entry->mapping = NULL;
+
+ osync_flag_detach(entry->fl_has_data);
+ osync_flag_detach(entry->fl_has_info);
+ osync_flag_detach(entry->fl_synced);
+ osync_flag_detach(entry->fl_deleted);
+}
+
+OSyncMappingEntry *osengine_mapping_find_entry(OSyncMapping *mapping, OSyncChange *change, OSyncMappingView *view)
+{
+ GList *e;
+ for (e = mapping->entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ if (change && entry->change == change)
+ return entry;
+ if (view && entry->view == view)
+ return entry;
+ }
+ return NULL;
+}
+
+OSyncMappingEntry *osengine_mapping_nth_entry(OSyncMapping *mapping, int nth)
+{
+ return (OSyncMappingEntry *)g_list_nth_data(mapping->entries, nth);
+}
+
+int osengine_mapping_num_changes(OSyncMapping *mapping)
+{
+ return g_list_length(mapping->entries);
+}
+
+OSyncChange *osengine_mapping_nth_change(OSyncMapping *mapping, int nth)
+{
+ OSyncMappingEntry *entry = g_list_nth_data(mapping->entries, nth);
+ if (!entry)
+ return NULL;
+ return entry->change;
+}
+
+long long osengine_mapping_get_id(OSyncMapping *mapping)
+{
+ return mapping->id;
+}
+
+void osengine_mapping_reset(OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mapping_reset(%p)", mapping);
+ GList *e;
+ for (e = mapping->entries; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ osengine_mappingentry_reset(entry);
+ }
+
+ osync_flag_set(mapping->fl_multiplied);
+ osync_flag_set(mapping->fl_chkconflict);
+ mapping->master = NULL;
+ osync_trace(TRACE_EXIT, "osengine_mapping_reset");
+}
+
+void osengine_mapping_delete(OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mapping_delete(%p)", mapping);
+ GList *entries = g_list_copy(mapping->entries);
+ GList *c = NULL;
+ for (c = entries; c; c = c->next) {
+ OSyncMappingEntry *entry = c->data;
+ osync_change_delete(entry->change, NULL);
+ }
+ g_list_free(entries);
+ osengine_mapping_free(mapping);
+ osync_trace(TRACE_EXIT, "osengine_mapping_delete");
+}
+
+OSyncMappingView *osengine_mappingview_new(OSyncMappingTable *table, OSyncClient *client)
+{
+ g_assert(table);
+ OSyncMappingView *view = g_malloc0(sizeof(OSyncMappingView));
+ table->views = g_list_append(table->views, view);
+ view->client = client;
+ view->table = table;
+ view->memberid = osync_member_get_id(client->member);
+ osync_trace(TRACE_INTERNAL, "osengine_mappingview_new(%p)", view);
+ return view;
+}
+
+void osengine_mappingview_free(OSyncMappingView *view)
+{
+ osync_trace(TRACE_INTERNAL, "osengine_mappingview_free(%p)", view);
+ g_list_free(view->changes);
+ view->changes = NULL;
+ g_free(view);
+}
+
+void osengine_mappingview_add_entry(OSyncMappingView *view, OSyncMappingEntry *entry)
+{
+ view->changes = g_list_append(view->changes, entry);
+ entry->view = view;
+}
+
+OSyncMappingEntry *osengine_mappingview_store_change(OSyncMappingView *view, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "osengine_mappingview_store_change(%p, %p)", view, change);
+ g_assert(change);
+ GList *c;
+ for (c = view->changes; c; c = c->next) {
+ OSyncMappingEntry *entry = c->data;
+ g_assert(entry->change);
+
+ /**
+ * not unique UID exception
+ * UID has to match and objtype has to match
+ **/
+ if (!strcmp(osync_change_get_uid(entry->change), osync_change_get_uid(change))) {
+ OSyncObjType * entry_objtype = osync_change_get_objtype(entry->change);
+ OSyncObjType * change_objtype = osync_change_get_objtype(change);
+
+ const char * entry_objtype_name = osync_objtype_get_name(entry_objtype);
+ const char * change_objtype_name = osync_objtype_get_name(change_objtype);
+
+ if (
+ (change_objtype_name == NULL) ||
+ (entry_objtype_name == NULL) ||
+ (!strcmp(change_objtype_name, entry_objtype_name)) ||
+ (!strcmp(change_objtype_name, "data")) ||
+ (!strcmp(entry_objtype_name, "data"))
+ ) {
+ osengine_mappingentry_update(entry, change);
+ osync_trace(TRACE_EXIT, "osengine_mappingview_store_change: %p", entry);
+ return entry;
+ }
+ }
+
+ }
+
+ OSyncMappingEntry *newentry = osengine_mappingentry_new(NULL);
+ newentry->change = change;
+ newentry->client = view->client;
+ view->table->unmapped = g_list_append(view->table->unmapped, newentry);
+ osengine_mappingview_add_entry(view, newentry);
+ osync_trace(TRACE_EXIT, "osengine_mappingview_store_change: %p (New MappingEntry)", newentry);
+ return newentry;
+}
+
+osync_bool osengine_mappingview_uid_is_unique(OSyncMappingView *view, OSyncMappingEntry *entry, osync_bool spare_deleted)
+{
+ GList *e = NULL;
+
+ for (e = view->changes; e; e = e->next) {
+ OSyncMappingEntry *exentry = e->data;
+ if ((exentry != entry) && (!spare_deleted || (osync_change_get_changetype(exentry->change) != CHANGE_DELETED)) && !strcmp(osync_change_get_uid(exentry->change), osync_change_get_uid(entry->change)))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+void osengine_mappingview_reset(OSyncMappingView *view)
+{
+ //g_list_free(view->changes);
+ //view->changes = NULL;
+}
+
+OSyncMappingEntry *osengine_mappingentry_new(OSyncMapping *mapping)
+{
+ OSyncMappingEntry *entry = g_malloc0(sizeof(OSyncMappingEntry));
+ osync_trace(TRACE_INTERNAL, "osengine_mappingentry_new(%p): %p", mapping, entry);
+ entry->fl_has_data = osync_flag_new(NULL);
+ entry->fl_dirty = osync_flag_new(NULL);
+ entry->fl_mapped = osync_flag_new(NULL);
+ entry->fl_has_info = osync_flag_new(NULL);
+ entry->fl_synced = osync_flag_new(NULL);
+ entry->fl_deleted = osync_flag_new(NULL);
+ entry->fl_read = osync_flag_new(NULL);
+ entry->fl_committed = osync_flag_new(NULL);
+ osync_flag_set(entry->fl_synced);
+
+ if (mapping)
+ osengine_mapping_add_entry(mapping, entry);
+
+ return entry;
+}
+
+void osengine_mappingentry_free(OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_INTERNAL, "osengine_mappingentry_free(%p)", entry);
+
+ if (entry->mapping)
+ osengine_mapping_remove_entry(entry->mapping, entry);
+
+ osync_flag_free(entry->fl_has_data);
+ osync_flag_free(entry->fl_dirty);
+ osync_flag_free(entry->fl_mapped);
+ osync_flag_free(entry->fl_has_info);
+ osync_flag_free(entry->fl_synced);
+ osync_flag_free(entry->fl_deleted);
+ osync_flag_free(entry->fl_read);
+ osync_flag_free(entry->fl_committed);
+
+ entry->view->changes = g_list_remove(entry->view->changes, entry);
+ entry->view = NULL;
+
+ g_free(entry);
+}
+
+void osengine_mappingentry_update(OSyncMappingEntry *entry, OSyncChange *change)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, entry, change);
+
+ OSyncObjFormat *format = osync_change_get_objformat(entry->change);
+ OSyncObjType *type = osync_change_get_objtype(entry->change);
+
+ osync_change_update(change, entry->change);
+
+ if (osync_change_get_changetype(change) == CHANGE_DELETED && format && type) {
+ osync_change_set_objformat(entry->change, format);
+ osync_change_set_objtype(entry->change, type);
+
+ osync_trace(TRACE_INTERNAL, "Change was deleted. Old objtype %s and format %s", osync_change_get_objtype(entry->change) ? osync_objtype_get_name(osync_change_get_objtype(entry->change)) : "None", osync_change_get_objformat(entry->change) ? osync_objformat_get_name(osync_change_get_objformat(entry->change)) : "None");
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+OSyncMappingEntry *osengine_mappingentry_copy(OSyncMappingEntry *entry)
+{
+ OSyncMappingEntry *newentry = osengine_mappingentry_new(NULL);
+
+ OSyncError *error = NULL;
+ newentry->change = osync_change_copy(entry->change, &error);
+ newentry->client = entry->client;
+ osengine_mappingview_add_entry(entry->view, newentry);
+ return newentry;
+}
+
+void osengine_mappingentry_reset(OSyncMappingEntry *entry)
+{
+ osync_trace(TRACE_INTERNAL, "osengine_mappingentry_reset(%p)", entry);
+
+ osync_flag_set(entry->fl_has_data);
+ osync_flag_unset(entry->fl_dirty);
+ osync_flag_unset(entry->fl_has_info);
+ osync_flag_unset(entry->fl_deleted);
+ osync_flag_set(entry->fl_synced);
+
+ osync_change_reset(entry->change);
+}
+#endif
+
+/** @} */
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_mapping.h b/debian/opensync/opensync-0.22/osengine/osengine_mapping.h
new file mode 100644
index 00000000..c27c82c7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_mapping.h
@@ -0,0 +1,12 @@
+
+void osengine_mapping_duplicate(OSyncEngine *engine, OSyncMapping *dupe_mapping);
+void osengine_mapping_solve(OSyncEngine *engine, OSyncMapping *mapping, OSyncChange *change);
+int osengine_mapping_num_changes(OSyncMapping *mapping);
+OSyncChange *osengine_mapping_nth_change(OSyncMapping *mapping, int nth);
+long long osengine_mapping_get_id(OSyncMapping *mapping);
+void osengine_mapping_solve_updated(OSyncEngine *engine, OSyncMapping *mapping, OSyncChange *change);
+osync_bool osengine_mapping_solve_latest(OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error);
+
+osync_bool osengine_mapping_ignore_conflict(OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error);
+osync_bool osengine_mapping_ignore_supported(OSyncEngine *engine, OSyncMapping *mapping);
+osync_bool osengine_mapping_check_timestamps(OSyncEngine *engine, OSyncMapping *mapping, OSyncError **error);
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_mapping_internals.h b/debian/opensync/opensync-0.22/osengine/osengine_mapping_internals.h
new file mode 100644
index 00000000..0eecaa42
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_mapping_internals.h
@@ -0,0 +1,87 @@
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct OSyncMappingTable {
+ GList *mappings;
+ OSyncEngine *engine;
+ GList *unmapped;
+ OSyncGroup *group;
+ GList *views;
+ GList *entries;
+};
+
+struct OSyncMappingView {
+ OSyncClient *client;
+ GList *changes;
+ OSyncMappingTable *table;
+ long long int memberid;
+};
+
+struct OSyncMapping {
+ GList *entries;
+ OSyncMappingEntry *master;
+ void *engine_data;
+ long long int id;
+ OSyncMappingTable *table;
+ OSyncFlag *fl_solved;
+ OSyncFlag *fl_chkconflict;
+ OSyncFlag *fl_multiplied;
+ //The combined flags
+ OSyncFlag *cmb_synced;
+ OSyncFlag *cmb_has_data;
+ OSyncFlag *cmb_has_info;
+ OSyncFlag *cmb_deleted;
+ OSyncEngine *engine;
+};
+
+struct OSyncMappingEntry {
+ OSyncMappingView *view;
+ OSyncClient *client;
+ OSyncMapping *mapping;
+ OSyncChange *change;
+ OSyncFlag *fl_has_data;
+ OSyncFlag *fl_dirty;
+ OSyncFlag *fl_mapped;
+ OSyncFlag *fl_has_info;
+ OSyncFlag *fl_synced;
+ OSyncFlag *fl_deleted;
+ OSyncFlag *fl_read;
+ OSyncFlag *fl_committed;
+};
+#endif
+
+OSyncMappingTable *osengine_mappingtable_new(OSyncEngine *engine);
+void osengine_mappingtable_free(OSyncMappingTable *table);
+OSyncMappingEntry *osengine_mappingtable_store_change(OSyncMappingTable *table, OSyncChange *change);
+OSyncMapping *osengine_mappingtable_find_mapping(OSyncMappingTable *table, OSyncChange *change);
+OSyncMappingView *osengine_mappingtable_find_view(OSyncMappingTable *table, OSyncMember *member);
+void osengine_mappingtable_add_mapping(OSyncMappingTable *table, OSyncMapping *mapping);
+osync_bool osengine_mappingtable_load(OSyncMappingTable *table, OSyncError **error);
+OSyncMappingTable *_osengine_mappingtable_load_group(OSyncGroup *group);
+void osengine_mappingtable_close(OSyncMappingTable *table);
+long long int osengine_mappingtable_get_next_id(OSyncMappingTable *table);
+void osengine_mappingtable_reset(OSyncMappingTable *table);
+void osengine_mappingtable_inject_changes(OSyncMappingTable *table);
+
+OSyncMapping *osengine_mapping_new(OSyncMappingTable *table);
+void osengine_mapping_free(OSyncMapping *mapping);
+void osengine_mapping_add_entry(OSyncMapping *mapping, OSyncMappingEntry *entry);
+void osengine_mapping_remove_entry(OSyncMapping *mapping, OSyncMappingEntry *entry);
+OSyncMappingEntry *osengine_mapping_find_entry(OSyncMapping *mapping, OSyncChange *change, OSyncMappingView *view);
+OSyncMappingEntry *osengine_mapping_nth_entry(OSyncMapping *mapping, int nth);
+void osengine_mapping_reset(OSyncMapping *mapping);
+void osengine_mapping_delete(OSyncMapping *mapping);
+
+OSyncMappingView *osengine_mappingview_new(OSyncMappingTable *table, OSyncClient *client);
+OSyncMappingEntry *osengine_mappingview_store_change(OSyncMappingView *view, OSyncChange *change);
+osync_bool osengine_mappingview_uid_is_unique(OSyncMappingView *view, OSyncMappingEntry *entry, osync_bool spare_deleted);
+void osengine_mappingview_add_entry(OSyncMappingView *view, OSyncMappingEntry *entry);
+void osengine_mappingview_reset(OSyncMappingView *view);
+void osengine_mappingview_free(OSyncMappingView *view);
+
+void osengine_mappingentry_update(OSyncMappingEntry *entry, OSyncChange *change);
+OSyncMappingEntry *osengine_mappingentry_new(OSyncMapping *mapping);
+void osengine_mappingentry_reset(OSyncMappingEntry *entry);
+void osengine_mappingentry_free(OSyncMappingEntry *entry);
+OSyncMapping *osengine_mappingtable_mapping_from_id(OSyncMappingTable *table, long long id);
+OSyncMappingEntry *osengine_mappingentry_copy(OSyncMappingEntry *entry);
+
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_status.c b/debian/opensync/opensync-0.22/osengine/osengine_status.c
new file mode 100644
index 00000000..bb9ee2bd
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_status.c
@@ -0,0 +1,110 @@
+/*
+ * libosengine - A synchronization engine for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "engine.h"
+#include "engine_internals.h"
+
+void osync_status_conflict(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, engine, mapping);
+ if (engine->conflict_callback)
+ engine->conflict_callback(engine, mapping, engine->conflict_userdata);
+ else
+ osync_trace(TRACE_INTERNAL, "Conflict Ignored");
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_status_update_member(OSyncEngine *engine, OSyncClient *client, memberupdatetype type, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p)", __func__, engine, client, type, error);
+ if (engine->mebstat_callback) {
+ OSyncMemberUpdate update;
+ memset(&update, 0, sizeof(OSyncMemberUpdate));
+ update.type = type;
+ update.member = client->member;
+ if (error)
+ update.error = *error;
+ else
+ update.error = NULL;
+ engine->mebstat_callback(&update, engine->mebstat_userdata);
+ } else
+ osync_trace(TRACE_INTERNAL, "Status Update Ignored");
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_status_update_change(OSyncEngine *engine, OSyncChange *change, changeupdatetype type, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p)", __func__, engine, change, type, error);
+ if (engine->changestat_callback) {
+ OSyncChangeUpdate update;
+ update.type = type;
+ update.member_id = osync_member_get_id(osync_change_get_member(change));
+ update.change = change;
+ update.mapping_id = osync_change_get_mappingid(change);
+ if (error)
+ update.error = *error;
+ else
+ update.error = NULL;
+ engine->changestat_callback(engine, &update, engine->changestat_userdata);
+ } else
+ osync_trace(TRACE_INTERNAL, "Status Update Ignored");
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_status_update_mapping(OSyncEngine *engine, OSyncMapping *mapping, mappingupdatetype type, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i, %p)", __func__, engine, mapping, type, error);
+ if (engine->mapstat_callback) {
+ OSyncMappingUpdate update;
+ update.type = type;
+ update.mapping = mapping;
+ if (mapping->master)
+ update.winner = osync_member_get_id(mapping->master->client->member);
+ if (error)
+ update.error = *error;
+ else
+ update.error = NULL;
+ engine->mapstat_callback(&update, engine->mapstat_userdata);
+ } else
+ osync_trace(TRACE_INTERNAL, "Status Update Ignored");
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_status_update_engine(OSyncEngine *engine, engineupdatetype type, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %p)", __func__, engine, type, error);
+ if (engine->engstat_callback) {
+ OSyncEngineUpdate update;
+ memset(&update, 0, sizeof(OSyncEngineUpdate));
+ update.type = type;
+ if (error)
+ update.error = *error;
+ else
+ update.error = NULL;
+ engine->engstat_callback(engine, &update, engine->engstat_userdata);
+ } else
+ osync_trace(TRACE_INTERNAL, "Status Update Ignored");
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
diff --git a/debian/opensync/opensync-0.22/osengine/osengine_status.h b/debian/opensync/opensync-0.22/osengine/osengine_status.h
new file mode 100644
index 00000000..f78e8d39
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osengine/osengine_status.h
@@ -0,0 +1,134 @@
+
+/** @brief The types of status updates for members
+ * @ingroup OSEnginePublic
+ **/
+typedef enum {
+ /** The member just connected */
+ MEMBER_CONNECTED,
+ /** The member just sent its changes */
+ MEMBER_SENT_CHANGES,
+ /** The member just wrote its changes */
+ MEMBER_COMMITTED_ALL,
+ /** The member just disconnected */
+ MEMBER_DISCONNECTED,
+ /** The member had problems connecting */
+ MEMBER_CONNECT_ERROR,
+ /** The member had problems getting the changes */
+ MEMBER_GET_CHANGES_ERROR,
+ /** The member had problems getting the changes */
+ MEMBER_COMMITTED_ALL_ERROR,
+ /** The member had problems during sync_done */
+ MEMBER_SYNC_DONE_ERROR,
+ /** There was an error while disconnecting */
+ MEMBER_DISCONNECT_ERROR
+} memberupdatetype;
+
+/** @brief The types of status updates for changes
+ * @ingroup OSEnginePublic
+ **/
+typedef enum {
+ /** The change was just received */
+ CHANGE_RECEIVED = 1,
+ /** The change was just received (Only info) */
+ CHANGE_RECEIVED_INFO = 2,
+ /** The change was just written */
+ CHANGE_SENT = 3,
+ /** There was an problem writing */
+ CHANGE_WRITE_ERROR = 4,
+ /** There was an problem receiving the change */
+ CHANGE_RECV_ERROR = 5
+} changeupdatetype;
+
+/** @brief The types of status updates for mappings
+ * @ingroup OSEnginePublic
+ **/
+typedef enum {
+ /** The mapping has just been solved */
+ MAPPING_SOLVED = 1,
+ /** The mapping has just been completely synced */
+ MAPPING_SYNCED = 2,
+ /** There was an error writing on of the changes */
+ MAPPING_WRITE_ERROR = 3
+} mappingupdatetype;
+
+/** @brief The types of status updates for members
+ * @ingroup OSEnginePublic
+ **/
+typedef enum {
+ /** All clients have connected or had an error during connection */
+ ENG_ENDPHASE_CON = 1,
+ /** All clients have sent their changes to the syncengine */
+ ENG_ENDPHASE_READ = 2,
+ /** All clients have written their changes */
+ ENG_ENDPHASE_WRITE = 3,
+ /** All clients have disconnected */
+ ENG_ENDPHASE_DISCON = 4,
+ /** There was an error */
+ ENG_ERROR = 5,
+ /** The sync is done and was successfull (My favorite message) */
+ ENG_SYNC_SUCCESSFULL = 6,
+ /** The previous sync was unclean and the engine will perform a slow-sync now */
+ ENG_PREV_UNCLEAN = 7,
+ /** All conflicts have been reported. */
+ ENG_END_CONFLICTS = 8
+} engineupdatetype;
+
+
+/*! @brief Struct for the member status callback
+ * @ingroup OSEnginePublic
+ */
+typedef struct OSyncMemberUpdate {
+ /** The type of the status update */
+ memberupdatetype type;
+ /** The member for which the status update is */
+ OSyncMember *member;
+ /** If the status was a error, this error will be set */
+ OSyncError *error;
+} OSyncMemberUpdate;
+
+/*! @brief Struct for the change status callback
+ * @ingroup OSEnginePublic
+ */
+typedef struct OSyncChangeUpdate {
+ /** The type of the status update */
+ changeupdatetype type;
+ /** The change for which the status update is */
+ OSyncChange *change;
+ /** The id of the member which sent this change */
+ int member_id;
+ /** The id of the mapping to which this change belongs if any */
+ int mapping_id;
+ /** If the status was a error, this error will be set */
+ OSyncError *error;
+} OSyncChangeUpdate;
+
+/*! @brief Struct for the mapping status callback
+ * @ingroup OSEnginePublic
+ */
+typedef struct OSyncMappingUpdate {
+ /** The type of the status update */
+ mappingupdatetype type;
+ /** If the mapping was already solved, this will have the id if the winning entry */
+ long long int winner;
+ /** The mapping for which the status update is */
+ OSyncMapping *mapping;
+ /** If the status was a error, this error will be set */
+ OSyncError *error;
+} OSyncMappingUpdate;
+
+/*! @brief Struct for the engine status callback
+ * @ingroup OSEnginePublic
+ */
+typedef struct OSyncEngineUpdate {
+ /** The type of the status update */
+ engineupdatetype type;
+ /** If the status was a error, this error will be set */
+ OSyncError *error;
+} OSyncEngineUpdate;
+
+
+void osync_status_conflict(OSyncEngine *engine, OSyncMapping *mapping);
+void osync_status_update_member(OSyncEngine *engine, OSyncClient *client, memberupdatetype type, OSyncError **error);
+void osync_status_update_change(OSyncEngine *engine, OSyncChange *change, changeupdatetype type, OSyncError **error);
+void osync_status_update_mapping(OSyncEngine *engine, OSyncMapping *mapping, mappingupdatetype type, OSyncError **error);
+void osync_status_update_engine(OSyncEngine *engine, engineupdatetype type, OSyncError **error);
diff --git a/debian/opensync/opensync-0.22/osplugin/Makefile.am b/debian/opensync/opensync-0.22/osplugin/Makefile.am
new file mode 100644
index 00000000..4c578398
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osplugin/Makefile.am
@@ -0,0 +1,18 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine -I$(top_srcdir)/opensync
+
+libexec_PROGRAMS = osplugin
+
+ospluginincludedir = @OPENSYNC_HEADERDIR@
+
+osplugin_SOURCES = osplugin.c
+osplugin_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osplugin_LDADD = $(top_builddir)/opensync/libopensync.la
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
diff --git a/debian/opensync/opensync-0.22/osplugin/Makefile.in b/debian/opensync/opensync-0.22/osplugin/Makefile.in
new file mode 100644
index 00000000..eeae269e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osplugin/Makefile.in
@@ -0,0 +1,511 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+libexec_PROGRAMS = osplugin$(EXEEXT)
+subdir = osplugin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(libexecdir)"
+libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(libexec_PROGRAMS)
+am_osplugin_OBJECTS = osplugin.$(OBJEXT)
+osplugin_OBJECTS = $(am_osplugin_OBJECTS)
+osplugin_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(osplugin_SOURCES)
+DIST_SOURCES = $(osplugin_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = -Wall @XML_CFLAGS@ -Werror @GCOV_CFLAGS@ -DOPENSYNC_PLUGINDIR=\"@OPENSYNC_PLUGINDIR@\" -DOPENSYNC_CONFIGDIR=\"@OPENSYNC_CONFIGDIR@\" -DOPENSYNC_FORMATSDIR=\"@OPENSYNC_FORMATSDIR@\"
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine -I$(top_srcdir)/opensync
+ospluginincludedir = @OPENSYNC_HEADERDIR@
+osplugin_SOURCES = osplugin.c
+osplugin_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osplugin_LDADD = $(top_builddir)/opensync/libopensync.la
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign osplugin/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign osplugin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
+ done
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+osplugin$(EXEEXT): $(osplugin_OBJECTS) $(osplugin_DEPENDENCIES)
+ @rm -f osplugin$(EXEEXT)
+ $(LINK) $(osplugin_LDFLAGS) $(osplugin_OBJECTS) $(osplugin_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osplugin.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(libexecdir)"; 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:
+ -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-libexecPROGRAMS clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libexecPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libexecPROGRAMS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libexecPROGRAMS clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am \
+ install-libexecPROGRAMS install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+ uninstall-libexecPROGRAMS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/osplugin/osplugin.c b/debian/opensync/opensync-0.22/osplugin/osplugin.c
new file mode 100644
index 00000000..974ba68e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/osplugin/osplugin.c
@@ -0,0 +1,604 @@
+#include <opensync/opensync.h>
+#include <glib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <fcntl.h>
+
+#include "opensync/opensync_internals.h"
+
+typedef struct PluginProcess {
+ OSyncEnv *env;
+ OSyncMember *member;
+ OSyncQueue *incoming;
+ OSyncQueue *outgoing;
+
+ /** Does osync_member_initialized() run successfully? */
+ osync_bool is_initialized;
+} PluginProcess;
+
+typedef struct context {
+ PluginProcess *pp;
+ OSyncMessage *message;
+
+ /** The change being commited, for commit_change() */
+ OSyncChange *change;
+
+ /** A function that may be used to set method-specific data in the reply,
+ * such as the UID in the in the commit_change reply
+ */
+ osync_bool (*add_reply_data)(OSyncMessage*, struct context*, OSyncError**);
+} context;
+
+
+static osync_bool add_commit_change_reply_data(OSyncMessage *reply, context *ctx, OSyncError **error);
+static osync_bool add_connect_reply_data(OSyncMessage *reply, context *ctx, OSyncError **error);
+static osync_bool add_get_changedata_reply_data(OSyncMessage *reply, context *ctx, OSyncError **error);
+
+void message_handler(OSyncMessage*, void*);
+void message_callback(OSyncMember*, context*, OSyncError**);
+
+void process_free(PluginProcess *pp)
+{
+ if (pp->incoming) {
+ osync_queue_disconnect(pp->incoming, NULL);
+ osync_queue_remove(pp->incoming, NULL);
+ osync_queue_free(pp->incoming);
+ }
+
+ if (pp->outgoing) {
+ osync_queue_disconnect(pp->incoming, NULL);
+ osync_queue_free(pp->outgoing);
+ }
+
+ if (pp->env)
+ osync_env_free(pp->env);
+
+ g_free(pp);
+}
+
+void process_error_shutdown(PluginProcess *pp, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, pp, error);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_ERROR, 0, NULL);
+ if (!message)
+ goto error;
+
+ osync_marshal_error(message, *error);
+
+ if (!osync_queue_send_message(pp->outgoing, NULL, message, NULL))
+ goto error_free_message;
+
+ sleep(1);
+
+ process_free(pp);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ exit(1);
+
+error_free_message:
+ osync_message_unref(message);
+error:
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ exit(2);
+}
+
+void osync_client_sync_alert_sink(OSyncMember *member)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, member);
+ PluginProcess *pp = (PluginProcess*)osync_member_get_data(member);
+
+ OSyncError *error = NULL;
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_SYNC_ALERT, 0, &error);
+ if (!message)
+ process_error_shutdown(pp, &error);
+
+ if (!osync_queue_send_message(pp->outgoing, NULL, message, &error))
+ process_error_shutdown(pp, &error);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void osync_client_changes_sink(OSyncMember *member, OSyncChange *change, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, member, change, user_data);
+ context *ctx = (context *)user_data;
+ PluginProcess *pp = ctx->pp;
+ OSyncMessage *orig = ctx->message;
+
+ OSyncError *error = NULL;
+
+ if (osync_message_is_answered(orig)) {
+ osync_change_free(change);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+ }
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_NEW_CHANGE, 0, &error);
+ if (!message)
+ process_error_shutdown(pp, &error);
+
+ osync_marshal_change(message, change);
+
+ osync_message_write_long_long_int(message, osync_member_get_id(member));
+
+ if (!osync_queue_send_message(pp->outgoing, NULL, message, &error))
+ process_error_shutdown(pp, &error);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void usage (char *name)
+{
+ fprintf (stderr, "\nUsage: %s <group path> <memberid>\n\n", name);
+ fprintf (stderr, "<group path> is the path to the directory\n");
+ fprintf (stderr, "\tof the group to synchronize\n");
+ fprintf (stderr, "<memberid> is the id of the member to debug\n\n");
+ fprintf (stderr, "Example: %s /home/joe/.opensync/group1 1\n", name);
+ exit (1);
+}
+
+int main( int argc, char **argv )
+{
+ osync_trace(TRACE_ENTRY, "%s(%i, %p)", __func__, argc, argv);
+ GMainLoop *syncloop;
+ GMainContext *context;
+ OSyncError *error = NULL;
+ PluginProcess pp;
+
+ if (argc != 3)
+ usage(argv[0]);
+
+ memset(&pp, 0, sizeof(pp));
+
+ char *group_path = argv[ 1 ];
+ int member_id = atoi( argv[ 2 ] );
+
+ context = g_main_context_new();
+ syncloop = g_main_loop_new(context, TRUE);
+
+ /** Create environment **/
+ OSyncEnv *env = osync_env_new();
+ /* Don't load groups. We will load the group manually using osync_group_load() */
+ osync_env_set_option(env, "LOAD_GROUPS", "no");
+
+ /* Don't load plugins automatically if OSYNC_MODULE_LIST is set */
+ char *module_list = getenv("OSYNC_MODULE_LIST");
+
+ if (module_list) {
+ osync_env_set_option(env, "LOAD_PLUGINS", "no");
+
+ osync_trace(TRACE_INTERNAL, "OSYNC_MODULE_LIST variable: %s", module_list);
+
+ char *str, *saveptr;
+ for (str = module_list; ; str = NULL) {
+ char *path = strtok_r(str, ":", &saveptr);
+ if (!path)
+ break;
+
+ osync_trace(TRACE_INTERNAL, "Module to be loaded: %s", path);
+ if (!osync_module_load(env, path, &error)) {
+ fprintf(stderr, "Unable to load plugin %s: %s\n", path, osync_error_print(&error));
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ return 1;
+ }
+ }
+ }
+
+ if (!osync_env_initialize(env, &error)) {
+ fprintf(stderr, "Unable to initialize environment: %s\n", osync_error_print(&error));
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+
+ /** Find group **/
+ OSyncGroup *group = osync_group_load(env, group_path, &error);
+ if (!group) {
+ fprintf(stderr, "Unable to load group from path: %s\n", group_path);
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to load group from path: %s", __func__, group_path);
+ return 2;
+ }
+
+ /** Find member **/
+ int i;
+ for ( i = 0; i < osync_group_num_members(group); ++i ) {
+ pp.member = osync_group_nth_member(group, i);
+ if (member_id == osync_member_get_id(pp.member))
+ break;
+ else
+ pp.member = NULL;
+ }
+ if ( !pp.member ) {
+ fprintf(stderr, "Unable to find member with id %d\n", member_id);
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to find member with id %d", __func__, member_id);
+ return 3;
+ }
+ osync_trace(TRACE_INTERNAL, "+++++++++ This is the client #%d (%s plugin) of group %s", member_id, pp.member->pluginname, osync_group_get_name(group));
+
+ /** Create connection pipes **/
+ char *pipe_path = g_strdup_printf( "%s/pluginpipe", osync_member_get_configdir( pp.member ) );
+ pp.incoming = osync_queue_new( pipe_path, &error );
+ pp.outgoing = NULL;
+ g_free( pipe_path );
+
+ osync_queue_create( pp.incoming, &error );
+ if ( osync_error_is_set( &error ) )
+ osync_error_free( &error );
+
+ /** Idle until the syncengine connects to (and reads from) our pipe **/
+ if (!osync_queue_connect( pp.incoming, OSYNC_QUEUE_RECEIVER, 0 )) {
+ fprintf(stderr, "Unable to connect\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to connect", __func__);
+ exit(1);
+ }
+
+
+ osync_member_set_data(pp.member, &pp);
+
+ /** Set callback functions **/
+ OSyncMemberFunctions *functions = osync_member_get_memberfunctions(pp.member);
+ functions->rf_change = osync_client_changes_sink;
+ //functions->rf_message = osync_client_message_sink;
+ functions->rf_sync_alert = osync_client_sync_alert_sink;
+
+ /** Start loop **/
+ osync_trace(TRACE_INTERNAL, "plugin setting up mainloop");
+ osync_queue_set_message_handler(pp.incoming, message_handler, &pp);
+ osync_queue_setup_with_gmainloop(pp.incoming, context);
+ osync_member_set_loop(pp.member, context);
+
+ osync_trace(TRACE_INTERNAL, "running loop");
+ g_main_loop_run(syncloop);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return 0;
+}
+
+void message_handler(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ PluginProcess *pp = user_data;
+
+ OSyncMessage *reply = NULL;
+ OSyncError *error = NULL;
+ //OSyncChange *change = 0;
+ OSyncMember *member = pp->member;
+ char *enginepipe = NULL;
+ context *ctx = NULL;
+
+ osync_trace(TRACE_INTERNAL, "plugin received command %i", osync_message_get_command( message ));
+
+ switch ( osync_message_get_command( message ) ) {
+ case OSYNC_MESSAGE_NOOP:
+ break;
+
+ case OSYNC_MESSAGE_INITIALIZE:
+ osync_trace(TRACE_INTERNAL, "init.");
+ osync_message_read_string(message, &enginepipe);
+
+ osync_trace(TRACE_INTERNAL, "enginepipe %s", enginepipe);
+ pp->outgoing = osync_queue_new(enginepipe, NULL);
+ if (!pp->outgoing) {
+ fprintf(stderr, "Unable to make new queue\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to make new queue", __func__);
+ exit(1);
+ }
+ osync_trace(TRACE_INTERNAL, "connecting to engine");
+ if (!osync_queue_connect(pp->outgoing, OSYNC_QUEUE_SENDER, 0 )) {
+ fprintf(stderr, "Unable to connect queue\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to connect queue", __func__);
+ exit(1);
+ }
+
+ osync_trace(TRACE_INTERNAL, "done connecting to engine");
+ /** Instanciate plugin **/
+ if (!osync_member_instance_default_plugin(pp->member, &error))
+ goto error;
+
+ /** Initialize plugin **/
+ if (!osync_member_initialize(pp->member, &error))
+ goto error;
+
+ pp->is_initialized = TRUE;
+
+ osync_trace(TRACE_INTERNAL, "sending reply to engine");
+ reply = osync_message_new_reply(message, NULL);
+ if (!reply) {
+ fprintf(stderr, "Unable to make new reply\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to make new reply", __func__);
+ exit(1);
+ }
+
+ if (!osync_queue_send_message(pp->outgoing, NULL, reply, NULL)) {
+ fprintf(stderr, "Unable to send reply\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to send reply", __func__);
+ exit(1);
+ }
+
+ osync_trace(TRACE_INTERNAL, "done sending to engine");
+ break;
+
+ case OSYNC_MESSAGE_FINALIZE:
+ if (pp->is_initialized)
+ osync_member_finalize(pp->member);
+
+ reply = osync_message_new_reply(message, NULL);
+ if (!reply) {
+ fprintf(stderr, "Unable to make new reply\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to make new reply", __func__);
+ exit(1);
+ }
+
+ if (!osync_queue_send_message(pp->outgoing, NULL, reply, NULL)) {
+ fprintf(stderr, "Unable to send reply\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to send reply", __func__);
+ exit(1);
+ }
+
+ /*FIXME: how to wait for a message to be sent?
+ * We need to wait for the reply to be sent before exiting
+ */
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ exit(0);
+ break;
+
+ case OSYNC_MESSAGE_CONNECT:
+ osync_member_read_sink_info_full(member, message);
+
+ ctx = g_malloc0(sizeof(context));
+ ctx->pp = pp;
+ ctx->message = message;
+ osync_message_ref(message);
+
+ /* connect() needs to tell the engine if it must perform a
+ * slow-sync, use add_reply_data() method for this
+ */
+ ctx->add_reply_data = add_connect_reply_data;
+
+ osync_member_connect(member, (OSyncEngCallback)message_callback, ctx);
+ break;
+
+ case OSYNC_MESSAGE_GET_CHANGES:
+ osync_member_read_sink_info_full(member, message);
+
+ ctx = g_malloc0(sizeof(context));
+ ctx->pp = pp;
+ ctx->message = message;
+ osync_message_ref(message);
+ osync_member_get_changeinfo(member, (OSyncEngCallback)message_callback, ctx);
+ break;
+
+ case OSYNC_MESSAGE_COMMIT_CHANGE:
+ ctx = g_malloc0(sizeof(context));
+ ctx->pp = pp;
+ ctx->message = message;
+ osync_message_ref(message);
+ OSyncChange *change;
+ osync_demarshal_change(message, member->group->conv_env, &change);
+ osync_change_set_member(change, member);
+
+ /* commit_change() needs to return some data back to the engine,
+ * use the add_reply_data() method for this
+ */
+ ctx->change = change;
+ ctx->add_reply_data = add_commit_change_reply_data;
+
+ osync_member_commit_change(member, change, (OSyncEngCallback)message_callback, ctx);
+ break;
+
+ case OSYNC_MESSAGE_SYNC_DONE:
+ ctx = g_malloc0(sizeof(context));
+ ctx->pp = pp;
+ ctx->message = message;
+ osync_message_ref(message);
+ osync_member_sync_done(member, (OSyncEngCallback)message_callback, ctx);
+ break;
+
+ case OSYNC_MESSAGE_DISCONNECT:
+ ctx = g_malloc0(sizeof(context));
+ ctx->pp = pp;
+ ctx->message = message;
+ osync_message_ref(message);
+ osync_member_disconnect(member, (OSyncEngCallback)message_callback, ctx);
+ break;
+
+ case OSYNC_MESSAGE_REPLY:
+ break;
+
+ case OSYNC_MESSAGE_ERRORREPLY:
+ break;
+
+ case OSYNC_MESSAGE_GET_CHANGEDATA:
+ ctx = g_malloc0(sizeof(context));
+ ctx->pp = pp;
+ ctx->message = message;
+ osync_message_ref(message);
+
+ osync_demarshal_change(message, member->group->conv_env, &change);
+ osync_change_set_member(change, member);
+
+ /* get_changedata needs to return the data from the change object back */
+ ctx->change = change;
+ ctx->add_reply_data = add_get_changedata_reply_data;
+
+ osync_member_get_change_data(member, change, (OSyncEngCallback)message_callback, ctx);
+ osync_trace(TRACE_EXIT, "message_handler");
+ break;
+
+ case OSYNC_MESSAGE_COMMITTED_ALL:
+ ctx = g_malloc0(sizeof(context));
+ ctx->pp = pp;
+ ctx->message = message;
+ osync_message_ref(message);
+ osync_member_committed_all(member, (OSyncEngCallback)message_callback, ctx);
+ break;
+
+ /*case OSYNC_MESSAGE_READ_CHANGE:
+ osync_demarshal_change( queue, &change, &error );
+ osync_member_read_change(client->member, change, (OSyncEngCallback)message_callback, message);
+ osync_trace(TRACE_EXIT, "message_handler");
+ break;
+ */
+
+ case OSYNC_MESSAGE_CALL_PLUGIN:
+ /*
+ char *function = itm_message_get_data(message, "function");
+ void *data = itm_message_get_data(message, "data");
+ OSyncError *error = NULL;
+ void *replydata = osync_member_call_plugin(client->member, function, data, &error);
+
+ if (itm_message_get_data(message, "want_reply")) {
+ ITMessage *reply = NULL;
+ if (!osync_error_is_set(&error)) {
+ reply = itm_message_new_methodreply(client, message);
+ itm_message_set_data(message, "reply", replydata);
+ } else {
+ reply = itm_message_new_errorreply(client, message);
+ itm_message_set_error(reply, error);
+ }
+
+ itm_message_send_reply(reply);
+ }
+ */
+ break;
+ case OSYNC_MESSAGE_QUEUE_HUP:
+ osync_trace(TRACE_INTERNAL, "%s: ERROR: Queue hangup", __func__);
+ fprintf(stderr, "Pipe closed! Exiting.\n");
+ osync_trace(TRACE_EXIT, "%s: Exiting application. Goodbye.", __func__);
+ exit(1);
+ break;
+ default:
+ osync_trace(TRACE_INTERNAL, "%s: ERROR: Unknown message", __func__);
+ g_assert_not_reached();
+ break;
+ }
+
+ if (reply)
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+
+error:;
+
+ OSyncMessage *errorreply = osync_message_new_errorreply(message, NULL);
+ if (!errorreply) {
+ fprintf(stderr, "Unable to make new reply\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s", __func__);
+ exit(1);
+ }
+
+ osync_marshal_error(errorreply, error);
+
+ if (!osync_queue_send_message(pp->outgoing, NULL, errorreply, NULL)) {
+ fprintf(stderr, "Unable to send error\n");
+ osync_trace(TRACE_EXIT_ERROR, "%s", __func__);
+ exit(1);
+ }
+
+ osync_message_unref(errorreply);
+
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+}
+
+/** add get_changedat-specific data to the get_changedata reply */
+static osync_bool add_get_changedata_reply_data(OSyncMessage *reply, context *ctx, OSyncError **error)
+{
+ OSyncChange *change = ctx->change;
+
+ assert(change);
+
+ osync_marshal_changedata(reply, change);
+
+ return TRUE;
+}
+
+/** Add commit_change-specific data to the commit_change reply */
+static osync_bool add_commit_change_reply_data(OSyncMessage *reply, context *ctx, OSyncError **error)
+{
+ OSyncChange *change = ctx->change;
+
+ assert(change);
+
+ osync_message_write_string(reply, osync_change_get_uid(change));
+
+ return TRUE;
+}
+
+/** Add connect-specific data to the connect reply */
+static osync_bool add_connect_reply_data(OSyncMessage *reply, context *ctx, OSyncError **error)
+{
+ OSyncMember *member = ctx->pp->member;
+
+ assert(member);
+
+ osync_member_write_sink_info(member, reply);
+
+ return TRUE;
+}
+
+void message_callback(OSyncMember *member, context *ctx, OSyncError **error)
+{
+ /*FIXME: handle errors in this function */
+
+ OSyncError *myerror = NULL;
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, member, ctx, error);
+
+ OSyncMessage *message = ctx->message;
+ PluginProcess *pp = ctx->pp;
+
+ OSyncMessage *reply = NULL;
+
+ if (osync_message_is_answered(message) == TRUE) {
+ osync_message_unref(message);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return;
+ }
+
+ if (!osync_error_is_set(error)) {
+ reply = osync_message_new_reply(message, error);
+ osync_debug("CLI", 4, "Member is replying with message %p to message %p:\"%lli-%i\" with no error", reply, message, message->id1, message->id2);
+ /* Set method-specific data, if needed */
+ if (ctx->add_reply_data)
+ ctx->add_reply_data(reply, ctx, error);
+ } else {
+ reply = osync_message_new_errorreply(message, &myerror);
+ osync_marshal_error(reply, *error);
+ osync_debug("CLI", 1, "Member is replying with message %p to message %p:\"%lli-%i\" with error %i: %s", reply, message, message->id1, message->id2, osync_error_get_type(error), osync_error_print(error));
+ }
+
+ g_free(ctx);
+
+ osync_queue_send_message(pp->outgoing, NULL, reply, NULL);
+ osync_message_set_answered(message);
+
+ osync_message_unref(message);
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void *osync_client_message_sink(OSyncMember *member, const char *name, void *data, osync_bool synchronous)
+{
+ /*TODO: Implement support for PLUGIN_MESSAGE */
+/*
+ OSyncClient *client = osync_member_get_data(member);
+ OSyncEngine *engine = client->engine;
+ if (!synchronous) {
+
+ ITMessage *message = itm_message_new_signal(client, "PLUGIN_MESSAGE");
+ osync_debug("CLI", 3, "Sending message %p PLUGIN_MESSAGE for message %s", message, name);
+ itm_message_set_data(message, "data", data);
+ itm_message_set_data(message, "name", g_strdup(name));
+ itm_queue_send(engine->incoming, message);
+
+ return NULL;
+ } else {
+ return engine->plgmsg_callback(engine, client, name, data, engine->plgmsg_userdata);
+ }
+*/
+ return NULL;
+}
diff --git a/debian/opensync/opensync-0.22/py-compile b/debian/opensync/opensync-0.22/py-compile
new file mode 100755
index 00000000..d6e900b3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/py-compile
@@ -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@gnu.org> or send patches to
+# <automake-patches@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@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:
diff --git a/debian/opensync/opensync-0.22/tests/Makefile.am b/debian/opensync/opensync-0.22/tests/Makefile.am
new file mode 100755
index 00000000..29b03f6f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/Makefile.am
@@ -0,0 +1,111 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = mock-plugin
+
+AM_CFLAGS = @XML_CFLAGS@ -Wall -Werror @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
+
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ -I$(top_srcdir)/osengine
+
+EXTRA_DIST = \
+ data \
+ support.h
+
+if ENABLE_PROF
+PROFTEST = coverage.sh
+endif
+
+if ENABLE_TESTS
+TESTS = error ipc user member group plugin locks env conv sync filter multisync vcard vcal vnote errorcodes $(PROFTEST)
+noinst_PROGRAMS = error ipc user member group plugin locks env conv sync filter multisync vcard vcal vnote errorcodes
+else
+TESTS =
+noinst_PROGRAMS =
+endif
+
+error_INCLUDES = @CHECK_CFLAGS@
+error_SOURCES = check_error.c
+error_LIBS = @CHECK_LIBS@
+error_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+ipc_INCLUDES = @CHECK_CFLAGS@
+ipc_SOURCES = check_ipc.c support.c
+ipc_LIBS = @CHECK_LIBS@
+ipc_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+member_INCLUDES = @CHECK_CFLAGS@
+member_SOURCES = check_member.c
+member_LIBS = @CHECK_LIBS@
+member_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+group_INCLUDES = @CHECK_CFLAGS@
+group_SOURCES = check_group.c support.c
+group_LIBS = @CHECK_LIBS@
+group_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+plugin_INCLUDES = @CHECK_CFLAGS@
+plugin_SOURCES = check_plugins.c support.c
+plugin_LIBS = @CHECK_LIBS@
+plugin_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+locks_INCLUDES = @CHECK_CFLAGS@
+locks_SOURCES = check_lock.c support.c
+locks_LIBS = @CHECK_LIBS@
+locks_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+env_INCLUDES = @CHECK_CFLAGS@
+env_SOURCES = check_env.c support.c
+env_LIBS = @CHECK_LIBS@
+env_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+user_INCLUDES = @CHECK_CFLAGS@
+user_SOURCES = check_user.c
+user_LIBS = @CHECK_LIBS@
+user_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+conv_INCLUDES = @CHECK_CFLAGS@
+conv_SOURCES = check_conv.c support.c
+conv_LIBS = @CHECK_LIBS@
+conv_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+sync_INCLUDES = @CHECK_CFLAGS@
+sync_SOURCES = check_sync.c support.c
+sync_LIBS = @CHECK_LIBS@
+sync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+filter_INCLUDES = @CHECK_CFLAGS@
+filter_SOURCES = check_filter.c support.c
+filter_LIBS = @CHECK_LIBS@
+filter_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+multisync_INCLUDES = @CHECK_CFLAGS@
+multisync_SOURCES = check_multisync.c support.c
+multisync_LIBS = @CHECK_LIBS@
+multisync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+vcard_INCLUDES = @CHECK_CFLAGS@
+vcard_SOURCES = check_vcard.c support.c
+vcard_LIBS = @CHECK_LIBS@
+vcard_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+vcal_INCLUDES = @CHECK_CFLAGS@
+vcal_SOURCES = check_vcal.c support.c
+vcal_LIBS = @CHECK_LIBS@
+vcal_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+vnote_INCLUDES = @CHECK_CFLAGS@
+vnote_SOURCES = check_vnote.c support.c
+vnote_LIBS = @CHECK_LIBS@
+vnote_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+errorcodes_INCLUDES = @CHECK_CFLAGS@
+errorcodes_SOURCES = check_codes.c support.c
+errorcodes_LIBS = @CHECK_LIBS@
+errorcodes_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+clean:
+ rm -rf coverage/*
diff --git a/debian/opensync/opensync-0.22/tests/Makefile.in b/debian/opensync/opensync-0.22/tests/Makefile.in
new file mode 100644
index 00000000..8a239d87
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/Makefile.in
@@ -0,0 +1,862 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_TESTS_TRUE@noinst_PROGRAMS = error$(EXEEXT) ipc$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ user$(EXEEXT) member$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ group$(EXEEXT) plugin$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ locks$(EXEEXT) env$(EXEEXT) conv$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ sync$(EXEEXT) filter$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ multisync$(EXEEXT) vcard$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ vcal$(EXEEXT) vnote$(EXEEXT) \
+@ENABLE_TESTS_TRUE@ errorcodes$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_conv_OBJECTS = check_conv.$(OBJEXT) support.$(OBJEXT)
+conv_OBJECTS = $(am_conv_OBJECTS)
+conv_LDADD = $(LDADD)
+am_env_OBJECTS = check_env.$(OBJEXT) support.$(OBJEXT)
+env_OBJECTS = $(am_env_OBJECTS)
+env_LDADD = $(LDADD)
+am_error_OBJECTS = check_error.$(OBJEXT)
+error_OBJECTS = $(am_error_OBJECTS)
+error_LDADD = $(LDADD)
+am_errorcodes_OBJECTS = check_codes.$(OBJEXT) support.$(OBJEXT)
+errorcodes_OBJECTS = $(am_errorcodes_OBJECTS)
+errorcodes_LDADD = $(LDADD)
+am_filter_OBJECTS = check_filter.$(OBJEXT) support.$(OBJEXT)
+filter_OBJECTS = $(am_filter_OBJECTS)
+filter_LDADD = $(LDADD)
+am_group_OBJECTS = check_group.$(OBJEXT) support.$(OBJEXT)
+group_OBJECTS = $(am_group_OBJECTS)
+group_LDADD = $(LDADD)
+am_ipc_OBJECTS = check_ipc.$(OBJEXT) support.$(OBJEXT)
+ipc_OBJECTS = $(am_ipc_OBJECTS)
+ipc_LDADD = $(LDADD)
+am_locks_OBJECTS = check_lock.$(OBJEXT) support.$(OBJEXT)
+locks_OBJECTS = $(am_locks_OBJECTS)
+locks_LDADD = $(LDADD)
+am_member_OBJECTS = check_member.$(OBJEXT)
+member_OBJECTS = $(am_member_OBJECTS)
+member_LDADD = $(LDADD)
+am_multisync_OBJECTS = check_multisync.$(OBJEXT) support.$(OBJEXT)
+multisync_OBJECTS = $(am_multisync_OBJECTS)
+multisync_LDADD = $(LDADD)
+am_plugin_OBJECTS = check_plugins.$(OBJEXT) support.$(OBJEXT)
+plugin_OBJECTS = $(am_plugin_OBJECTS)
+plugin_LDADD = $(LDADD)
+am_sync_OBJECTS = check_sync.$(OBJEXT) support.$(OBJEXT)
+sync_OBJECTS = $(am_sync_OBJECTS)
+sync_LDADD = $(LDADD)
+am_user_OBJECTS = check_user.$(OBJEXT)
+user_OBJECTS = $(am_user_OBJECTS)
+user_LDADD = $(LDADD)
+am_vcal_OBJECTS = check_vcal.$(OBJEXT) support.$(OBJEXT)
+vcal_OBJECTS = $(am_vcal_OBJECTS)
+vcal_LDADD = $(LDADD)
+am_vcard_OBJECTS = check_vcard.$(OBJEXT) support.$(OBJEXT)
+vcard_OBJECTS = $(am_vcard_OBJECTS)
+vcard_LDADD = $(LDADD)
+am_vnote_OBJECTS = check_vnote.$(OBJEXT) support.$(OBJEXT)
+vnote_OBJECTS = $(am_vnote_OBJECTS)
+vnote_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(conv_SOURCES) $(env_SOURCES) $(error_SOURCES) \
+ $(errorcodes_SOURCES) $(filter_SOURCES) $(group_SOURCES) \
+ $(ipc_SOURCES) $(locks_SOURCES) $(member_SOURCES) \
+ $(multisync_SOURCES) $(plugin_SOURCES) $(sync_SOURCES) \
+ $(user_SOURCES) $(vcal_SOURCES) $(vcard_SOURCES) \
+ $(vnote_SOURCES)
+DIST_SOURCES = $(conv_SOURCES) $(env_SOURCES) $(error_SOURCES) \
+ $(errorcodes_SOURCES) $(filter_SOURCES) $(group_SOURCES) \
+ $(ipc_SOURCES) $(locks_SOURCES) $(member_SOURCES) \
+ $(multisync_SOURCES) $(plugin_SOURCES) $(sync_SOURCES) \
+ $(user_SOURCES) $(vcal_SOURCES) $(vcard_SOURCES) \
+ $(vnote_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = mock-plugin
+AM_CFLAGS = @XML_CFLAGS@ -Wall -Werror @GCOV_CFLAGS@ -DOPENSYNC_TESTDATA=\"$(srcdir)/\"
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ -I$(top_srcdir)/osengine
+EXTRA_DIST = \
+ data \
+ support.h
+
+@ENABLE_PROF_TRUE@PROFTEST = coverage.sh
+@ENABLE_TESTS_FALSE@TESTS =
+@ENABLE_TESTS_TRUE@TESTS = error ipc user member group plugin locks env conv sync filter multisync vcard vcal vnote errorcodes $(PROFTEST)
+error_INCLUDES = @CHECK_CFLAGS@
+error_SOURCES = check_error.c
+error_LIBS = @CHECK_LIBS@
+error_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+ipc_INCLUDES = @CHECK_CFLAGS@
+ipc_SOURCES = check_ipc.c support.c
+ipc_LIBS = @CHECK_LIBS@
+ipc_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+member_INCLUDES = @CHECK_CFLAGS@
+member_SOURCES = check_member.c
+member_LIBS = @CHECK_LIBS@
+member_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+group_INCLUDES = @CHECK_CFLAGS@
+group_SOURCES = check_group.c support.c
+group_LIBS = @CHECK_LIBS@
+group_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+plugin_INCLUDES = @CHECK_CFLAGS@
+plugin_SOURCES = check_plugins.c support.c
+plugin_LIBS = @CHECK_LIBS@
+plugin_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+locks_INCLUDES = @CHECK_CFLAGS@
+locks_SOURCES = check_lock.c support.c
+locks_LIBS = @CHECK_LIBS@
+locks_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+env_INCLUDES = @CHECK_CFLAGS@
+env_SOURCES = check_env.c support.c
+env_LIBS = @CHECK_LIBS@
+env_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+user_INCLUDES = @CHECK_CFLAGS@
+user_SOURCES = check_user.c
+user_LIBS = @CHECK_LIBS@
+user_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+conv_INCLUDES = @CHECK_CFLAGS@
+conv_SOURCES = check_conv.c support.c
+conv_LIBS = @CHECK_LIBS@
+conv_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+sync_INCLUDES = @CHECK_CFLAGS@
+sync_SOURCES = check_sync.c support.c
+sync_LIBS = @CHECK_LIBS@
+sync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+filter_INCLUDES = @CHECK_CFLAGS@
+filter_SOURCES = check_filter.c support.c
+filter_LIBS = @CHECK_LIBS@
+filter_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+multisync_INCLUDES = @CHECK_CFLAGS@
+multisync_SOURCES = check_multisync.c support.c
+multisync_LIBS = @CHECK_LIBS@
+multisync_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+vcard_INCLUDES = @CHECK_CFLAGS@
+vcard_SOURCES = check_vcard.c support.c
+vcard_LIBS = @CHECK_LIBS@
+vcard_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+vcal_INCLUDES = @CHECK_CFLAGS@
+vcal_SOURCES = check_vcal.c support.c
+vcal_LIBS = @CHECK_LIBS@
+vcal_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+vnote_INCLUDES = @CHECK_CFLAGS@
+vnote_SOURCES = check_vnote.c support.c
+vnote_LIBS = @CHECK_LIBS@
+vnote_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+errorcodes_INCLUDES = @CHECK_CFLAGS@
+errorcodes_SOURCES = check_codes.c support.c
+errorcodes_LIBS = @CHECK_LIBS@
+errorcodes_LDFLAGS = @PACKAGE_LIBS@ $(top_builddir)/opensync/libopensync.la $(top_builddir)/osengine/libosengine.la -lcheck -R $(libdir) @GCOV_LDFLAGS@
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+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
+conv$(EXEEXT): $(conv_OBJECTS) $(conv_DEPENDENCIES)
+ @rm -f conv$(EXEEXT)
+ $(LINK) $(conv_LDFLAGS) $(conv_OBJECTS) $(conv_LDADD) $(LIBS)
+env$(EXEEXT): $(env_OBJECTS) $(env_DEPENDENCIES)
+ @rm -f env$(EXEEXT)
+ $(LINK) $(env_LDFLAGS) $(env_OBJECTS) $(env_LDADD) $(LIBS)
+error$(EXEEXT): $(error_OBJECTS) $(error_DEPENDENCIES)
+ @rm -f error$(EXEEXT)
+ $(LINK) $(error_LDFLAGS) $(error_OBJECTS) $(error_LDADD) $(LIBS)
+errorcodes$(EXEEXT): $(errorcodes_OBJECTS) $(errorcodes_DEPENDENCIES)
+ @rm -f errorcodes$(EXEEXT)
+ $(LINK) $(errorcodes_LDFLAGS) $(errorcodes_OBJECTS) $(errorcodes_LDADD) $(LIBS)
+filter$(EXEEXT): $(filter_OBJECTS) $(filter_DEPENDENCIES)
+ @rm -f filter$(EXEEXT)
+ $(LINK) $(filter_LDFLAGS) $(filter_OBJECTS) $(filter_LDADD) $(LIBS)
+group$(EXEEXT): $(group_OBJECTS) $(group_DEPENDENCIES)
+ @rm -f group$(EXEEXT)
+ $(LINK) $(group_LDFLAGS) $(group_OBJECTS) $(group_LDADD) $(LIBS)
+ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES)
+ @rm -f ipc$(EXEEXT)
+ $(LINK) $(ipc_LDFLAGS) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS)
+locks$(EXEEXT): $(locks_OBJECTS) $(locks_DEPENDENCIES)
+ @rm -f locks$(EXEEXT)
+ $(LINK) $(locks_LDFLAGS) $(locks_OBJECTS) $(locks_LDADD) $(LIBS)
+member$(EXEEXT): $(member_OBJECTS) $(member_DEPENDENCIES)
+ @rm -f member$(EXEEXT)
+ $(LINK) $(member_LDFLAGS) $(member_OBJECTS) $(member_LDADD) $(LIBS)
+multisync$(EXEEXT): $(multisync_OBJECTS) $(multisync_DEPENDENCIES)
+ @rm -f multisync$(EXEEXT)
+ $(LINK) $(multisync_LDFLAGS) $(multisync_OBJECTS) $(multisync_LDADD) $(LIBS)
+plugin$(EXEEXT): $(plugin_OBJECTS) $(plugin_DEPENDENCIES)
+ @rm -f plugin$(EXEEXT)
+ $(LINK) $(plugin_LDFLAGS) $(plugin_OBJECTS) $(plugin_LDADD) $(LIBS)
+sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES)
+ @rm -f sync$(EXEEXT)
+ $(LINK) $(sync_LDFLAGS) $(sync_OBJECTS) $(sync_LDADD) $(LIBS)
+user$(EXEEXT): $(user_OBJECTS) $(user_DEPENDENCIES)
+ @rm -f user$(EXEEXT)
+ $(LINK) $(user_LDFLAGS) $(user_OBJECTS) $(user_LDADD) $(LIBS)
+vcal$(EXEEXT): $(vcal_OBJECTS) $(vcal_DEPENDENCIES)
+ @rm -f vcal$(EXEEXT)
+ $(LINK) $(vcal_LDFLAGS) $(vcal_OBJECTS) $(vcal_LDADD) $(LIBS)
+vcard$(EXEEXT): $(vcard_OBJECTS) $(vcard_DEPENDENCIES)
+ @rm -f vcard$(EXEEXT)
+ $(LINK) $(vcard_LDFLAGS) $(vcard_OBJECTS) $(vcard_LDADD) $(LIBS)
+vnote$(EXEEXT): $(vnote_OBJECTS) $(vnote_DEPENDENCIES)
+ @rm -f vnote$(EXEEXT)
+ $(LINK) $(vnote_LDFLAGS) $(vnote_OBJECTS) $(vnote_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_codes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_conv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_env.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_filter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_group.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_ipc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_lock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_member.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_multisync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_plugins.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_sync.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_user.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_vcal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_vcard.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_vnote.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# 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"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @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; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTS)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile $(PROGRAMS)
+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:
+ -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-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \
+ check-am clean clean-generic clean-libtool \
+ clean-noinstPROGRAMS clean-recursive ctags ctags-recursive \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-recursive distclean-tags distdir \
+ dvi dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-info-am
+
+
+clean:
+ rm -rf coverage/*
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/tests/check_codes.c b/debian/opensync/opensync-0.22/tests/check_codes.c
new file mode 100644
index 00000000..62bcab29
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_codes.c
@@ -0,0 +1,1143 @@
+#include "support.h"
+
+START_TEST (single_init_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("INIT_NULL", "2", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+
+ fail_unless(!osengine_init(engine, &error), NULL);
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_connect_error)
+{
+ char *testbed = setup_testbed("sync_easy_new");
+
+ setenv("CONNECT_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 2, NULL);
+ fail_unless(num_connected == 0, NULL);
+ fail_unless(num_disconnected == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (one_of_two_connect_error)
+{
+ char *testbed = setup_testbed("sync_easy_new");
+
+ setenv("CONNECT_ERROR", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 1, NULL);
+ fail_unless(num_connected == 1, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (two_of_three_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "5", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 2, NULL);
+ fail_unless(num_connected == 1, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (two_of_three_connect_error2)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 2, NULL);
+ fail_unless(num_connected == 1, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (three_of_three_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "7", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 3, NULL);
+ fail_unless(num_connected == 0, NULL);
+ fail_unless(num_disconnected == 0, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (one_of_three_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "2", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 1, NULL);
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (no_connect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("CONNECT_ERROR", "0", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_get_changes_error)
+{
+ char *testbed = setup_testbed("sync_easy_conflict");
+
+ setenv("GET_CHANGES_ERROR", "2", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_get_changes_errors == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_get_changes_error)
+{
+ char *testbed = setup_testbed("sync_easy_conflict");
+
+ setenv("GET_CHANGES_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_sent_changes == 0, NULL);
+ fail_unless(num_read == 0, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (two_of_three_get_changes_error)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose2");
+
+ setenv("GET_CHANGES_ERROR", "5", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (one_of_three_get_changes_error)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose2");
+
+ setenv("GET_CHANGES_ERROR", "1", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_get_changes_errors == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ osync_error_free(&error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_commit_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("COMMIT_ERROR", "4", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 1, NULL);
+ fail_unless(num_written_errors == 1, NULL);
+ fail_unless(num_mapping_errors == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_commit_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("COMMIT_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 2, NULL);
+ fail_unless(num_mapping_errors == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (commit_error_modify)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ setenv("COMMIT_TIMEOUT", "2", TRUE);
+ setenv("COMMIT_ERROR", "4", TRUE);
+
+ sleep(2);
+
+ system("cp newdata2 data1/testdata");
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 2, NULL);
+ fail_unless(num_mapping_errors == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data2 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (commit_error_delete)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ setenv("COMMIT_TIMEOUT", "2", TRUE);
+ setenv("COMMIT_ERROR", "4", TRUE);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 2, NULL);
+ fail_unless(num_mapping_errors == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data2 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (committed_all_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("COMMITTED_ALL_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (committed_all_batch_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("BATCH_COMMIT", "7", TRUE);
+ setenv("COMMITTED_ALL_ERROR", "3", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_sync_done_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("SYNC_DONE_ERROR", "4", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_sync_done_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("SYNC_DONE_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 2, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (triple_sync_done_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("SYNC_DONE_ERROR", "7", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 3, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (single_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_ERROR", "4", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_ERROR", "6", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 2, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (triple_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_ERROR", "7", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 0, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 3, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+/*
+START_TEST (get_changes_disconnect_error)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ setenv("DISCONNECT_TIMEOUT", "1", TRUE);
+ setenv("DISCONNECT_ERROR", "2", TRUE);
+ setenv("GET_CHANGES_TIMEOUT", "6", TRUE);
+ setenv("NO_COMMITTED_ALL_CHECK", "1", TRUE);
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+ osengine_init(engine, &error);
+
+ fail_unless(!synchronize_once(engine, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 1, NULL);
+ fail_unless(num_member_sent_changes == 1, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_mapping_errors == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 2, NULL);
+ fail_unless(num_engine_errors == 1, NULL);
+ fail_unless(num_engine_successfull == 0, NULL);
+
+ mark_point();
+ osync_error_free(&error);
+ mark_point();
+ osengine_finalize(engine);
+ mark_point();
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" != \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" != \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+*/
+
+Suite *multisync_suite(void)
+{
+ Suite *s = suite_create("Error Codes");
+ //Suite *s2 = suite_create("Error Codes");
+ create_case(s, "single_init_error", single_init_error);
+ create_case(s, "dual_connect_error", dual_connect_error);
+ create_case(s, "one_of_two_connect_error", one_of_two_connect_error);
+ create_case(s, "two_of_three_connect_error", two_of_three_connect_error);
+ create_case(s, "two_of_three_connect_error2", two_of_three_connect_error2);
+ create_case(s, "three_of_three_connect_error", three_of_three_connect_error);
+ create_case(s, "one_of_three_connect_error", one_of_three_connect_error);
+ create_case(s, "no_connect_error", no_connect_error);
+ create_case(s, "single_get_changes_error", single_get_changes_error);
+ create_case(s, "dual_get_changes_error", dual_get_changes_error);
+ create_case(s, "two_of_three_get_changes_error", two_of_three_get_changes_error);
+ create_case(s, "one_of_three_get_changes_error", one_of_three_get_changes_error);
+
+ create_case(s, "single_commit_error", single_commit_error);
+ create_case(s, "dual_commit_error", dual_commit_error);
+
+ create_case(s, "commit_error_modify", commit_error_modify);
+ create_case(s, "commit_error_delete", commit_error_delete);
+ create_case(s, "committed_all_error", committed_all_error);
+ create_case(s, "committed_all_batch_error", committed_all_batch_error);
+ create_case(s, "single_sync_done_error", single_sync_done_error);
+ create_case(s, "dual_sync_done_error", dual_sync_done_error);
+ create_case(s, "triple_sync_done_error", triple_sync_done_error);
+
+ create_case(s, "single_disconnect_error", single_disconnect_error);
+ create_case(s, "dual_disconnect_error", dual_disconnect_error);
+ create_case(s, "triple_disconnect_error", triple_disconnect_error);
+
+ /*
+ create_case(s, "get_changes_disconnect_error", get_changes_disconnect_error);
+ */
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = multisync_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_conv.c b/debian/opensync/opensync-0.22/tests/check_conv.c
new file mode 100644
index 00000000..906c3551
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_conv.c
@@ -0,0 +1,1024 @@
+#include "support.h"
+
+/*FIXME: fix warnings about memory leaks when running the test
+ */
+
+START_TEST (conv_env_create)
+{
+ OSyncEnv *osync = init_env_none();
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ fail_unless(env != NULL, "env == NULL on creation");
+}
+END_TEST
+
+START_TEST (conv_env_add_type)
+{
+ OSyncEnv *env = init_env_none();
+ osync_env_register_objtype(env, "test");
+ OSyncObjTypeTemplate *type = env->objtype_templates->data;
+ fail_unless(type != NULL, "type == NULL on creation");
+ fail_unless(!strcmp(type->name, "test"), "string not test");
+}
+END_TEST
+
+START_TEST (conv_env_add_type_find)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjType *type = osync_conv_find_objtype(env, "test");
+ fail_unless(type != NULL, "type == NULL on creation");
+ //fail_unless(osynctype->mergeable == FALSE, "mergable set wrong");
+ fail_unless(!strcmp(osync_objtype_get_name(type), "test"), "string not test2");
+}
+END_TEST
+
+START_TEST (conv_env_add_type_find_false)
+{
+ OSyncEnv *osync = init_env_none();
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ osync_env_register_objtype(osync, "test");
+ OSyncObjType *type = osync_conv_find_objtype(env, "test2");
+ fail_unless(type == NULL, "type != NULL by false find");
+}
+END_TEST
+
+START_TEST (conv_env_type_register2)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objtype(osync, "test");
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ fail_unless(g_list_length(env->objtypes) == 1, "type1 != type2");
+}
+END_TEST
+
+START_TEST (conv_env_add_format)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test");
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test");
+ fail_unless(format1->objtype != NULL, "objtype not set");
+ fail_unless(g_list_nth_data(format1->objtype->formats, 0) == format1, "Format not added to objtype list");
+}
+END_TEST
+
+START_TEST (conv_env_set_format_string)
+{
+ OSyncEnv *osenv = osync_env_new();
+
+ mark_point();
+ osync_env_register_objtype(osenv, "test");
+ mark_point();
+ osync_env_register_objformat(osenv, "test", "fmt_test");
+
+ mark_point();
+ OSyncGroup *group = osync_group_new(osenv);
+ OSyncMember *member = osync_member_new(group);
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_member(change, member);
+ osync_change_set_objformat_string(change, "fmt_test");
+
+ fail_unless(osync_change_get_objformat(change) == group->conv_env->objformats->data, NULL);
+}
+END_TEST
+
+static osync_bool dummyconvert(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = g_strdup("test");
+ *outpsize = 5;
+ return TRUE;
+}
+
+static char dummy_data[1] = { 0 };
+
+static OSyncChange *create_change(OSyncObjFormat *fmt, char *data, size_t datasize)
+{
+ OSyncChange *chg = osync_change_new();
+ osync_change_set_objformat(chg, fmt);
+ osync_change_set_data(chg, data, datasize, TRUE);
+ return chg;
+}
+
+START_TEST (conv_env_add_converters)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "fmt_test2", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "fmt_test3", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ /* The first converter will resolve */
+
+ fail_unless(g_list_length(env->converters) == 3, NULL);
+
+ OSyncFormatConverter *converter = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter != NULL, NULL);
+ fail_unless(converter->type == CONVERTER_CONV, NULL);
+ fail_unless(!strcmp(converter->source_format->name,"fmt_test1") , NULL);
+ fail_unless(!strcmp(converter->target_format->name,"fmt_test2") , NULL);
+ fail_unless(converter->convert_func == dummyconvert, NULL);
+
+
+
+ /* Now all converters should be found */
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter1 == converter, NULL); /* Should be the same converter found above */
+
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test3");
+ fail_unless(converter2 != NULL, NULL);
+ fail_unless(converter2->type == CONVERTER_ENCAP, NULL);
+ fail_unless(!strcmp(converter2->source_format->name,"fmt_test2") , NULL);
+ fail_unless(!strcmp(converter2->target_format->name,"fmt_test3") , NULL);
+ fail_unless(converter2->convert_func == dummyconvert, NULL);
+
+ OSyncFormatConverter *converter3 = osync_conv_find_converter(env, "fmt_test3", "fmt_test2");
+ fail_unless(converter3 != NULL, NULL);
+ fail_unless(converter3->type == CONVERTER_DECAP, NULL);
+ fail_unless(!strcmp(converter3->source_format->name,"fmt_test3") , NULL);
+ fail_unless(!strcmp(converter3->target_format->name,"fmt_test2") , NULL);
+ fail_unless(converter3->convert_func == dummyconvert, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_add_converters_missing)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "fmt_test2", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "fmt_test3", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ fail_unless(g_list_length(env->converters) == 1, NULL);
+
+ OSyncFormatConverter *converter = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter != NULL, NULL);
+ fail_unless(converter->type == CONVERTER_CONV, NULL);
+ fail_unless(!strcmp(converter->source_format->name,"fmt_test1") , NULL);
+ fail_unless(!strcmp(converter->target_format->name,"fmt_test2") , NULL);
+ fail_unless(converter->convert_func == dummyconvert, NULL);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test3", "fmt_test2");
+ fail_unless(converter1 == NULL, NULL);
+
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test3");
+ fail_unless(converter2 == NULL, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_simple)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ fail_unless(converter1 != NULL, NULL);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format2 = osync_conv_find_objformat(env, "fmt_test2");
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format2), &converters), NULL);
+ fail_unless(g_list_length(converters) == 1, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_simple2)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test2", "fmt_test3", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test3");
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "fmt_test3");
+ fail_unless(converter1 != NULL, NULL);
+ fail_unless(converter2 != NULL, NULL);
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format3), &converters), NULL);
+ fail_unless(g_list_length(converters) == 2, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+ fail_unless(g_list_nth_data(converters, 1) == converter2, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_false)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test3", "fmt_test2", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "fmt_test3");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(!osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format3), &converters), NULL);
+ fail_unless(converters == FALSE, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_2way)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_objformat(osync, "test", "fmt_test4");
+
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test2", "fmt_test4", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test3", "fmt_test4", dummyconvert);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "fmt_test1", "fmt_test2");
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "fmt_test2", "fmt_test4");
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format4 = osync_conv_find_objformat(env, "fmt_test4");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format4), &converters), NULL);
+ fail_unless(g_list_length(converters) == 2, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+ fail_unless(g_list_nth_data(converters, 1) == converter2, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_circular_false)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+
+ osync_env_register_objformat(osync, "test", "fmt_test1");
+ osync_env_register_objformat(osync, "test", "fmt_test2");
+ osync_env_register_objformat(osync, "test", "fmt_test3");
+ osync_env_register_objformat(osync, "test", "fmt_test4");
+
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test1", "fmt_test2", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test2", "fmt_test3", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "fmt_test3", "fmt_test1", dummyconvert);
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "fmt_test1");
+ OSyncObjFormat *format4 = osync_conv_find_objformat(env, "fmt_test4");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(!osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format4), &converters), NULL);
+ fail_unless(converters == NULL, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_osp_complex)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "test");
+
+ osync_env_register_objformat(osync, "test", "A");
+ osync_env_register_objformat(osync, "test", "B");
+ osync_env_register_objformat(osync, "test", "C");
+ osync_env_register_objformat(osync, "test", "D");
+ osync_env_register_objformat(osync, "test", "E");
+ osync_env_register_objformat(osync, "test", "F");
+ osync_env_register_objformat(osync, "test", "G");
+ osync_env_register_objformat(osync, "test", "H");
+
+ osync_env_register_converter(osync, CONVERTER_CONV, "A", "B", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "A", "C", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "A", "D", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "C", "E", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "D", "G", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "E", "G", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "G", "H", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "H", "F", dummyconvert);
+ osync_env_register_converter(osync, CONVERTER_CONV, "E", "F", dummyconvert);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncFormatConverter *converter1 = osync_conv_find_converter(env, "A", "C");
+ OSyncFormatConverter *converter2 = osync_conv_find_converter(env, "C", "E");
+ OSyncFormatConverter *converter3 = osync_conv_find_converter(env, "E", "F");
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "A");
+ OSyncObjFormat *format2 = osync_conv_find_objformat(env, "F");
+
+ mark_point();
+ GList *converters;
+ OSyncChange *chg = create_change(format1, dummy_data, 1);
+ fail_unless(osync_conv_find_path_fmtlist(env, chg, g_list_append(NULL, format2), &converters), NULL);
+ fail_unless(g_list_length(converters) == 3, NULL);
+ fail_unless(g_list_nth_data(converters, 0) == converter1, NULL);
+ fail_unless(g_list_nth_data(converters, 1) == converter2, NULL);
+ fail_unless(g_list_nth_data(converters, 2) == converter3, NULL);
+}
+END_TEST
+
+static osync_bool convert_addtest(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = g_strdup_printf("%stest", input);
+ *outpsize = inpsize + 4;
+ return TRUE;
+}
+
+static osync_bool convert_remtest(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = strdup(input);
+ char *test = g_strrstr(*output, "test");
+ *outpsize = 0;
+ if (test) {
+ test[0] = 0;
+ *outpsize = inpsize - 4;
+ return TRUE;
+ } else {
+ output = NULL;
+ return FALSE;
+ }
+}
+
+static osync_bool convert_addtest2(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *output = g_strdup_printf("%stest2", input);
+ *outpsize = inpsize + 5;
+ *free_input = TRUE;
+ return TRUE;
+}
+
+static osync_bool convert_remtest2(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ *free_input = TRUE;
+ *output = strdup(input);
+ char *test = g_strrstr(*output, "test2");
+ *outpsize = 0;
+ if (test) {
+ test[0] = 0;
+ *outpsize = inpsize - 4;
+ return TRUE;
+ } else {
+ output = NULL;
+ return FALSE;
+ }
+}
+
+START_TEST (conv_env_convert1)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest2);
+ mark_point();
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format3, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2"), NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format3, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_convert_back)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_converter(osync, CONVERTER_CONV, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F2", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+ OSyncObjType *type = osync_conv_find_objtype(env, "01");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format3, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2"), NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format3, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "data"), NULL);
+ format = change->format;
+ fail_unless(format == format1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_convert_desenc)
+{
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format3, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2"), NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format3, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "data"), NULL);
+ format = change->format;
+ fail_unless(format == format1, NULL);
+}
+END_TEST
+
+static osync_bool detect_true(OSyncFormatEnv *env, const char *data, int size)
+{
+ return TRUE;
+}
+
+static osync_bool detect_false(OSyncFormatEnv *env, const char *data, int size)
+{
+ return FALSE;
+}
+
+START_TEST (conv_env_convert_desenc_complex)
+{
+ /* Test if the converter is going on the righ path, when the data detector
+ * for the format reports a specific lower format
+ */
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_detector(osync, "F2", "F4", detect_true);
+ osync_env_register_detector(osync, "F2", "F3", detect_false);
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_objformat(osync, "O1", "F4");
+ osync_env_register_objformat(osync, "O1", "F5");
+ osync_env_register_objformat(osync, "O1", "F6");
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F6", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F4", "F5", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F5", "F4", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F5", "F6", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F6", "F5", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format6 = osync_conv_find_objformat(env, "F6");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_objtype(change, type);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ osync_change_convert(env, change, format6, NULL);
+
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2test2test2"), NULL);
+ fail_unless(change->format == format6, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "data"), NULL);
+ fail_unless(change->format == format1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_detect_and_convert)
+{
+ /* The data will be detected as F3, so the shortest path should
+ * not be taken because the path searching function should see that
+ * the encapsulated data * is a F3 object, not a F4 object
+ */
+ OSyncEnv *osync = init_env_none();
+
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_objformat(osync, "O1", "F4");
+
+ osync_env_register_detector(osync, "F1", "F2", detect_true);
+
+ /* Detect F3, not F4 */
+ osync_env_register_detector(osync, "F2", "F3", detect_true);
+ osync_env_register_detector(osync, "F2", "F4", detect_false);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F2", convert_remtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F4", "F3", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format4 = osync_conv_find_objformat(env, "F4");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ fail_unless(osync_change_convert(env, change, format4, NULL), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttest2test2"), NULL);
+ fail_unless(change->objtype == type, NULL);
+ OSyncObjFormat *format = change->format;
+ fail_unless(format == format4, NULL);
+
+ mark_point();
+ osync_change_convert(env, change, format1, NULL);
+ mark_point();
+ data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatest"), NULL);
+ format = change->format;
+ fail_unless(format == format1, NULL);
+}
+END_TEST
+
+START_TEST(conv_prefer_not_desencap)
+{
+ /* Test if the converter is getting the path that have no
+ * lossy detectors
+ *
+ * F1 -- F2 -- F3 -- F5
+ * \ /
+ * --- F4 -----
+ *
+ * All converters are not lossy, except F1->F4.
+ * The result path should be: F1 -> F2 -> F3 -> F5
+ */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_objformat(osync, "O1", "F4");
+ osync_env_register_objformat(osync, "O1", "F5");
+
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F5", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F4", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F5", convert_addtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format5 = osync_conv_find_objformat(env, "F5");
+ OSyncObjType *type = osync_conv_find_objtype(env, "O1");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ fail_unless(osync_change_convert(env, change, format5, NULL), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttesttest"), NULL);
+
+ fail_unless(change->objtype == type, NULL);
+ fail_unless(change->format == format5, NULL);
+}
+END_TEST
+
+START_TEST(conv_prefer_same_objtype)
+{
+ /* Test if the converter is getting the path
+ * that doesn't change the objtype, even
+ * if it is longer.
+ *
+ * Objtypes: F and G
+ *
+ * F1 -- F2 -- F3 -- F5 -- F6
+ * \
+ * --- G1
+ *
+ * The target list will be [ F6, G1 ].
+ *
+ * The result should be F6.
+ */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "F");
+ osync_env_register_objtype(osync, "G");
+
+ osync_env_register_objformat(osync, "F", "F1");
+ osync_env_register_objformat(osync, "F", "F2");
+ osync_env_register_objformat(osync, "F", "F3");
+ osync_env_register_objformat(osync, "F", "F4");
+ osync_env_register_objformat(osync, "F", "F5");
+ osync_env_register_objformat(osync, "F", "F6");
+
+ osync_env_register_objformat(osync, "G", "G1");
+
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F4", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F5", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F5", "F6", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "G1", convert_addtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *f1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *f6 = osync_conv_find_objformat(env, "F6");
+ OSyncObjFormat *g1 = osync_conv_find_objformat(env, "G1");
+ OSyncObjType *typef = osync_conv_find_objtype(env, "F");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, f1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ GList *targets = g_list_append(NULL, g1);
+ targets = g_list_append(targets, f6);
+ fail_unless(osync_conv_convert_fmtlist(env, change, targets), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatesttesttesttesttest"), NULL);
+
+ fail_unless(change->objtype == typef, NULL);
+ fail_unless(change->format == f6, NULL);
+}
+END_TEST
+
+START_TEST(conv_prefer_not_lossy_objtype_change)
+{
+ /* Test if the converter is getting the path
+ * that have no lossy converters, even if
+ * the objtype is being changed.
+ *
+ * Objtypes: F and G
+ *
+ * F1 -- F2 -- F3 -- F5 -- F6
+ * \
+ * --- G1
+ *
+ * The target list will be [ F6, G1 ].
+ *
+ * The converter F2 -> F3 is lossy.
+ *
+ * The result should be G1.
+ */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "F");
+ osync_env_register_objtype(osync, "G");
+
+ osync_env_register_objformat(osync, "F", "F1");
+ osync_env_register_objformat(osync, "F", "F2");
+ osync_env_register_objformat(osync, "F", "F3");
+ osync_env_register_objformat(osync, "F", "F4");
+ osync_env_register_objformat(osync, "F", "F5");
+ osync_env_register_objformat(osync, "F", "F6");
+
+ osync_env_register_objformat(osync, "G", "G1");
+
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest); /* Lossy */
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F4", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F4", "F5", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F5", "F6", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F1", "G1", convert_addtest2);
+ mark_point();
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *f1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *f6 = osync_conv_find_objformat(env, "F6");
+ OSyncObjFormat *g1 = osync_conv_find_objformat(env, "G1");
+ OSyncObjType *typeg = osync_conv_find_objtype(env, "G");
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, f1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+
+ GList *targets = g_list_append(NULL, g1);
+ targets = g_list_append(targets, f6);
+ fail_unless(osync_conv_convert_fmtlist(env, change, targets), NULL);
+ mark_point();
+ char *data = osync_change_get_data(change);
+ fail_unless(!strcmp(data, "datatest2"), NULL);
+
+ fail_unless(change->objtype == typeg, NULL);
+ fail_unless(change->format == g1, NULL);
+}
+END_TEST
+
+START_TEST (conv_env_detect_false)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "F3");
+ osync_env_register_detector(osync, "F1", "F2", detect_true);
+ osync_env_register_detector(osync, "F2", "F3", detect_false);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "F2", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F2", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F2", "F3", convert_addtest2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "F3", "F2", convert_remtest2);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ fail_unless(!osync_change_convert(env, change, format3, NULL), NULL);
+}
+END_TEST
+
+static osync_bool detect_plain_as_f2(OSyncFormatEnv *env, const char *data, int size)
+{
+ return TRUE;
+}
+
+START_TEST (conv_env_decap_and_detect)
+{
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "plain");
+ osync_env_register_objformat(osync, "O1", "F3");
+
+ osync_env_register_detector(osync, "plain", "F2", detect_plain_as_f2);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "plain", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "plain", "F1", convert_remtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F2", convert_remtest);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "data", 5, TRUE);
+
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_change_convert(env, change, format3, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "datatesttest"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format3, NULL);
+
+ fail_unless(osync_change_convert(env, change, format1, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "data"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format1, NULL);
+}
+END_TEST
+
+static osync_bool detect_f2(OSyncFormatEnv *env, const char *data, int size)
+{
+ if (!strcmp(data, "F2"))
+ return TRUE;
+ return FALSE;
+}
+
+static osync_bool convert_f1_to_f2(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ fail_unless(!strcmp(input, "F1"), NULL);
+
+ *free_input = TRUE;
+ *output = g_strdup("F2");
+ *outpsize = 3;
+ return TRUE;
+}
+
+static osync_bool convert_f2_to_f1(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ fail_unless(!strcmp(input, "F2"), NULL);
+
+ *free_input = TRUE;
+ *output = g_strdup("F1");
+ *outpsize = 3;
+ return TRUE;
+}
+
+START_TEST (conv_env_decap_and_detect2)
+{
+ /*This is a more complicated version. Here we specify some data
+ * for the change that needs to be converted and which only gets detected
+ * if it really got converted by the decap */
+ OSyncEnv *osync = init_env_none();
+ osync_env_register_objtype(osync, "O1");
+
+ osync_env_register_objformat(osync, "O1", "F1");
+ osync_env_register_objformat(osync, "O1", "F2");
+ osync_env_register_objformat(osync, "O1", "plain");
+ osync_env_register_objformat(osync, "O1", "F3");
+
+ osync_env_register_detector(osync, "plain", "F2", detect_f2);
+
+ osync_env_register_converter(osync, CONVERTER_DECAP, "F1", "plain", convert_f1_to_f2);
+ osync_env_register_converter(osync, CONVERTER_ENCAP, "plain", "F1", convert_f2_to_f1);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F2", "F3", convert_addtest);
+ osync_env_register_converter(osync, CONVERTER_CONV, "F3", "F2", convert_remtest);
+
+ OSyncFormatEnv *env = osync_conv_env_new(osync);
+ OSyncObjFormat *format1 = osync_conv_find_objformat(env, "F1");
+ OSyncObjFormat *format3 = osync_conv_find_objformat(env, "F3");
+
+ mark_point();
+ OSyncChange *change = osync_change_new();
+ osync_change_set_objformat(change, format1);
+ osync_change_set_data(change, "F1", 3, TRUE);
+
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_change_convert(env, change, format3, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "F2test"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format3, NULL);
+
+ fail_unless(osync_change_convert(env, change, format1, &error), NULL);
+ fail_unless(!strcmp(osync_change_get_data(change), "F1"), NULL);
+ fail_unless(osync_change_get_objformat(change) == format1, NULL);
+}
+END_TEST
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("Conv");
+ //Suite *s2 = suite_create("Conv");
+
+ create_case(s, "conv_env_create", conv_env_create);
+ create_case(s, "conv_env_add_type", conv_env_add_type);
+ create_case(s, "conv_env_add_type_find", conv_env_add_type_find);
+ create_case(s, "conv_env_add_type_find_false", conv_env_add_type_find_false);
+ create_case(s, "conv_env_type_register2", conv_env_type_register2);
+ create_case(s, "conv_env_add_format", conv_env_add_format);
+ create_case(s, "conv_env_set_format_string", conv_env_set_format_string);
+ create_case(s, "conv_env_add_converters", conv_env_add_converters);
+ create_case(s, "conv_env_add_converters_missing", conv_env_add_converters_missing);
+ create_case(s, "conv_env_osp_simple", conv_env_osp_simple);
+ create_case(s, "conv_env_osp_simple2", conv_env_osp_simple2);
+ create_case(s, "conv_env_osp_false", conv_env_osp_false);
+ create_case(s, "conv_env_osp_2way", conv_env_osp_2way);
+ create_case(s, "conv_env_osp_circular_false", conv_env_osp_circular_false);
+ create_case(s, "conv_env_osp_complex", conv_env_osp_complex);
+ create_case(s, "conv_env_convert1", conv_env_convert1);
+ create_case(s, "conv_env_convert_back", conv_env_convert_back);
+ create_case(s, "conv_env_convert_desenc", conv_env_convert_desenc);
+ create_case(s, "conv_env_convert_desenc_complex", conv_env_convert_desenc_complex);
+ create_case(s, "conv_env_detect_and_convert", conv_env_detect_and_convert);
+ create_case(s, "conv_prefer_not_desencap", conv_prefer_not_desencap);
+ create_case(s, "conv_prefer_same_objtype", conv_prefer_same_objtype);
+ create_case(s, "conv_prefer_not_lossy_objtype_change", conv_prefer_not_lossy_objtype_change);
+ create_case(s, "conv_env_detect_false", conv_env_detect_false);
+ create_case(s, "conv_env_decap_and_detect", conv_env_decap_and_detect);
+ create_case(s, "conv_env_decap_and_detect2", conv_env_decap_and_detect2);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_env.c b/debian/opensync/opensync-0.22/tests/check_env.c
new file mode 100644
index 00000000..24a936d6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_env.c
@@ -0,0 +1,219 @@
+#include "support.h"
+
+START_TEST (env_create)
+{
+ char *testbed = setup_testbed(NULL);
+
+ OSyncEnv *os_env = osync_env_new();
+ fail_unless(os_env != NULL, NULL);
+ osync_env_free(os_env);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_init)
+{
+ char *testbed = setup_testbed("env_init");
+
+ OSyncEnv *env = osync_env_new();
+ fail_unless(env != NULL, NULL);
+
+ osync_env_set_option(env, "GROUPS_DIRECTORY", "configs");
+ osync_env_set_option(env, "LOAD_PLUGINS", "FALSE");
+
+ fail_unless(osync_env_initialize(env, NULL), NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_double_init)
+{
+ char *testbed = setup_testbed("env_init");
+ OSyncEnv *env = osync_env_new();
+ fail_unless(env != NULL, NULL);
+
+ osync_env_set_option(env, "GROUPS_DIRECTORY", "configs");
+ osync_env_set_option(env, "LOAD_PLUGINS", "FALSE");
+ fail_unless(osync_env_initialize(env, NULL), NULL);
+ fail_unless(!osync_env_initialize(env, NULL), NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_pre_fin)
+{
+ char *testbed = setup_testbed("env_init");
+ OSyncEnv *env = osync_env_new();
+ fail_unless(env != NULL, NULL);
+
+ osync_env_set_option(env, "GROUPS_DIRECTORY", "configs");
+
+ fail_unless(!osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+
+START_TEST (env_init_false)
+{
+ char *testbed = setup_testbed("sync_setup_false");
+ OSyncEnv *osync = osync_env_new();
+ osync_env_set_option(osync, "GROUPS_DIRECTORY", "configs");
+ osync_env_set_option(osync, "LOAD_PLUGINS", "FALSE");
+ OSyncError *error = NULL;
+ osync_env_initialize(osync, &error);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_init_false2)
+{
+ char *testbed = setup_testbed("sync_setup_false");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+/* FIXME:
+ create a _intended_ test bed for sync_false which breaks:
+ osengine_init()
+ synchronize_once()
+*/
+#if 0
+START_TEST (env_sync_false)
+{
+ char *testbed = setup_testbed("sync_setup_false");
+ OSyncEnv *env = init_env();
+
+ OSyncGroup *group = osync_group_load(env, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+
+ OSyncEngine *engine = osengine_new(group, NULL);
+
+ OSyncError *error = NULL;
+
+ fail_unless(!osengine_init(engine, &error), NULL);
+ fail_unless(!synchronize_once(engine, NULL), NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ group = NULL;
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+#endif
+
+START_TEST (env_check_plugin_true1)
+{
+ char *testbed = setup_testbed(NULL);
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+ fail_unless(osync_env_plugin_is_usable(env, "file-sync", &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_check_plugin_true2)
+{
+ char *testbed = setup_testbed(NULL);
+ setenv("IS_AVAILABLE", "1", TRUE);
+
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+
+ fail_unless(osync_env_plugin_is_usable(env, "file-sync", &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_check_plugin_false)
+{
+ char *testbed = setup_testbed(NULL);
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+ fail_unless(!osync_env_plugin_is_usable(env, "file-syncc", &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (env_check_plugin_false2)
+{
+ char *testbed = setup_testbed(NULL);
+ setenv("IS_AVAILABLE", "1", TRUE);
+ setenv("IS_NOT_AVAILABLE", "1", TRUE);
+
+ OSyncEnv *env = init_env();
+
+ OSyncError *error = NULL;
+
+ fail_unless(!osync_env_plugin_is_usable(env, "file-sync", &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("Env");
+ //Suite *s2 = suite_create("Env");
+ create_case(s, "env_create", env_create);
+ create_case(s, "env_init", env_init);
+ create_case(s, "env_double_init", env_double_init);
+ create_case(s, "env_pre_fin", env_pre_fin);
+ create_case(s, "env_init_false", env_init_false);
+ create_case(s, "env_init_false2", env_init_false2);
+// create_case(s, "env_sync_false", env_sync_false);
+ create_case(s, "env_check_plugin_true1", env_check_plugin_true1);
+ create_case(s, "env_check_plugin_true2", env_check_plugin_true2);
+ create_case(s, "env_check_plugin_false", env_check_plugin_false);
+ create_case(s, "env_check_plugin_false2", env_check_plugin_false2);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_error.c b/debian/opensync/opensync-0.22/tests/check_error.c
new file mode 100644
index 00000000..c555c0c1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_error.c
@@ -0,0 +1,201 @@
+#include <check.h>
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+
+START_TEST (error_create)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test%i", 1);
+ fail_unless(error != NULL, NULL);
+ fail_unless(error->type == OSYNC_ERROR_GENERIC, NULL);
+ fail_unless(!strcmp(error->message, "test1"), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+
+ osync_error_free(&error);
+ fail_unless(error == NULL, NULL);
+}
+END_TEST
+
+START_TEST (error_create_null)
+{
+ osync_error_set(NULL, OSYNC_ERROR_GENERIC, "test%i", 1);
+}
+END_TEST
+
+START_TEST (error_get_name_null)
+{
+ fail_unless(osync_error_get_name(NULL) == NULL, NULL);
+
+}
+END_TEST
+
+START_TEST (error_get_name_null2)
+{
+ OSyncError *error = NULL;
+ fail_unless(osync_error_get_name(&error) != NULL, NULL);
+
+}
+END_TEST
+
+START_TEST (error_get_name)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ fail_unless(osync_error_get_name(&error) != NULL, NULL);
+}
+END_TEST
+
+START_TEST (error_free_null)
+{
+ osync_error_free(NULL);
+
+}
+END_TEST
+
+START_TEST (error_free_null2)
+{
+ OSyncError *error = NULL;
+ osync_error_free(&error);
+
+}
+END_TEST
+
+START_TEST (error_free)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ fail_unless(error != NULL, NULL);
+ osync_error_free(&error);
+ fail_unless(error == NULL, NULL);
+}
+END_TEST
+
+START_TEST (error_check_null)
+{
+ fail_unless(osync_error_is_set(NULL) == FALSE, NULL);
+
+}
+END_TEST
+
+START_TEST (error_check_null2)
+{
+ OSyncError *error = NULL;
+ fail_unless(osync_error_is_set(&error) == FALSE, NULL);
+
+}
+END_TEST
+
+START_TEST (error_check)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ fail_unless(osync_error_is_set(&error) == TRUE, NULL);
+}
+END_TEST
+
+START_TEST (error_check2)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_NO_ERROR, NULL);
+ fail_unless(osync_error_is_set(&error) == FALSE, NULL);
+}
+END_TEST
+
+START_TEST (error_update_null)
+{
+ osync_error_update(NULL, NULL);
+
+}
+END_TEST
+
+START_TEST (error_update_null2)
+{
+ OSyncError *error = NULL;
+ osync_error_update(&error, NULL);
+}
+END_TEST
+
+START_TEST (error_update)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ osync_error_update(&error, "test2%i", 1);
+ fail_unless(!strcmp(error->message, "test21"), NULL);
+}
+END_TEST
+
+START_TEST (error_update2)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "test");
+ osync_error_update(&error, "test2%s", error->message);
+ fail_unless(!strcmp(error->message, "test2test"), NULL);
+}
+END_TEST
+
+START_TEST (error_set_null)
+{
+ osync_error_set(NULL, OSYNC_NO_ERROR, NULL);
+
+}
+END_TEST
+
+START_TEST (error_set_null2)
+{
+ OSyncError *error = NULL;
+ osync_error_update(&error, OSYNC_NO_ERROR, NULL);
+}
+END_TEST
+
+START_TEST (error_duplicate_null)
+{
+ OSyncError *error = NULL;
+ osync_error_set(&error, OSYNC_ERROR_GENERIC, "asd");
+ osync_error_duplicate(NULL, &error);
+}
+END_TEST
+
+Suite *error_suite(void)
+{
+ Suite *s = suite_create("Error");
+ TCase *tc_error = tcase_create("Core");
+
+ suite_add_tcase (s, tc_error);
+ tcase_add_test(tc_error, error_create);
+ tcase_add_test(tc_error, error_create_null);
+ tcase_add_test(tc_error, error_get_name_null);
+ tcase_add_test(tc_error, error_get_name_null2);
+ tcase_add_test(tc_error, error_get_name);
+ tcase_add_test(tc_error, error_free_null);
+ tcase_add_test(tc_error, error_free_null2);
+ tcase_add_test(tc_error, error_free);
+ tcase_add_test(tc_error, error_check_null);
+ tcase_add_test(tc_error, error_check_null2);
+ tcase_add_test(tc_error, error_check);
+ tcase_add_test(tc_error, error_check2);
+ tcase_add_test(tc_error, error_update_null);
+ tcase_add_test(tc_error, error_update_null2);
+ tcase_add_test(tc_error, error_update);
+ tcase_add_test(tc_error, error_update2);
+ tcase_add_test(tc_error, error_set_null);
+ tcase_add_test(tc_error, error_set_null2);
+ tcase_add_test(tc_error, error_duplicate_null);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = error_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_filter.c b/debian/opensync/opensync-0.22/tests/check_filter.c
new file mode 100644
index 00000000..6d39c506
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_filter.c
@@ -0,0 +1,343 @@
+#include "support.h"
+
+START_TEST (filter_setup)
+{
+ char *testbed = setup_testbed("filter_setup");
+ OSyncEnv *osync = init_env();
+
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ OSyncFilter *filter = osync_filter_add(group, leftmember, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ fail_unless(filter != NULL, NULL);
+
+ mark_point();
+ fail_unless(osync_group_num_filters(group) == 1, NULL);
+ fail_unless(osync_group_nth_filter(group, 0) == filter, NULL);
+
+ mark_point();
+ osync_filter_remove(group, filter);
+ fail_unless(osync_group_num_filters(group) == 0, NULL);
+ osync_filter_free(filter);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_flush)
+{
+ char *testbed = setup_testbed("filter_setup");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ OSyncFilter *filter1 = osync_filter_add(group, leftmember, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ OSyncFilter *filter2 = osync_filter_add(group, leftmember, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter2 != NULL, NULL);
+
+ mark_point();
+ fail_unless(osync_group_num_filters(group) == 2, NULL);
+ fail_unless(osync_group_nth_filter(group, 0) == filter1, NULL);
+ fail_unless(osync_group_nth_filter(group, 1) == filter2, NULL);
+
+ mark_point();
+ osync_group_flush_filters(group);
+ fail_unless(osync_group_num_filters(group) == 0, NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_sync_deny_all)
+{
+ OSyncError *error = NULL;
+ char *testbed = setup_testbed("filter_sync_deny_all");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ /* add filter and save the group */
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+
+ osync_filter_add(group, leftmember, NULL, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ osync_filter_add(group, NULL, leftmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+
+ fail_unless(osync_group_save(group, &error), NULL);
+
+ fail_unless(osync_env_finalize(osync, NULL), NULL);
+ osync_env_free(osync);
+
+ /* ... unload and load the group again ... to parse the filter config (also for the members) .. */
+ osync = init_env();
+
+ mark_point();
+
+ group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+
+ /* do the evil sync stuff.. */
+ mark_point();
+ OSyncEngine *engine = osengine_new(group, &error);
+
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(osync_group_num_filters(group) == 2, NULL);
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"xtestdata\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"xtestdata2\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_sync_custom)
+{
+ char *testbed = setup_testbed("filter_sync_custom");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncFilter *filter = osync_filter_add_custom(group, NULL, NULL, NULL, NULL, "contact", "vcard_categories_filter");
+ osync_filter_set_config(filter, "test");
+
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+static OSyncFilterAction vcard_cats(OSyncChange *change, char *config)
+{
+ //Check what categories are supported here.
+ return OSYNC_FILTER_IGNORE;
+}
+
+START_TEST (filter_save_and_load)
+{
+ char *testbed = setup_testbed("filter_save_and_load");
+ OSyncEnv *osync = init_env();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "format1");
+ osync_env_register_filter_function(osync, "vcard_cats", "test", "format1", vcard_cats);
+
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ OSyncFilter *filter1 = osync_filter_add(group, leftmember, rightmember, "1", "2", "3", OSYNC_FILTER_DENY);
+ OSyncFilter *filter2 = osync_filter_add(group, rightmember, leftmember, "4", "5", "6", OSYNC_FILTER_ALLOW);
+ OSyncFilter *filter3 = osync_filter_add_custom(group, leftmember, rightmember, "7", "8", "9", "vcard_cats");
+ osync_filter_set_config(filter3, "test");
+
+ fail_unless(osync_group_num_filters(group) == 3, NULL);
+ fail_unless(osync_group_nth_filter(group, 0) == filter1, NULL);
+ fail_unless(osync_group_nth_filter(group, 1) == filter2, NULL);
+ fail_unless(osync_group_nth_filter(group, 2) == filter3, NULL);
+
+ mark_point();
+ osync_group_save(group, NULL);
+ mark_point();
+ osync_env_finalize(osync, NULL);
+ osync_env_free(osync);
+ osync = init_env();
+ osync_env_register_objtype(osync, "test");
+ osync_env_register_objformat(osync, "test", "format1");
+ osync_env_register_filter_function(osync, "vcard_cats", "test", "format1", vcard_cats);
+ group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ fail_unless(osync_group_num_filters(group) == 3, NULL);
+ filter1 = osync_group_nth_filter(group, 0);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter1->sourcememberid == 1, NULL);
+ fail_unless(filter1->destmemberid == 2, NULL);
+ fail_unless(!strcmp(filter1->sourceobjtype, "1"), NULL);
+ fail_unless(!strcmp(filter1->destobjtype, "2"), NULL);
+ fail_unless(!strcmp(filter1->detectobjtype, "3"), NULL);
+ fail_unless(filter1->action == OSYNC_FILTER_DENY, NULL);
+
+ filter1 = osync_group_nth_filter(group, 1);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter1->sourcememberid == 2, NULL);
+ fail_unless(filter1->destmemberid == 1, NULL);
+ fail_unless(!strcmp(filter1->sourceobjtype, "4"), NULL);
+ fail_unless(!strcmp(filter1->destobjtype, "5"), NULL);
+ fail_unless(!strcmp(filter1->detectobjtype, "6"), NULL);
+ fail_unless(filter1->action == OSYNC_FILTER_ALLOW, NULL);
+
+ filter1 = osync_group_nth_filter(group, 2);
+ fail_unless(filter1 != NULL, NULL);
+ fail_unless(filter1->sourcememberid == 1, NULL);
+ fail_unless(filter1->destmemberid == 2, NULL);
+ fail_unless(!strcmp(filter1->sourceobjtype, "7"), NULL);
+ fail_unless(!strcmp(filter1->destobjtype, "8"), NULL);
+ fail_unless(!strcmp(filter1->detectobjtype, "9"), NULL);
+ fail_unless(filter1->hook != NULL, NULL);
+ fail_unless(!strcmp(osync_filter_get_config(filter1), "test"), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (filter_sync_vcard_only)
+{
+ char *testbed = setup_testbed("filter_sync_vcard_only");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *rightmember = osync_group_nth_member(group, 1);
+
+ osync_filter_add(group, NULL, rightmember, NULL, NULL, NULL, OSYNC_FILTER_DENY);
+ osync_filter_add(group, NULL, rightmember, NULL, NULL, "contact", OSYNC_FILTER_ALLOW);
+
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osync_env_finalize(osync, NULL);
+ osync_env_free(osync);
+
+ fail_unless(!system("test \"x$(ls data1/testdata)\" = \"xdata1/testdata\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/testdata2)\" = \"xdata1/testdata2\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/testdata3)\" = \"xdata1/testdata3\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/vcard.vcf)\" = \"xdata1/vcard.vcf\""), NULL);
+
+ fail_unless(!system("test \"x$(ls data2/testdata3)\" = \"xdata2/testdata3\""), NULL);
+ fail_unless(!system("test \"x$(ls data2/vcard.vcf)\" = \"xdata2/vcard.vcf\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST(filter_destobjtype_delete)
+{
+ /* Check if the destobjtype of the changes is being
+ * set when the change type os DELETE */
+ char *testbed = setup_testbed("destobjtype_delete");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ mark_point();
+
+ /* Synchronize once, delete a file, and synchronize again */
+
+ fail_unless(!system("rm data1/file"), NULL);
+
+ synchronize_once(engine, NULL);
+ mark_point();
+ osengine_finalize(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+/*int num_read;
+
+START_TEST (filter_sync_read_only)
+{
+ char *testbed = setup_testbed("filter_sync_deny_all");
+ OSyncEnv *osync = osync_env_new();
+ osync_env_initialize(osync, NULL);
+ mark_point();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ mark_point();
+
+ OSyncMember *leftmember = osync_group_nth_member(group, 0);
+
+ osync_member_set_read_only(leftmember, "data", TRUE);
+
+ num_read = 0;
+ mark_point();
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_read == 1);
+
+ fail_unless(!system("test \"x$(ls data1/testdata)\" = \"xdata1/testdata\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/testdata2)\" = \"xdata1/testdata2\""), NULL);
+ fail_unless(!system("test \"x$(ls data2/testdata2)\" = \"xdata2/testdata2\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST*/
+
+Suite *filter_suite(void)
+{
+ Suite *s = suite_create("Filter");
+ //Suite *s2 = suite_create("Filter");
+
+ create_case(s, "filter_setup", filter_setup);
+ create_case(s, "filter_flush", filter_flush);
+ create_case(s, "filter_sync_deny_all", filter_sync_deny_all);
+ create_case(s, "filter_sync_custom", filter_sync_custom);
+ create_case(s, "filter_save_and_load", filter_save_and_load);
+ create_case(s, "filter_sync_vcard_only", filter_sync_vcard_only);
+ create_case(s, "filter_destobjtype_delete", filter_destobjtype_delete);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = filter_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_group.c b/debian/opensync/opensync-0.22/tests/check_group.c
new file mode 100644
index 00000000..91d84773
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_group.c
@@ -0,0 +1,62 @@
+#include "support.h"
+
+START_TEST (group_last_sync)
+{
+ char *testbed = setup_testbed("filter_save_and_load");
+
+ OSyncEnv *env = init_env();
+ OSyncGroup *group = osync_group_load(env, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(env) == 1, NULL);
+ mark_point();
+
+ osync_group_set_last_synchronization(group, (time_t)1000);
+
+ fail_unless((int)osync_group_get_last_synchronization(group) == 1000, NULL);
+
+ OSyncError *error = NULL;
+ fail_unless(osync_group_save(group, &error), NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+
+ env = init_env();
+ group = osync_group_load(env, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(env) == 1, NULL);
+ mark_point();
+
+ fail_unless((int)osync_group_get_last_synchronization(group) == 1000, NULL);
+
+ fail_unless(osync_env_finalize(env, NULL), NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *group_suite(void)
+{
+ Suite *s = suite_create("Group");
+ TCase *tc_core = tcase_create("Core");
+
+ suite_add_tcase (s, tc_core);
+ tcase_add_test(tc_core, group_last_sync);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = group_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_ipc.c b/debian/opensync/opensync-0.22/tests/check_ipc.c
new file mode 100644
index 00000000..5cde12ae
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_ipc.c
@@ -0,0 +1,2093 @@
+#include "support.h"
+#include <sys/wait.h>
+
+void _remove_pipe(const char *name)
+{
+ char *cmd = g_strdup_printf("rm %s &> /dev/null", name);
+ system(cmd);
+ g_free(cmd);
+}
+
+START_TEST (ipc_new)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue1 = osync_queue_new("/tmp/testpipe", &error);
+ fail_unless(queue1 != NULL, NULL);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_free(queue1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_create)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue1 = osync_queue_new("/tmp/testpipe", &error);
+ fail_unless(queue1 != NULL, NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_create(queue1, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(queue1, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(queue1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_connect)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue = osync_queue_new("/tmp/testpipe", &error);
+
+ osync_queue_create(queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ if (osync_queue_disconnect(queue, &error) != TRUE || error != NULL)
+ exit(1);
+
+ osync_queue_free(queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_disconnect(queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+
+ }
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(queue, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen(data) + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+ osync_message_unref(reply);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ while (!(message = osync_queue_get_message(server_queue))) {
+ usleep(100000);
+ }
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ while (!(message = osync_queue_get_message(client_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload_wait)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ sleep(1);
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (!(message = osync_queue_get_message(client_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ int int1;
+ long long int longint1;
+ char *string;
+ char databuf[strlen(data) + 1];
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_data(message, databuf, strlen(data) + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ sleep(1);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ sleep(1);
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ while (!(message = osync_queue_get_message(server_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+ sleep(1);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ while (!(message = osync_queue_get_message(server_queue))) {
+ usleep(100000);
+ }
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ while (!(message = osync_queue_get_message(client_queue))) {
+ usleep(10000);
+ }
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload_stress)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ int num_mess = 1000;
+ int size = 100;
+
+ char *data = malloc(size);
+ memset(data, 42, size);
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (num_mess > 0) {
+ osync_trace(TRACE_INTERNAL, "Waiting for message");
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ osync_trace(TRACE_INTERNAL, "Parsing message");
+ char databuf[size];
+
+ osync_message_read_data(message, databuf, size);
+
+ fail_unless(!memcmp(databuf, data, size), NULL);
+
+ osync_trace(TRACE_INTERNAL, "Creating new reply");
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_INTERNAL, "Sending reply");
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ num_mess--;
+ }
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (num_mess > 0) {
+ osync_trace(TRACE_INTERNAL, "Creating new message");
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_data(message, data, size);
+
+ osync_trace(TRACE_INTERNAL, "Sending message");
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ osync_trace(TRACE_INTERNAL, "Waiting for message");
+ message = osync_queue_get_message(server_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+
+ num_mess--;
+ }
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_payload_stress2)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+ int i = 0;
+
+ int num_mess = 1000;
+ int size = 100;
+
+ char *data = malloc(size);
+ memset(data, 42, size);
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ char databuf[size];
+
+ osync_message_read_data(message, databuf, size);
+
+ fail_unless(!memcmp(databuf, data, size), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+
+ for (i = 0; i < num_mess; i++) {
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_data(message, data, size);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_queue_get_message(server_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+ }
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_large_payload)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+ int i = 0;
+
+ int num_mess = 10;
+ int size = 1024 * 1024 * 20; //20mbyte
+
+ char *data = malloc(size);
+ memset(data, 42, size);
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ OSyncQueue *client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_INITIALIZE) {
+ exit (1);
+ }
+
+ void *databuf = NULL;
+ osync_message_read_const_data(message, &databuf, size);
+
+ if (memcmp(databuf, data, size))
+ exit(1);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_message_unref(message);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+ }
+
+ if (osync_queue_disconnect(client_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(client_queue);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ for (i = 0; i < num_mess; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_data(message, data, size);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(server_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ osync_message_unref(message);
+ }
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(client_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(data);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_no_pipe)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue1 = osync_queue_new("/tmp/testpipe", &error);
+ fail_unless(queue1 != NULL, NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(!osync_queue_connect(queue1, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error != NULL, NULL);
+ osync_error_free(&error);
+
+ osync_queue_free(queue1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_perm)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *queue = osync_queue_new("/tmp/testpipe", &error);
+
+ osync_queue_create(queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ if (system("chmod 000 /tmp/testpipe"))
+ abort();
+
+ fail_unless(!osync_queue_connect(queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error != NULL, NULL);
+ osync_error_free(&error);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(queue, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_rem)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ osync_assert(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error));
+ osync_assert(error == NULL);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_error_rem2)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe");
+
+ OSyncError *error = NULL;
+ OSyncQueue *server_queue = osync_queue_new("/tmp/testpipe", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ osync_assert(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_int(server_queue, 10000, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_int(server_queue, 0, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_long_long_int(server_queue, 0, &error));
+ osync_assert(error == NULL);
+
+ osync_assert(_osync_queue_write_int(server_queue, 0, &error));
+ osync_assert(error == NULL);
+
+ sleep(1);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_ERROR);
+ osync_message_unref(message);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe &> /dev/null") != 0, NULL);
+
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+OSyncQueue *server_queue = NULL;
+OSyncQueue *client_queue = NULL;
+
+void server_handler1(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void client_handler1(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_loop_payload)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+ osync_queue_set_message_handler(client_queue, client_handler1, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ osync_queue_set_message_handler(server_queue, server_handler1, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+int num_msgs = 0;
+int req_msgs = 1000;
+
+void server_handler2(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+ char *data = "this is another test string";
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+
+ num_msgs++;
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ if (num_msgs >= req_msgs) {
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+ } else {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void client_handler2(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_loop_stress)
+{
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+void callback_handler(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) == 1);
+
+ num_msgs++;
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+
+ if (num_msgs >= req_msgs) {
+ osync_queue_disconnect(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void server_handler3(OSyncMessage *message, void *user_data)
+{
+ abort();
+}
+
+void client_handler3(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_loop_callback)
+{
+ num_msgs = 0;
+
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler3, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+
+ osync_message_unref(message);
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler3, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ int i = 0;
+ for (i = 0; i < req_msgs; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ osync_message_set_handler(message, callback_handler, GINT_TO_POINTER(1));
+
+ fail_unless(osync_queue_send_message(client_queue, server_queue, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+int stop_after = 500;
+
+void callback_handler2(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+
+ osync_assert(GPOINTER_TO_INT(user_data) == 1);
+
+ if (num_msgs >= stop_after) {
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_ERRORREPLY);
+ } else {
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_REPLY);
+ }
+
+ num_msgs++;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+int num_msgs2 = 0;
+
+void server_handler4(OSyncMessage *message, void *user_data)
+{
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP || osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_ERROR);
+}
+
+void client_handler4(OSyncMessage *message, void *user_data)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, message, user_data);
+ OSyncError *error = NULL;
+
+ osync_assert(GPOINTER_TO_INT(user_data) ==1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ if (num_msgs2 >= stop_after) {
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+ } else {
+ OSyncMessage *reply = osync_message_new_reply(message, &error);
+
+ osync_queue_send_message(server_queue, NULL, reply, &error);
+
+ osync_message_unref(reply);
+ }
+
+ num_msgs2++;
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+START_TEST (ipc_callback_break)
+{
+ num_msgs = 0;
+
+ char *testbed = setup_testbed(NULL);
+ _remove_pipe("/tmp/testpipe-server");
+ _remove_pipe("/tmp/testpipe-client");
+
+ OSyncError *error = NULL;
+ server_queue = osync_queue_new("/tmp/testpipe-server", &error);
+ client_queue = osync_queue_new("/tmp/testpipe-client", &error);
+ OSyncMessage *message = NULL;
+
+ osync_queue_create(server_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_create(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (osync_queue_is_connected(client_queue)) { usleep(100); }
+
+ osync_assert(osync_queue_disconnect(server_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ int i = 0;
+ for (i = 0; i < req_msgs; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ osync_message_set_handler(message, callback_handler2, GINT_TO_POINTER(1));
+
+ fail_unless(osync_queue_send_message(client_queue, server_queue, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ while (num_msgs < req_msgs) { usleep(100); };
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_disconnect(server_queue, &error);
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") == 0, NULL);
+
+ fail_unless(osync_queue_remove(client_queue, &error), NULL);
+ fail_unless(osync_queue_remove(server_queue, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ fail_unless(system("ls /tmp/testpipe-client &> /dev/null") != 0, NULL);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+
+START_TEST (ipc_pipes)
+{
+ char *testbed = setup_testbed(NULL);
+
+ OSyncError *error = NULL;
+ OSyncQueue *read1 = NULL;
+ OSyncQueue *write1 = NULL;
+ char *data = "this is another test string";
+
+ osync_assert(osync_queue_new_pipes(&read1, &write1, &error));
+ osync_assert(error == NULL);
+
+ fail_unless(osync_queue_connect(read1, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(write1, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ OSyncMessage *message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(write1, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(read1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_INITIALIZE);
+
+ int int1;
+ long long int longint1;
+ char *string;
+ void *databuf;
+
+ osync_message_read_int(message, &int1);
+ osync_message_read_const_string(message, &string);
+ osync_message_read_long_long_int(message, &longint1);
+ osync_message_read_const_data(message, &databuf, strlen("this is another test string") + 1);
+
+ fail_unless(int1 == 4000000, NULL);
+ fail_unless(!strcmp(string, "this is a test string"), NULL);
+ fail_unless(longint1 == 400000000, NULL);
+ fail_unless(!strcmp(databuf, "this is another test string"), NULL);
+
+ osync_message_unref(message);
+
+ osync_assert(osync_queue_disconnect(read1, &error));
+ osync_assert(error == NULL);
+
+ message = osync_queue_get_message(write1);
+ osync_assert(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+ osync_message_unref(message);
+
+ osync_assert(osync_queue_disconnect(write1, &error));
+ osync_assert(error == NULL);
+
+
+ osync_queue_free(read1);
+ osync_queue_free(write1);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_pipes_stress)
+{
+ char *testbed = setup_testbed(NULL);
+
+ OSyncError *error = NULL;
+ OSyncQueue *read1 = NULL;
+ OSyncQueue *read2 = NULL;
+ OSyncQueue *write1 = NULL;
+ OSyncQueue *write2 = NULL;
+
+
+ // First the pipe from the parent to the child
+ osync_assert(osync_queue_new_pipes(&read1, &write1, &error));
+ osync_assert(error == NULL);
+
+ // Then the pipe from the child to the parent
+ osync_assert(osync_queue_new_pipes(&read2, &write2, &error));
+ osync_assert(error == NULL);
+
+ OSyncMessage *message = NULL;
+
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ osync_assert(osync_queue_disconnect(write1, &error));
+ osync_queue_free(write1);
+
+ osync_assert(osync_queue_disconnect(read2, &error));
+ osync_queue_free(read2);
+
+ client_queue = read1;
+ server_queue = write2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_queue_get_message(server_queue);
+ if (osync_message_get_command(message) != OSYNC_MESSAGE_QUEUE_HUP) {
+ exit (1);
+ }
+ osync_message_unref(message);
+
+
+ if (osync_queue_disconnect(server_queue, &error) != TRUE || error != NULL)
+ exit(1);
+ osync_queue_free(server_queue);
+
+ osync_assert(osync_queue_disconnect(client_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+
+ g_free(testbed);
+
+ exit(0);
+ } else {
+
+ osync_assert(osync_queue_disconnect(write2, &error));
+ osync_queue_free(write2);
+
+ osync_assert(osync_queue_disconnect(read1, &error));
+ osync_queue_free(read1);
+
+ client_queue = write1;
+ server_queue = read2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler2, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ fail_unless(osync_queue_send_message(client_queue, NULL, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+
+ message = osync_queue_get_message(client_queue);
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (ipc_callback_break_pipes)
+{
+ num_msgs = 0;
+
+ char *testbed = setup_testbed(NULL);
+
+ OSyncError *error = NULL;
+ OSyncQueue *read1 = NULL;
+ OSyncQueue *read2 = NULL;
+ OSyncQueue *write1 = NULL;
+ OSyncQueue *write2 = NULL;
+ OSyncMessage *message = NULL;
+
+ // First the pipe from the parent to the child
+ osync_assert(osync_queue_new_pipes(&read1, &write1, &error));
+ osync_assert(error == NULL);
+
+ // Then the pipe from the child to the parent
+ osync_assert(osync_queue_new_pipes(&read2, &write2, &error));
+ osync_assert(error == NULL);
+
+ char *data = "this is another test string";
+
+ pid_t cpid = fork();
+ if (cpid == 0) { //Child
+
+ osync_assert(osync_queue_disconnect(write1, &error));
+ osync_queue_free(write1);
+
+ osync_assert(osync_queue_disconnect(read2, &error));
+ osync_queue_free(read2);
+
+ client_queue = read1;
+ server_queue = write2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(client_queue, client_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(client_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ while (osync_queue_is_connected(client_queue)) { usleep(100); }
+
+ osync_assert(osync_queue_disconnect(server_queue, &error));
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ g_free(testbed);
+ exit(0);
+ } else {
+
+ osync_assert(osync_queue_disconnect(write2, &error));
+ osync_queue_free(write2);
+
+ osync_assert(osync_queue_disconnect(read1, &error));
+ osync_queue_free(read1);
+
+ client_queue = write1;
+ server_queue = read2;
+
+ GMainContext *context = g_main_context_new();
+ OSyncThread *thread = osync_thread_new(context, &error);
+
+ osync_queue_set_message_handler(server_queue, server_handler4, GINT_TO_POINTER(1));
+
+ osync_queue_setup_with_gmainloop(server_queue, context);
+
+ osync_thread_start(thread);
+
+ fail_unless(osync_queue_connect(client_queue, OSYNC_QUEUE_SENDER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ fail_unless(osync_queue_connect(server_queue, OSYNC_QUEUE_RECEIVER, &error), NULL);
+ fail_unless(error == NULL, NULL);
+
+ int i = 0;
+ for (i = 0; i < req_msgs; i++) {
+ message = osync_message_new(OSYNC_MESSAGE_INITIALIZE, 0, &error);
+ fail_unless(message != NULL, NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_write_int(message, 4000000);
+ osync_message_write_string(message, "this is a test string");
+ osync_message_write_long_long_int(message, 400000000);
+ osync_message_write_data(message, data, strlen(data) + 1);
+
+ osync_message_set_handler(message, callback_handler2, GINT_TO_POINTER(1));
+
+ fail_unless(osync_queue_send_message(client_queue, server_queue, message, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ osync_message_unref(message);
+ }
+
+ message = osync_queue_get_message(client_queue);
+
+ fail_unless(osync_message_get_command(message) == OSYNC_MESSAGE_QUEUE_HUP);
+
+ osync_message_unref(message);
+
+ while (num_msgs < req_msgs) { usleep(100); };
+
+ osync_queue_disconnect(client_queue, &error);
+ fail_unless(error == NULL, NULL);
+
+ osync_queue_disconnect(server_queue, &error);
+ osync_assert(error == NULL);
+
+ osync_thread_stop(thread);
+ osync_thread_free(thread);
+
+ int status = 0;
+ wait(&status);
+ fail_unless(WEXITSTATUS(status) == 0, NULL);
+ }
+
+ osync_queue_free(client_queue);
+ osync_queue_free(server_queue);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *ipc_suite(void)
+{
+ Suite *s = suite_create("IPC");
+ //Suite *s2 = suite_create("IPC");
+
+ create_case(s, "ipc_new", ipc_new);
+ create_case(s, "ipc_create", ipc_create);
+ create_case(s, "ipc_connect", ipc_connect);
+ create_case(s, "ipc_payload", ipc_payload);
+ create_case(s, "ipc_payload_wait", ipc_payload_wait);
+ create_case(s, "ipc_payload_stress", ipc_payload_stress);
+ create_case(s, "ipc_payload_stress2", ipc_payload_stress2);
+ create_case(s, "ipc_large_payload", ipc_large_payload);
+
+ create_case(s, "ipc_error_no_pipe", ipc_error_no_pipe);
+ create_case(s, "ipc_error_perm", ipc_error_perm);
+ create_case(s, "ipc_error_rem", ipc_error_rem);
+ create_case(s, "ipc_error_rem2", ipc_error_rem2);
+
+ create_case(s, "ipc_loop_payload", ipc_loop_payload);
+ create_case(s, "ipc_loop_stress", ipc_loop_stress);
+ create_case(s, "ipc_loop_callback", ipc_loop_callback);
+ create_case(s, "ipc_callback_break", ipc_callback_break);
+
+ create_case(s, "ipc_pipes", ipc_pipes);
+ create_case(s, "ipc_pipes_stress", ipc_pipes_stress);
+ create_case(s, "ipc_callback_break_pipes", ipc_callback_break_pipes);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = ipc_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_lock.c b/debian/opensync/opensync-0.22/tests/check_lock.c
new file mode 100644
index 00000000..245ea419
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_lock.c
@@ -0,0 +1,275 @@
+#include "support.h"
+
+START_TEST (simple_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (simple_lock_stale)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (simple_seq_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (simple_seq_stale_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_STALE, NULL);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ fail_unless(osync_group_lock(group) == OSYNC_LOCKED, NULL);
+
+ osync_group_unlock(group, TRUE);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_lock2)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ OSyncGroup *group2 = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+ fail_unless(osync_group_lock(group2) == OSYNC_LOCKED, NULL);
+
+ osync_group_unlock(group, TRUE);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multi_unlock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ osync_group_unlock(group, TRUE);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_OK, NULL);
+
+ osync_group_unlock(group, FALSE);
+ osync_group_unlock(group, TRUE);
+
+ fail_unless(osync_group_lock(group) == OSYNC_LOCK_STALE, NULL);
+
+ osync_group_unlock(group, TRUE);
+ osync_group_unlock(group, FALSE);
+
+ fail_unless(!g_file_test("configs/group/lock", G_FILE_TEST_EXISTS), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+#if 0
+START_TEST (dual_sync_engine_lock)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ OSyncGroup *group2 = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ OSyncEngine *engine2 = osengine_new(group2, &error);
+ osengine_set_enginestatus_callback(engine2, engine_status, NULL);
+
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(!osengine_init(engine2, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+ osync_error_free(&error);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ fail_unless(!synchronize_once(engine2, &error), NULL);
+ fail_unless(osync_error_is_set(&error), NULL);
+ osync_error_free(&error);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(osengine_init(engine2, &error), NULL);
+ fail_unless(synchronize_once(engine2, &error), NULL);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ osengine_finalize(engine2);
+
+ osengine_free(engine);
+ osengine_free(engine2);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (dual_sync_engine_unclean)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ fail_unless(!osync_group_get_slow_sync(group, "data"), NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+
+ fail_unless(osengine_init(engine, &error), NULL);
+
+ /* Quit the engine thread, before free()ing it
+ *
+ * We want to simulate a unclean engine exit (so we can't use
+ * osengine_finalize() here), but we don't want the old engine thread to
+ * be running and stealing the messages going to the second engine.
+ */
+ if (engine->thread) {
+ g_main_loop_quit(engine->syncloop);
+ g_thread_join(engine->thread);
+ }
+
+ osengine_free(engine);
+ osync_group_free(group);
+
+ group = osync_group_load(osync, "configs/group", NULL);
+ engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+
+ fail_unless(!osync_group_get_slow_sync(engine->group, "data"), NULL);
+
+ num_engine_prev_unclean = 0;
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(num_engine_prev_unclean == 1, NULL);
+
+ fail_unless(osync_group_get_slow_sync(engine->group, "data"), NULL);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ osync_group_free(group);
+
+ group = osync_group_load(osync, "configs/group", NULL);
+ engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+
+ fail_unless(!osync_group_get_slow_sync(engine->group, "data"), NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ fail_unless(!osync_group_get_slow_sync(engine->group, "data"), NULL);
+
+ fail_unless(synchronize_once(engine, &error), NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" == \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" == \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+#endif
+
+Suite *lock_suite(void)
+{
+ Suite *s = suite_create("Locks");
+ //Suite *s2 = suite_create("Locks");
+ create_case(s, "simple_lock", simple_lock);
+ create_case(s, "simple_lock_stale", simple_lock_stale);
+ create_case(s, "simple_seq_lock", simple_seq_lock);
+ create_case(s, "simple_seq_stale_lock", simple_seq_stale_lock);
+ create_case(s, "dual_lock", dual_lock);
+ create_case(s, "dual_lock2", dual_lock2);
+ create_case(s, "multi_unlock", multi_unlock);
+/* create_case(s, "dual_sync_engine_lock", dual_sync_engine_lock);
+ create_case(s, "dual_sync_engine_unclean", dual_sync_engine_unclean);*/
+
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = lock_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_member.c b/debian/opensync/opensync-0.22/tests/check_member.c
new file mode 100644
index 00000000..ec5bad0c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_member.c
@@ -0,0 +1,42 @@
+#include <check.h>
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include <stdlib.h>
+
+#include <glib.h>
+#include <gmodule.h>
+
+START_TEST (test_create)
+{
+ OSyncMember *member = NULL;
+ member = osync_member_new(NULL);
+ fail_unless(member != NULL, "Member == NULL on creation");
+}
+END_TEST
+
+Suite *member_suite(void)
+{
+ Suite *s = suite_create("Member");
+ TCase *tc_core = tcase_create("Core");
+
+ suite_add_tcase (s, tc_core);
+ tcase_add_test(tc_core, test_create);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = member_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_multisync.c b/debian/opensync/opensync-0.22/tests/check_multisync.c
new file mode 100644
index 00000000..28f547d9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_multisync.c
@@ -0,0 +1,1829 @@
+#include "support.h"
+
+START_TEST (multisync_easy_new)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_easy_mod)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts = 1, NULL);
+
+ sleep(2);
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_dual_mod)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+ system("cp newdata data1/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_triple_mod)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+ system("cp newdata data1/testdata");
+ system("cp newdata data2/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_engine_end_conflicts = 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_dual_new)
+{
+ char *testbed = setup_testbed("multisync_easy_new_partial");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+
+START_TEST (multisync_triple_new)
+{
+ char *testbed = setup_testbed("multisync_easy_new_partial2");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 0, NULL);
+ fail_unless(num_read == 3, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_easy_del)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 1, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_dual_del)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_triple_del)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data2/testdata");
+ system("rm -f data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_choose)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, GINT_TO_POINTER(2));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_choose2)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose2");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);;
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_choose)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+
+ num_written = 0;
+ num_read = 0;
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_choose2)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_deleted, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_hybrid_choose)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_modified, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+ system("cp newdata2 data2/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_hybrid_choose2)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_deleted, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+ system("cp newdata2 data2/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_duplicate)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 5, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata");
+
+ synchronize_once(engine, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata-dupe");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_data_duplicate2)
+{
+ char *testbed = setup_testbed("multisync_conflict_data_duplicate2");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 8, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data3/testdata data3/testdata-dupe-dupe");
+
+ synchronize_once(engine, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata-dupe");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_duplicate)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data1/testdata");
+ system("cp newdata data3/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_changetype_duplicate2)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("rm -f data3/testdata");
+ system("cp newdata2 data1/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 2, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, 0, 3, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_conflict_hybrid_duplicate)
+{
+ char *testbed = setup_testbed("multisync_conflict_changetype_choose");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("cp newdata data3/testdata");
+ system("cp newdata2 data1/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 5, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata data2/testdata-dupe");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_multi_conflict)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(3));
+
+ system("cp newdata data3/testdata1");
+ system("cp newdata1 data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ //Change statuses
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_read_info == 0, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 6, NULL);
+ fail_unless(num_written_errors == 0, NULL);
+ fail_unless(num_recv_errors == 0, NULL);
+
+ //Member statuses
+ fail_unless(num_connected == 3, NULL);
+ fail_unless(num_disconnected == 3, NULL);
+ fail_unless(num_member_comitted_all == 3, NULL);
+ fail_unless(num_member_sent_changes == 3, NULL);
+ fail_unless(num_member_connect_errors == 0, NULL);
+ fail_unless(num_member_get_changes_errors == 0, NULL);
+ fail_unless(num_member_sync_done_errors == 0, NULL);
+ fail_unless(num_member_disconnect_errors == 0, NULL);
+ fail_unless(num_member_comitted_all_errors == 0, NULL);
+
+ //Engine statuses
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_engine_errors == 0, NULL);
+ fail_unless(num_engine_successfull == 1, NULL);
+ fail_unless(num_engine_prev_unclean == 0, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("cp newdata data3/testdata");
+
+ system("cp newdata3 data1/testdata1");
+ system("cp newdata4 data3/testdata1");
+
+ system("cp newdata data1/testdata2");
+ system("cp newdata5 data3/testdata2");
+ system("rm -f data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_read == 7, NULL);
+ fail_unless(num_conflicts == 3, NULL);
+ fail_unless(num_written == 12, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 5, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1-dupe", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2-dupe", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 5);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ check_hash(table, "testdata1-dupe");
+ check_hash(table, "testdata2-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 5);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ check_hash(table, "testdata1-dupe");
+ check_hash(table, "testdata2-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 5);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ check_hash(table, "testdata1-dupe");
+ check_hash(table, "testdata2-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/*");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_delayed_conflict_handler)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_delay, GINT_TO_POINTER(3));
+
+ system("cp newdata data3/testdata1");
+ system("cp newdata1 data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 6, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+
+ system("rm -f data2/testdata");
+ system("cp newdata data3/testdata");
+
+ system("cp newdata3 data1/testdata1");
+ system("rm -f data2/testdata1");
+
+ system("cp newdata data1/testdata2");
+ system("rm -f data3/testdata2");
+ system("rm -f data2/testdata2");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_read == 7, NULL);
+ fail_unless(num_conflicts == 3, NULL);
+ fail_unless(num_written == 6, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata2", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata2", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ check_hash(table, "testdata2");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/*");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (multisync_delayed_slow)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = init_engine(group);
+ osengine_set_conflict_callback(engine, conflict_handler_delay, GINT_TO_POINTER(3));
+
+ system("cp newdata data3/testdata1");
+ setenv("SLOW_REPORT", "2", TRUE);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ fail_unless(num_read == 2, NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 4, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ sleep(2);
+
+ system("cp newdata data3/testdata");
+
+ system("cp newdata3 data1/testdata1");
+ system("rm -f data2/testdata1");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_engine_connected == 1, NULL);
+ fail_unless(num_engine_read == 1, NULL);
+ fail_unless(num_engine_wrote == 1, NULL);
+ fail_unless(num_engine_disconnected == 1, NULL);
+ fail_unless(num_read == 3, NULL);
+ fail_unless(num_conflicts == 1, NULL);
+ fail_unless(num_written == 4, NULL);
+ fail_unless(num_engine_end_conflicts == 1, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data3)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 3, "testdata1", "mockformat", "data");
+ check_mapping(maptable, 3, -1, 3, "testdata1", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata1");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/*");
+
+ mark_point();
+ num_conflicts = 0;
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 3, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data3)\" = \"x\""), NULL);
+
+ unsetenv("SLOW_REPORT");
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *multisync_suite(void)
+{
+ Suite *s = suite_create("Multisync");
+ //Suite *s2 = suite_create("Multisync");
+ create_case(s, "multisync_easy_new", multisync_easy_new);
+ create_case(s, "multisync_dual_new", multisync_dual_new);
+ create_case(s, "multisync_triple_new", multisync_triple_new);
+ create_case(s, "multisync_easy_mod", multisync_easy_mod);
+ create_case(s, "multisync_dual_mod", multisync_dual_mod);
+ create_case(s, "multisync_triple_mod", multisync_triple_mod);
+ create_case(s, "multisync_easy_del", multisync_easy_del);
+ create_case(s, "multisync_dual_del", multisync_dual_del);
+ create_case(s, "multisync_triple_del", multisync_triple_del);
+
+ create_case(s, "multisync_conflict_data_choose", multisync_conflict_data_choose);
+ create_case(s, "multisync_conflict_data_choose2", multisync_conflict_data_choose2);
+ create_case(s, "multisync_conflict_changetype_choose", multisync_conflict_changetype_choose);
+ create_case(s, "multisync_conflict_changetype_choose2", multisync_conflict_changetype_choose2);
+ create_case(s, "multisync_conflict_hybrid_choose", multisync_conflict_hybrid_choose);
+ create_case(s, "multisync_conflict_hybrid_choose2", multisync_conflict_hybrid_choose2);
+ create_case(s, "multisync_conflict_data_duplicate", multisync_conflict_data_duplicate);
+ create_case(s, "multisync_conflict_data_duplicate2", multisync_conflict_data_duplicate2);
+ create_case(s, "multisync_conflict_changetype_duplicate", multisync_conflict_changetype_duplicate);
+ create_case(s, "multisync_conflict_changetype_duplicate2", multisync_conflict_changetype_duplicate2);
+ create_case(s, "multisync_conflict_hybrid_duplicate", multisync_conflict_hybrid_duplicate);
+ create_case(s, "multisync_multi_conflict", multisync_multi_conflict);
+
+ create_case(s, "multisync_delayed_conflict_handler", multisync_delayed_conflict_handler);
+ create_case(s, "multisync_delayed_slow", multisync_delayed_slow);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = multisync_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_plugins.c b/debian/opensync/opensync-0.22/tests/check_plugins.c
new file mode 100644
index 00000000..a14770fb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_plugins.c
@@ -0,0 +1,80 @@
+#include "support.h"
+
+START_TEST (plugin_create)
+{
+ OSyncPlugin *plugin = osync_plugin_new(NULL);
+ fail_unless(plugin != NULL, "plugin == NULL on creation");
+}
+END_TEST
+
+START_TEST(plugin_no_config)
+{
+ char *testbed = setup_testbed("plugin_no_config");
+ OSyncEnv *osync = init_env();
+ fail_unless(osync != NULL, NULL);
+
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ fail_unless(engine != NULL, NULL);
+ fail_unless(!osengine_init(engine, &error), NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(osync_env_finalize(osync, NULL), NULL);
+ osync_env_free(osync);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST(plugin_call_custom)
+{
+ char *testbed = setup_testbed("multisync_easy_new");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncMember *member = osync_group_nth_member(group, 0);
+
+ OSyncError *error = NULL;
+ int ret = GPOINTER_TO_INT(osync_member_call_plugin(member, "mock_custom_function", GINT_TO_POINTER(1), &error));
+ fail_unless(ret == 2, NULL);
+
+ osync_env_finalize(osync, &error);
+ osync_env_free(osync);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+Suite *plugin_suite(void)
+{
+ Suite *s = suite_create("Plugins");
+ //Suite *s2 = suite_create("Plugins");
+
+ create_case(s, "plugin_create", plugin_create);
+ create_case(s, "plugin_no_config", plugin_no_config);
+ create_case(s, "plugin_call_custom", plugin_call_custom);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = plugin_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_sync.c b/debian/opensync/opensync-0.22/tests/check_sync.c
new file mode 100644
index 00000000..adcb6913
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_sync.c
@@ -0,0 +1,685 @@
+#include "support.h"
+
+START_TEST (sync_setup)
+{
+ char *testbed = setup_testbed("sync_setup");
+ OSyncEnv *osync = init_env();
+ osync_group_load(osync, "configs/group", NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_setup_init)
+{
+ char *testbed = setup_testbed("sync_setup_init");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_setup_connect)
+{
+ char *testbed = setup_testbed("sync_setup_connect");
+ num_connected = 0;
+ num_disconnected = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncEngine *engine = osengine_new(group, NULL);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+
+ OSyncError *error = NULL;
+ osengine_init(engine, &error);
+ synchronize_once(engine, &error);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(num_connected == 2, NULL);
+ fail_unless(num_disconnected == 2, NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_init_error)
+{
+ char *testbed = setup_testbed("sync_init_error");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ OSyncError *error = NULL;
+
+ OSyncEngine *engine = osengine_new(group, &error);
+ fail_unless(error == NULL, NULL);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ mark_point();
+ osengine_init(engine, &error);
+
+ fail_unless(error != NULL, NULL);
+ fail_unless(error->type == OSYNC_ERROR_MISCONFIGURATION, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_new)
+{
+ char *testbed = setup_testbed("sync_easy_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_new_del)
+{
+ char *testbed = setup_testbed("sync_easy_new_del");
+
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ osengine_init(engine, &error);
+ synchronize_once(engine, NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ mappingtable_close(maptable);
+
+ system("rm data1/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ mark_point();
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_conflict)
+{
+ char *testbed = setup_testbed("sync_easy_conflict");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, GINT_TO_POINTER(2));
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ osengine_init(engine, &error);
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_new_mapping)
+{
+ char *testbed = setup_testbed("sync_easy_new_mapping");
+ num_conflicts = 0;
+ num_written = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_first, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ osengine_init(engine, &error);
+ mark_point();
+
+ synchronize_once(engine, NULL);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+ fail_unless(num_written == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_conflict_duplicate)
+{
+ char *testbed = setup_testbed("sync_easy_conflict_duplicate");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(num_conflicts == 1, NULL);
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 2, 0);
+ check_mapping(maptable, 1, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 2);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ osync_hashtable_close(table);
+
+ system("rm -f data1/testdata-dupe");
+ system("rm -f data2/testdata-dupe");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_duplicate)
+{
+ char *testbed = setup_testbed("sync_conflict_duplicate");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 1, -1, 2, "testdata-dupe-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata-dupe", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata-dupe-dupe", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "testdata-dupe");
+ check_hash(table, "testdata-dupe-dupe");
+ osync_hashtable_close(table);
+
+ fail_unless(!system("rm -f data1/testdata-dupe data2/testdata-dupe-dupe"), NULL);
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_duplicate2)
+{
+ char *testbed = setup_testbed("sync_conflict_duplicate2");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ sleep(2);
+ system("cp new_data data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ system("diff -x \".*\" data1 data2");
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 1, 0);
+ check_mapping(maptable, 1, 0, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, 0, 2, "testdata", "mockformat", "data");
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 1);
+ check_hash(table, "testdata");
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 comp_data)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_deldel)
+{
+ char *testbed = setup_testbed("sync_conflict_deldel");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_moddel)
+{
+ char *testbed = setup_testbed("sync_moddel");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_random, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ sleep(2);
+ system("cp new_data1 data1/testdata");
+ system("cp new_data2 data2/testdata");
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_conflict_moddel)
+{
+ char *testbed = setup_testbed("sync_moddel");
+ num_conflicts = 0;
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_choose_deleted, GINT_TO_POINTER(2));
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 0, NULL);
+
+ sleep(2);
+ system("cp new_data2 data1/testdata");
+ system("rm -f data2/testdata");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+ fail_unless(num_conflicts == 1, NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+START_TEST (sync_easy_dualdel)
+{
+ char *testbed = setup_testbed("sync_easy_dualdel");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_conflict_callback(engine, conflict_handler_duplication, NULL);
+ osengine_init(engine, &error);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ system("rm -f data1/testdata");
+ system("rm -f data1/testdata2");
+
+ synchronize_once(engine, NULL);
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+
+ fail_unless(!system("test \"x$(diff -x \".*\" data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(ls data1)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"x\""), NULL);
+
+ destroy_testbed(testbed);
+}
+END_TEST
+
+//This cannot work with the mock plugin
+/*START_TEST (sync_subdirs_new)
+{
+ char *testbed = setup_testbed("sync_subdirs_new");
+ OSyncEnv *osync = init_env();
+ OSyncGroup *group = osync_group_load(osync, "configs/group", NULL);
+ fail_unless(group != NULL, NULL);
+ fail_unless(osync_env_num_groups(osync) == 1, NULL);
+ mark_point();
+
+ system("rm -rf data1/.svn");
+ system("rm -rf data2/.svn");
+ system("rm -rf data1/subdir/.svn");
+ system("rm -rf data2/subdir/.svn");
+
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+
+ synchronize_once(engine, NULL);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" -r data1 data2)\" = \"x\""), NULL);
+
+ OSyncMappingTable *maptable = mappingtable_load(group, 3, 0);
+ check_mapping(maptable, 1, -1, 2, "testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "testdata", "mockformat", "data");
+
+ check_mapping(maptable, 1, -1, 2, "subdir/testdata", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "subdir/testdata", "mockformat", "data");
+
+ check_mapping(maptable, 1, -1, 2, "subdir/testdata1", "mockformat", "data");
+ check_mapping(maptable, 2, -1, 2, "subdir/testdata1", "mockformat", "data");
+
+ mappingtable_close(maptable);
+
+ OSyncHashTable *table = hashtable_load(group, 1, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "subdir/testdata");
+ check_hash(table, "subdir/testdata1");
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 3);
+ check_hash(table, "testdata");
+ check_hash(table, "subdir/testdata");
+ check_hash(table, "subdir/testdata1");
+ osync_hashtable_close(table);
+
+ system("rm -f data2/testdata");
+ system("rm -f data1/subdir/testdata");
+ system("rm -f data1/subdir/testdata1");
+
+ synchronize_once(engine, NULL);
+
+ maptable = mappingtable_load(group, 0, 0);
+ mappingtable_close(maptable);
+
+ table = hashtable_load(group, 1, 0);
+ osync_hashtable_close(table);
+
+ table = hashtable_load(group, 2, 0);
+ osync_hashtable_close(table);
+
+ fail_unless(!system("test \"x$(diff -x \".*\" -r data1 data2)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data1)\" = \"xsubdir\""), NULL);
+ fail_unless(!system("test \"x$(ls data2)\" = \"xsubdir\""), NULL);
+ fail_unless(!system("test \"x$(ls data1/subdir)\" = \"x\""), NULL);
+ fail_unless(!system("test \"x$(ls data2/subdir)\" = \"x\""), NULL);
+
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ destroy_testbed(testbed);
+}
+END_TEST*/
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("Sync");
+ //Suite *s2 = suite_create("Sync");
+
+ create_case(s, "sync_setup", sync_setup);
+ create_case(s, "sync_setup_init", sync_setup_init);
+ create_case(s, "sync_init_error", sync_init_error);
+ create_case(s, "sync_setup_connect", sync_setup_connect);
+ create_case(s, "sync_easy_new", sync_easy_new);
+ create_case(s, "sync_easy_new_del", sync_easy_new_del);
+ create_case(s, "sync_easy_conflict", sync_easy_conflict);
+ create_case(s, "sync_easy_new_mapping", sync_easy_new_mapping);
+ create_case(s, "sync_easy_conflict_duplicate", sync_easy_conflict_duplicate);
+ create_case(s, "sync_easy_dualdel", sync_easy_dualdel);
+ create_case(s, "sync_conflict_duplicate2", sync_conflict_duplicate2);
+ create_case(s, "sync_conflict_deldel", sync_conflict_deldel);
+ create_case(s, "sync_moddel", sync_moddel);
+ create_case(s, "sync_conflict_moddel", sync_conflict_moddel);
+ create_case(s, "sync_conflict_duplicate", sync_conflict_duplicate);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_user.c b/debian/opensync/opensync-0.22/tests/check_user.c
new file mode 100644
index 00000000..b83d39b5
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_user.c
@@ -0,0 +1,48 @@
+#include <check.h>
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+
+START_TEST (user_create)
+{
+ OSyncUserInfo *osuser = osync_user_new(NULL);
+ fail_unless(osuser != NULL, "osuser == NULL on creation");
+ fail_unless(osync_user_get_confdir(osuser) != NULL, "confdir == NULL on creation");
+}
+END_TEST
+
+START_TEST (user_confdir)
+{
+ OSyncUserInfo *osuser = osync_user_new(NULL);
+ fail_unless(osync_user_get_confdir(osuser) != NULL, "configdir == NULL on creation");
+ osync_user_set_confdir(osuser, "test");
+ if (g_ascii_strcasecmp (osync_user_get_confdir(osuser), "test") != 0)
+ fail("configpath == \"test\"");
+}
+END_TEST
+
+Suite *env_suite(void)
+{
+ Suite *s = suite_create("User");
+ TCase *tc_core = tcase_create("Core");
+
+ suite_add_tcase (s, tc_core);
+ tcase_add_test(tc_core, user_create);
+ tcase_add_test(tc_core, user_confdir);
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = env_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_vcal.c b/debian/opensync/opensync-0.22/tests/check_vcal.c
new file mode 100644
index 00000000..98aedce3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_vcal.c
@@ -0,0 +1,479 @@
+#include "support.h"
+#include <time.h>
+
+static void conv_vcal(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+ osync_change_set_objtype(change, osync_objformat_get_objtype(sourceformat));
+
+ OSyncObjFormat *targetformat = NULL;
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vtodo10"))
+ targetformat = osync_conv_find_objformat(conv_env, "vtodo20");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vtodo20"))
+ targetformat = osync_conv_find_objformat(conv_env, "vtodo10");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vevent10"))
+ targetformat = osync_conv_find_objformat(conv_env, "vevent20");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vevent20"))
+ targetformat = osync_conv_find_objformat(conv_env, "vevent10");
+
+ fail_unless(targetformat != NULL, NULL);
+
+ OSyncChange *newchange = osync_change_copy(change, &error);
+ fail_unless(newchange != NULL, NULL);
+
+ //Convert to
+ fail_unless(osync_change_convert(conv_env, change, targetformat, &error), NULL);
+
+ //Detect the output
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == targetformat, NULL);
+
+ //Compare old to new
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ //Convert back
+ fail_unless(osync_change_convert(conv_env, change, sourceformat, &error), NULL);
+
+ //Detect the output again
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == sourceformat, NULL);
+
+ //Compare again
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+
+static void compare_vcal(const char *lfilename, const char *rfilename, OSyncConvCmpResult result)
+{
+ char *command1 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s lfile", g_get_current_dir(), lfilename);
+ char *command2 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s rfile", g_get_current_dir(), rfilename);
+ char *testbed = setup_testbed(NULL);
+ system(command1);
+ g_free(command1);
+ system(command2);
+ g_free(command2);
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ fail_unless(osync_file_read("lfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *lchange = osync_change_new();
+ osync_change_set_uid(lchange, "lfile");
+ osync_change_set_data(lchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(lchange, conv_env);
+ osync_change_set_objformat_string(lchange, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, lchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(lchange, sourceformat);
+ osync_change_set_objtype(lchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_file_read("rfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *rchange = osync_change_new();
+ osync_change_set_uid(rchange, "rfile");
+ osync_change_set_data(rchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(rchange, conv_env);
+ osync_change_set_objformat_string(rchange, "plain");
+
+ sourceformat = osync_change_detect_objformat(conv_env, rchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(rchange, sourceformat);
+ osync_change_set_objtype(rchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_change_compare(lchange, rchange) == result, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+
+static time_t vcal_get_revision(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+
+ OSyncObjFormat *targetformat = NULL;
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vtodo10") || !strcmp(osync_objformat_get_name(sourceformat), "vtodo20"))
+ targetformat = osync_conv_find_objformat(conv_env, "xml-todo");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vevent10") || !strcmp(osync_objformat_get_name(sourceformat), "vevent20"))
+ targetformat = osync_conv_find_objformat(conv_env, "xml-event");
+
+ fail_unless(targetformat != NULL, NULL);
+
+ fail_unless(osync_change_convert_extension(conv_env, change, targetformat, "evolution", &error), NULL);
+
+ time_t time = osync_change_get_revision(change, &error);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+ return time;
+}
+
+START_TEST (conv_vevent_evolution2_1hour)
+{
+ conv_vcal("data/vevents/evolution2/1-hour.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_1hour_alarm)
+{
+ conv_vcal("data/vevents/evolution2/1-hour-alarm.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_1hour_alarm2)
+{
+ conv_vcal("data/vevents/evolution2/1-hour-alarm2.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_all_day)
+{
+ conv_vcal("data/vevents/evolution2/all-day.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_all_day2)
+{
+ conv_vcal("data/vevents/evolution2/all-day2.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_free_busy)
+{
+ conv_vcal("data/vevents/evolution2/free-busy.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_full_special)
+{
+ conv_vcal("data/vevents/evolution2/full-special.vcf");
+}
+END_TEST
+START_TEST (conv_vevent_evolution2_rec_every_year)
+{
+ conv_vcal("data/vevents/evolution2/rec-every-year.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_except)
+{
+ conv_vcal("data/vevents/evolution2/rec-except.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_for)
+{
+ conv_vcal("data/vevents/evolution2/rec-for.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_forever)
+{
+ conv_vcal("data/vevents/evolution2/rec-forever.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_until)
+{
+ conv_vcal("data/vevents/evolution2/rec-until.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_evolution2_rec_until2)
+{
+ conv_vcal("data/vevents/evolution2/evo2-recur-until.vcf");
+}
+END_TEST
+
+START_TEST (conv_vevent_kdepim_1hour_10)
+{
+ conv_vcal("data/vevents/kdepim/1-hour-1.0.vcs");
+}
+END_TEST
+
+START_TEST (conv_vevent_kdepim_1hour_20)
+{
+ conv_vcal("data/vevents/kdepim/1-hour-2.0.ics");
+}
+END_TEST
+
+START_TEST (cmp_vevent_1hour_1)
+{
+ compare_vcal("data/vevents/evolution2/1-hour.vcf", "data/vevents/kdepim/1-hour-1.0.vcs", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (cmp_vevent_1hour_2)
+{
+ compare_vcal("data/vevents/evolution2/1-hour.vcf", "data/vevents/kdepim/1-hour-2.0.ics", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (event_get_revision1)
+{
+ struct tm testtm = {2, 6, 11, 29, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vevents/evolution2/1-hour-alarm.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (event_get_revision2)
+{
+ struct tm testtm = {1, 8, 11, 29, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vevents/evolution2/1-hour-alarm2.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (event_get_revision3)
+{
+ struct tm testtm = {13, 5, 11, 29, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vevents/evolution2/1-hour.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (event_no_revision)
+{
+ fail_unless(vcal_get_revision("data/vevents/evolution2/all-day.vcf") == -1, NULL);
+}
+END_TEST
+
+
+START_TEST (conv_vtodo_evolution2_simple)
+{
+ conv_vcal("data/vtodos/evolution2/todo-simple.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full1)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full1.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full2)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full2.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full3)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full3.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full4)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full4.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full5)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full5.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full6)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full6.vcf");
+}
+END_TEST
+
+START_TEST (conv_vtodo_evolution2_full7)
+{
+ conv_vcal("data/vtodos/evolution2/todo-full7.vcf");
+}
+END_TEST
+
+START_TEST (todo_get_revision1)
+{
+ struct tm testtm = {50, 56, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full1.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (todo_get_revision2)
+{
+ struct tm testtm = {50, 56, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full2.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (todo_get_revision3)
+{
+ struct tm testtm = {0, 0, 0, 6, 3 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcal_get_revision("data/vtodos/evolution2/todo-full3.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (todo_no_revision)
+{
+ fail_unless(vcal_get_revision("data/vtodos/kdepim/todo-full1.vcs") == -1, NULL);
+}
+END_TEST
+
+/*
+START_TEST (conv_test_crash)
+{
+ conv_vcal("data/vevents/crash.ics");
+}
+END_TEST
+*/
+START_TEST (conv_test_utf8_wrap)
+{
+ conv_vcal("data/vevents/utf8_wrap");
+}
+END_TEST
+
+START_TEST (conv_test_qp_wrap)
+{
+ conv_vcal("data/vevents/qp_wrap");
+}
+END_TEST
+
+Suite *vcal_suite(void)
+{
+ Suite *s = suite_create("VCal");
+ //Suite *s2 = suite_create("VCal");
+
+ create_case(s, "conv_vevent_evolution2_1hour", conv_vevent_evolution2_1hour);
+ create_case(s, "conv_vevent_evolution2_1hour_alarm", conv_vevent_evolution2_1hour_alarm);
+ create_case(s, "conv_vevent_evolution2_1hour_alarm2", conv_vevent_evolution2_1hour_alarm2);
+ create_case(s, "conv_vevent_evolution2_all_day", conv_vevent_evolution2_all_day);
+ create_case(s, "conv_vevent_evolution2_all_day2", conv_vevent_evolution2_all_day2);
+ create_case(s, "conv_vevent_evolution2_free_busy", conv_vevent_evolution2_free_busy);
+ create_case(s, "conv_vevent_evolution2_full_special", conv_vevent_evolution2_full_special);
+ create_case(s, "conv_vevent_evolution2_rec_every_year", conv_vevent_evolution2_rec_every_year);
+ create_case(s, "conv_vevent_evolution2_rec_except", conv_vevent_evolution2_rec_except);
+ create_case(s, "conv_vevent_evolution2_rec_for", conv_vevent_evolution2_rec_for);
+ create_case(s, "conv_vevent_evolution2_rec_forever", conv_vevent_evolution2_rec_forever);
+ create_case(s, "conv_vevent_evolution2_rec_until", conv_vevent_evolution2_rec_until);
+ create_case(s, "conv_vevent_evolution2_rec_until2", conv_vevent_evolution2_rec_until2);
+
+ create_case(s, "conv_vevent_kdepim_1hour_10", conv_vevent_kdepim_1hour_10);
+ create_case(s, "conv_vevent_kdepim_1hour_20", conv_vevent_kdepim_1hour_20);
+
+ create_case(s, "cmp_vevent_1hour_1", cmp_vevent_1hour_1);
+ create_case(s, "cmp_vevent_1hour_2", cmp_vevent_1hour_2);
+
+ create_case(s, "event_get_revision1", event_get_revision1);
+ create_case(s, "event_get_revision2", event_get_revision2);
+ create_case(s, "event_get_revision3", event_get_revision3);
+ create_case(s, "event_no_revision", event_no_revision);
+
+
+
+
+ create_case(s, "conv_vtodo_evolution2_simple", conv_vtodo_evolution2_simple);
+ create_case(s, "conv_vtodo_evolution2_full1", conv_vtodo_evolution2_full1);
+ create_case(s, "conv_vtodo_evolution2_full2", conv_vtodo_evolution2_full2);
+ create_case(s, "conv_vtodo_evolution2_full3", conv_vtodo_evolution2_full3);
+ create_case(s, "conv_vtodo_evolution2_full4", conv_vtodo_evolution2_full4);
+ create_case(s, "conv_vtodo_evolution2_full5", conv_vtodo_evolution2_full5);
+ create_case(s, "conv_vtodo_evolution2_full6", conv_vtodo_evolution2_full6);
+ create_case(s, "conv_vtodo_evolution2_full7", conv_vtodo_evolution2_full7);
+
+ create_case(s, "todo_get_revision1", todo_get_revision1);
+ create_case(s, "todo_get_revision2", todo_get_revision2);
+ create_case(s, "todo_get_revision3", todo_get_revision3);
+ create_case(s, "todo_no_revision", todo_no_revision);
+/* create_case(s, "conv_test_crash", conv_test_crash);*/
+ create_case(s, "conv_test_utf8_wrap", conv_test_utf8_wrap);
+ create_case(s, "conv_test_qp_wrap", conv_test_qp_wrap);
+
+
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = vcal_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_vcard.c b/debian/opensync/opensync-0.22/tests/check_vcard.c
new file mode 100644
index 00000000..1759512f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_vcard.c
@@ -0,0 +1,456 @@
+#include "support.h"
+#include <time.h>
+
+static void conv_vcard(const char *filename, const char *extension)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+ osync_change_set_objtype(change, osync_objformat_get_objtype(sourceformat));
+
+ OSyncObjFormat *targetformat = NULL;
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vcard21"))
+ targetformat = osync_conv_find_objformat(conv_env, "vcard30");
+
+ if (!strcmp(osync_objformat_get_name(sourceformat), "vcard30"))
+ targetformat = osync_conv_find_objformat(conv_env, "vcard21");
+
+ fail_unless(targetformat != NULL, NULL);
+
+ OSyncChange *newchange = osync_change_copy(change, &error);
+ fail_unless(newchange != NULL, NULL);
+
+ //Convert to
+ fail_unless(osync_change_convert_extension(conv_env, change, targetformat, extension, &error), NULL);
+
+ //Detect the output
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == targetformat, NULL);
+
+ //Compare old to new
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ //Convert back
+ fail_unless(osync_change_convert_extension(conv_env, change, sourceformat, extension, &error), NULL);
+
+ //Detect the output again
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == sourceformat, NULL);
+
+ //Compare again
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+
+static void compare_vcard(const char *lfilename, const char *rfilename, OSyncConvCmpResult result)
+{
+ char *command1 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s lfile", g_get_current_dir(), lfilename);
+ char *command2 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s rfile", g_get_current_dir(), rfilename);
+ char *testbed = setup_testbed(NULL);
+ system(command1);
+ g_free(command1);
+ system(command2);
+ g_free(command2);
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ fail_unless(osync_file_read("lfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *lchange = osync_change_new();
+ osync_change_set_uid(lchange, "lfile");
+ osync_change_set_data(lchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(lchange, conv_env);
+ osync_change_set_objformat_string(lchange, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, lchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(lchange, sourceformat);
+ osync_change_set_objtype(lchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_file_read("rfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *rchange = osync_change_new();
+ osync_change_set_uid(rchange, "rfile");
+ osync_change_set_data(rchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(rchange, conv_env);
+ osync_change_set_objformat_string(rchange, "plain");
+
+ sourceformat = osync_change_detect_objformat(conv_env, rchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(rchange, sourceformat);
+ osync_change_set_objtype(rchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_change_compare(lchange, rchange) == result, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+
+static time_t vcard_get_revision(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+
+ OSyncObjFormat *targetformat = osync_conv_find_objformat(conv_env, "xml-contact");
+ fail_unless(targetformat != NULL, NULL);
+
+ fail_unless(osync_change_convert_extension(conv_env, change, targetformat, "evolution", &error), NULL);
+
+ time_t time = osync_change_get_revision(change, &error);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+ return time;
+}
+
+START_TEST (conv_vcard_evolution2_full1)
+{
+ conv_vcard("data/vcards/evolution2/evo2-full1.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_full2)
+{
+ conv_vcard("data/vcards/evolution2/evo2-full2.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_photo)
+{
+ conv_vcard("data/vcards/evolution2/evo2-photo.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_multiline)
+{
+ conv_vcard("data/vcards/evolution2/evo2-multiline.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_umlaute)
+{
+ conv_vcard("data/vcards/evolution2/evo2-umlaute.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_evolution2_special)
+{
+ conv_vcard("data/vcards/evolution2/evo2-special.vcf", "evolution");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_full1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full1-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_full1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full1-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_full2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full2-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_full2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-full2-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_multiline)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-multiline-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_multiline)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-multiline-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_photo1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo1-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_photo1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo1-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_photo2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo2-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_photo2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-photo2-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_sound1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound1-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_sound1)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound1-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_sound2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound2-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_sound2)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-sound2-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_special)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-special-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_special)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-special-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_21_umlaute)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-umlaute-2.1.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_kde_30_umlaute)
+{
+ conv_vcard("data/vcards/kdepim/kdepim-umlaute-3.0.vcf", "kde");
+}
+END_TEST
+
+START_TEST (conv_vcard_malformed)
+{
+ conv_vcard("data/vcards/malformed.vcf", "kde");
+}
+END_TEST
+
+START_TEST (compare_vformat_mismatch1)
+{
+ compare_vcard("data/vcards/evolution2/compare/1-different.vcf", "data/vcards/kdepim/compare/1-different.vcf", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+START_TEST (compare_vformat_similar1)
+{
+ compare_vcard("data/vcards/evolution2/compare/1-conflict.vcf", "data/vcards/kdepim/compare/1-conflict.vcf", CONV_DATA_SIMILAR);
+}
+END_TEST
+
+START_TEST (compare_vformat_mismatch2)
+{
+ compare_vcard("data/vcards/evolution2/compare/2-conflict.vcf", "data/vcards/kdepim/compare/2-conflict.vcf", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+START_TEST (compare_vformat_similar2)
+{
+ compare_vcard("data/vcards/evolution2/compare/2-different.vcf", "data/vcards/kdepim/compare/2-different.vcf", CONV_DATA_SIMILAR);
+}
+END_TEST
+
+START_TEST (compare_vformat_same1)
+{
+ compare_vcard("data/vcards/evolution2/compare/1-same.vcf", "data/vcards/kdepim/compare/1-same.vcf", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (compare_vformat_same2)
+{
+ compare_vcard("data/vcards/evolution2/compare/2-same.vcf", "data/vcards/kdepim/compare/2-same.vcf", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (get_revision1)
+{
+ struct tm testtm = {24, 41, 10, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-full1.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision2)
+{
+ struct tm testtm = {0, 0, 0, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-full2.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision3)
+{
+ struct tm testtm = {0, 0, 0, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-multiline.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision4)
+{
+ struct tm testtm = {24, 41, 10, 26, 2 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vcard_get_revision("data/vcards/evolution2/evo2-photo.vcf") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_no_revision)
+{
+ fail_unless(vcard_get_revision("data/vcards/evolution2/compare/1-same.vcf") == -1, NULL);
+}
+END_TEST
+
+Suite *vcard_suite(void)
+{
+ Suite *s = suite_create("Vcard");
+ //Suite *s2 = suite_create("Vcard");
+
+ create_case(s, "conv_vcard_evolution2_full1", conv_vcard_evolution2_full1);
+ create_case(s, "conv_vcard_evolution2_full2", conv_vcard_evolution2_full2);
+ create_case(s, "conv_vcard_evolution2_photo", conv_vcard_evolution2_photo);
+ create_case(s, "conv_vcard_evolution2_multiline", conv_vcard_evolution2_multiline);
+ create_case(s, "conv_vcard_evolution2_umlaute", conv_vcard_evolution2_umlaute);
+ create_case(s, "conv_vcard_evolution2_special", conv_vcard_evolution2_special);
+
+ create_case(s, "conv_vcard_kde_21_full1", conv_vcard_kde_21_full1);
+ create_case(s, "conv_vcard_kde_30_full1", conv_vcard_kde_30_full1);
+ create_case(s, "conv_vcard_kde_21_full2", conv_vcard_kde_21_full2);
+ create_case(s, "conv_vcard_kde_30_full2", conv_vcard_kde_30_full2);
+ create_case(s, "conv_vcard_kde_21_multiline", conv_vcard_kde_21_multiline);
+ create_case(s, "conv_vcard_kde_30_multiline", conv_vcard_kde_30_multiline);
+ create_case(s, "conv_vcard_kde_21_photo1", conv_vcard_kde_21_photo1);
+ create_case(s, "conv_vcard_kde_30_photo1", conv_vcard_kde_30_photo1);
+ create_case(s, "conv_vcard_kde_21_photo2", conv_vcard_kde_21_photo2);
+ create_case(s, "conv_vcard_kde_30_photo2", conv_vcard_kde_30_photo2);
+ create_case(s, "conv_vcard_kde_21_sound1", conv_vcard_kde_21_sound1);
+ create_case(s, "conv_vcard_kde_30_sound1", conv_vcard_kde_30_sound1);
+ create_case(s, "conv_vcard_kde_21_sound2", conv_vcard_kde_21_sound2);
+ create_case(s, "conv_vcard_kde_30_sound2", conv_vcard_kde_30_sound2);
+ create_case(s, "conv_vcard_kde_21_special", conv_vcard_kde_21_special);
+ create_case(s, "conv_vcard_kde_30_special", conv_vcard_kde_30_special);
+ create_case(s, "conv_vcard_kde_21_umlaute", conv_vcard_kde_21_umlaute);
+ create_case(s, "conv_vcard_kde_30_umlaute", conv_vcard_kde_30_umlaute);
+ create_case(s, "conv_vcard_malformed", conv_vcard_malformed);
+ create_case(s, "compare_vformat_mismatch1", compare_vformat_mismatch1);
+ create_case(s, "compare_vformat_mismatch2", compare_vformat_mismatch2);
+ create_case(s, "compare_vformat_similar1", compare_vformat_similar1);
+ create_case(s, "compare_vformat_similar2", compare_vformat_similar2);
+ create_case(s, "compare_vformat_same1", compare_vformat_same1);
+ create_case(s, "compare_vformat_same2", compare_vformat_same2);
+
+ create_case(s, "get_revision1", get_revision1);
+ create_case(s, "get_revision2", get_revision2);
+ create_case(s, "get_revision3", get_revision3);
+ create_case(s, "get_revision4", get_revision4);
+ create_case(s, "get_no_revision", get_no_revision);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = vcard_suite();
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/check_vnote.c b/debian/opensync/opensync-0.22/tests/check_vnote.c
new file mode 100644
index 00000000..3ba87834
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/check_vnote.c
@@ -0,0 +1,284 @@
+#include "support.h"
+#include <time.h>
+
+static void conv_vnote(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+ osync_change_set_objtype(change, osync_objformat_get_objtype(sourceformat));
+
+ OSyncObjFormat *targetformat = osync_conv_find_objformat(conv_env, "xml-note");
+ fail_unless(targetformat != NULL, NULL);
+
+ OSyncChange *newchange = osync_change_copy(change, &error);
+ fail_unless(newchange != NULL, NULL);
+
+ //Convert to
+ fail_unless(osync_change_convert(conv_env, change, targetformat, &error), NULL);
+
+ //Compare old to new
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ //Convert back
+ fail_unless(osync_change_convert(conv_env, change, sourceformat, &error), NULL);
+
+ //Detect the output again
+ osync_change_set_objformat_string(change, "plain");
+ fail_unless(osync_change_detect_objformat(conv_env, change, &error) == sourceformat, NULL);
+
+ //Compare again
+ fail_unless(osync_change_compare(newchange, change) == CONV_DATA_SAME, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+}
+
+static void compare_vnote(const char *lfilename, const char *rfilename, OSyncConvCmpResult result)
+{
+ char *command1 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s lfile", g_get_current_dir(), lfilename);
+ char *command2 = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s rfile", g_get_current_dir(), rfilename);
+ char *testbed = setup_testbed(NULL);
+ system(command1);
+ g_free(command1);
+ system(command2);
+ g_free(command2);
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ fail_unless(osync_file_read("lfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *lchange = osync_change_new();
+ osync_change_set_uid(lchange, "lfile");
+ osync_change_set_data(lchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(lchange, conv_env);
+ osync_change_set_objformat_string(lchange, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, lchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(lchange, sourceformat);
+ osync_change_set_objtype(lchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_file_read("rfile", &buffer, &size, &error), NULL);
+
+ OSyncChange *rchange = osync_change_new();
+ osync_change_set_uid(rchange, "rfile");
+ osync_change_set_data(rchange, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(rchange, conv_env);
+ osync_change_set_objformat_string(rchange, "plain");
+
+ sourceformat = osync_change_detect_objformat(conv_env, rchange, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(rchange, sourceformat);
+ osync_change_set_objtype(rchange, osync_objformat_get_objtype(sourceformat));
+
+ fail_unless(osync_change_compare(lchange, rchange) == result, NULL);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+ destroy_testbed(testbed);
+}
+
+static time_t vnote_get_revision(const char *filename)
+{
+ char *command = g_strdup_printf("cp %s/"OPENSYNC_TESTDATA"%s .", g_get_current_dir(), filename);
+ char *testbed = setup_testbed(NULL);
+ system(command);
+ g_free(command);
+
+
+ OSyncError *error = NULL;
+ OSyncEnv *env = init_env();
+
+ OSyncFormatEnv *conv_env = osync_conv_env_new(env);
+ fail_unless(conv_env != NULL, NULL);
+
+ char *buffer;
+ int size;
+
+ char *file = g_path_get_basename(filename);
+ fail_unless(osync_file_read(file, &buffer, &size, &error), NULL);
+
+ OSyncChange *change = osync_change_new();
+ osync_change_set_uid(change, file);
+ g_free(file);
+ osync_change_set_data(change, buffer, size + 1, TRUE);
+ osync_change_set_conv_env(change, conv_env);
+
+ osync_change_set_objformat_string(change, "plain");
+
+ OSyncObjFormat *sourceformat = osync_change_detect_objformat(conv_env, change, &error);
+ fail_unless(sourceformat != NULL, NULL);
+ osync_change_set_objformat(change, sourceformat);
+
+ OSyncObjFormat *targetformat = osync_conv_find_objformat(conv_env, "xml-note");
+ fail_unless(targetformat != NULL, NULL);
+
+ fail_unless(osync_change_convert(conv_env, change, targetformat, &error), NULL);
+
+ time_t time = osync_change_get_revision(change, &error);
+
+ osync_conv_env_free(conv_env);
+ osync_env_finalize(env, NULL);
+ osync_env_free(env);
+
+ destroy_testbed(testbed);
+ return time;
+}
+
+START_TEST (conv_vnote1)
+{
+ conv_vnote("data/vnotes/vnote1.vnt");
+}
+END_TEST
+
+START_TEST (conv_vnote2)
+{
+ conv_vnote("data/vnotes/vnote2.vnt");
+}
+END_TEST
+
+START_TEST (conv_vnote3)
+{
+ conv_vnote("data/vnotes/vnote3.vnt");
+}
+END_TEST
+
+START_TEST (conv_vnote_minimal)
+{
+ conv_vnote("data/vnotes/vnote-minimal.vnt");
+}
+END_TEST
+
+START_TEST (get_revision1)
+{
+ struct tm testtm = {0, 0, 0, 6, 4 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vnote_get_revision("data/vnotes/vnote1.vnt") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision2)
+{
+ struct tm testtm = {1, 1, 1, 6, 4 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vnote_get_revision("data/vnotes/vnote2.vnt") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision3)
+{
+ struct tm testtm = {0, 0, 0, 6, 4 - 1, 2005 - 1900, 0, 0, 0};
+ fail_unless(vnote_get_revision("data/vnotes/vnote3.vnt") == mktime(&testtm), NULL);
+}
+END_TEST
+
+START_TEST (get_revision4)
+{
+ fail_unless(vnote_get_revision("data/vnotes/vnote-minimal.vnt") == -1, NULL);
+}
+END_TEST
+
+START_TEST (compare_vnote_same1)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote1.vnt", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (compare_vnote_same2)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote1-same.vnt", CONV_DATA_SAME);
+}
+END_TEST
+
+START_TEST (compare_vnote_similar1)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote1-similar.vnt", CONV_DATA_SIMILAR);
+}
+END_TEST
+
+START_TEST (compare_vnote_mismatch1)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote2.vnt", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+START_TEST (compare_vnote_mismatch2)
+{
+ compare_vnote("data/vnotes/vnote1.vnt", "data/vnotes/vnote-minimal.vnt", CONV_DATA_MISMATCH);
+}
+END_TEST
+
+Suite *vnote_suite(void)
+{
+ Suite *s = suite_create("VNote");
+ //Suite *s2 = suite_create("VNote");
+
+ create_case(s, "conv_vnote1", conv_vnote1);
+ create_case(s, "conv_vnote2", conv_vnote2);
+ create_case(s, "conv_vnote3", conv_vnote3);
+ create_case(s, "conv_vnote_minimal", conv_vnote_minimal);
+
+ create_case(s, "get_revision1", get_revision1);
+ create_case(s, "get_revision2", get_revision2);
+ create_case(s, "get_revision3", get_revision3);
+ create_case(s, "get_revision4", get_revision4);
+
+ create_case(s, "compare_vnote_same1", compare_vnote_same1);
+ create_case(s, "compare_vnote_same2", compare_vnote_same2);
+ create_case(s, "compare_vnote_similar1", compare_vnote_similar1);
+ create_case(s, "compare_vnote_mismatch1", compare_vnote_mismatch1);
+ create_case(s, "compare_vnote_mismatch2", compare_vnote_mismatch2);
+
+ return s;
+}
+
+int main(void)
+{
+ int nf;
+
+ Suite *s = vnote_suite();
+
+ SRunner *sr;
+ sr = srunner_create(s);
+
+// srunner_set_fork_status (sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ nf = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.db
new file mode 100644
index 00000000..612b966c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/anchor.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf
new file mode 100644
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.db
new file mode 100644
index 00000000..2b6682f1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/hash.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf
new file mode 100644
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf
new file mode 100644
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.db
new file mode 100644
index 00000000..216537f8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/hash.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf
new file mode 100644
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.db b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.db
new file mode 100644
index 00000000..8e09854a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/change.db
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf
new file mode 100644
index 00000000..481b4dee
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><filter><destobjtype>data</destobjtype><action>1</action></filter><groupname>kdefile</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file
new file mode 100644
index 00000000..d383c56f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file
@@ -0,0 +1 @@
+testdata
diff --git a/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file2 b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file2
new file mode 100644
index 00000000..00b728c3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/destobjtype_delete/data1/file2
@@ -0,0 +1 @@
+testedata2
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_save_and_load/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_setup/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdata b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2 b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2
new file mode 100644
index 00000000..f18b75a6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_custom/data2/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdata b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2 b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2
new file mode 100644
index 00000000..f18b75a6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_deny_all/data2/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2 b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2
new file mode 100644
index 00000000..f18b75a6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf
new file mode 100644
index 00000000..91e01190
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data1/vcard.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:2.1
+X-EVOLUTION-FILE-AS:Multisync
+FN:Multisync
+N:;Multisync
+EMAIL;INTERNET:multisync-users@lists.sourceforge.net
+X-EVOLUTION-LAST-USE:2003-11-26
+X-EVOLUTION-USE-SCORE:5.891888
+UID:pas-id-3F1D9AC000000001
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3 b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3
new file mode 100644
index 00000000..88b7bc39
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/filter_sync_vcard_only/data2/testdata3
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata
new file mode 100644
index 00000000..e7dde4c8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2 b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2
new file mode 100644
index 00000000..61628870
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_changetype_choose/newdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdata
new file mode 100644
index 00000000..1ba3e340
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdata
new file mode 100644
index 00000000..1ba3e340
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_choose2/data3/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdata
new file mode 100644
index 00000000..e7dde4c8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdata
new file mode 100644
index 00000000..61628870
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_conflict_data_duplicate2/data3/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata
new file mode 100644
index 00000000..30895eae
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1
new file mode 100644
index 00000000..9b4118f8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata1
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2
new file mode 100644
index 00000000..05758207
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3
new file mode 100644
index 00000000..a4a7f801
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata3
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4
new file mode 100644
index 00000000..93627682
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata4
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5 b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5
new file mode 100644
index 00000000..72091685
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new/newdata5
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf
new file mode 100755
index 00000000..c5990aa2
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data3</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/3/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdata b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/multisync_easy_new_partial2/data3/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/plugin_no_config/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_deldel/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupe b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupe
new file mode 100644
index 00000000..a63f373f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate/data2/testdata-dupe
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/comp_data/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_data b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_data
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_conflict_duplicate2/new_data
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/comp_data/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupe b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupe
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/comp_data/testdata-dupe
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdata
new file mode 100755
index 00000000..5425b0f7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_conflict_duplicate/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2 b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2
new file mode 100644
index 00000000..451ac613
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_dualdel/data1/testdata2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_del/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdata b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_easy_new_mapping/data2/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_init_error/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1 b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1
new file mode 100644
index 00000000..5746e52f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data1
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2 b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2
new file mode 100644
index 00000000..3b307bf6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_moddel/new_data2
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_connect/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d33471ac
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>fileasd-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_false/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..e6faad33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..012e6018
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>FALSE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_setup_init/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf
new file mode 100755
index 00000000..bf6ca0a3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data1</path><recursive>TRUE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/1/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf
new file mode 100755
index 00000000..896463d4
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/file-sync.conf
@@ -0,0 +1 @@
+<config><path>data2</path><recursive>TRUE</recursive></config>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf
new file mode 100755
index 00000000..d7b13aeb
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/2/syncmember.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncmember><pluginname>file-sync</pluginname></syncmember>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf
new file mode 100755
index 00000000..9629035c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/configs/group/syncgroup.conf
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<syncgroup><groupname>test</groupname></syncgroup>
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1 b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1
new file mode 100644
index 00000000..30895eae
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/subdir/testdata1
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdata b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdata
new file mode 100755
index 00000000..61e1fc33
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data1/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdata b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdata
new file mode 100644
index 00000000..05758207
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/sync_subdirs_new/data2/subdir/testdata
Binary files differ
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf
new file mode 100644
index 00000000..5f31aec9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-conflict.vcf
@@ -0,0 +1,22 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:1-conflict
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+UID:pas-id-4220B54B00000006
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:evo2mail
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:samephone
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf
new file mode 100644
index 00000000..6f1fc1c8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-different.vcf
@@ -0,0 +1,20 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:evo2name
+N:;evo2name;;;
+X-EVOLUTION-FILE-AS:1-different
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+UID:pas-id-4220B4EE00000003
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf
new file mode 100644
index 00000000..79a37918
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/1-same.vcf
@@ -0,0 +1,22 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:samehomepage
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:1-same
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:samemail
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:samephone
+UID:pas-id-4220B62E0000000B
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf
new file mode 100644
index 00000000..5103a601
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-conflict.vcf
@@ -0,0 +1,25 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:evo2name
+N:;evo2name;;;
+X-EVOLUTION-FILE-AS:2-conflict
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:samemail
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:samephone
+TEL;TYPE=HOME;TYPE=VOICE;X-EVOLUTION-UI-SLOT=2:samephone2
+ADR;TYPE=HOME:;;sameaddress;;;;
+LABEL;TYPE=HOME:sameaddress
+UID:pas-id-4220B5C300000008
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf
new file mode 100644
index 00000000..52b32590
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-different.vcf
@@ -0,0 +1,23 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:2-different
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:evo2phone
+ADR;TYPE=HOME:;;evo2address;;;;
+LABEL;TYPE=HOME:evo2address
+UID:pas-id-4220B53200000004
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf
new file mode 100644
index 00000000..66d707bc
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/compare/2-same.vcf
@@ -0,0 +1,21 @@
+BEGIN:VCARD
+VERSION:3.0
+URL:
+TITLE:
+ROLE:
+X-EVOLUTION-MANAGER:
+X-EVOLUTION-ASSISTANT:
+NICKNAME:samenick
+X-EVOLUTION-SPOUSE:
+NOTE:
+FN:samename
+N:samename;;;;
+X-EVOLUTION-FILE-AS:2-same
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:samemail
+UID:pas-id-4220B62F0000000C
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf
new file mode 100644
index 00000000..c1807996
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full1.vcf
@@ -0,0 +1,47 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:2005-02-26T10:41:24Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a note!
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE=WORK;TYPE=VOICE;X-EVOLUTION-UI-SLOT=1:bizphone
+TEL;TYPE=HOME;TYPE=VOICE;X-EVOLUTION-UI-SLOT=2:homephone
+TEL;TYPE=CELL;X-EVOLUTION-UI-SLOT=3:mobphone
+TEL;TYPE=WORK;TYPE=FAX;X-EVOLUTION-UI-SLOT=4:biz fax
+TEL;TYPE="X-EVOLUTION-ASSISTANT";X-EVOLUTION-UI-SLOT=5:assistantphone
+TEL;TYPE="X-EVOLUTION-CALLBACK";X-EVOLUTION-UI-SLOT=6:callback
+TEL;TYPE=CAR;X-EVOLUTION-UI-SLOT=7:car phone
+TEL;TYPE=PREF;X-EVOLUTION-UI-SLOT=8:primary phone
+X-AIM;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:aim
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-ICQ;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:icq
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+ADR;TYPE=WORK:PO-BOX2;;Address2;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nCity2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;;Address1;City1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nCity1\, State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;;Address3;City3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nCity3\, State3\nzip3\nPO-BOX3\ncountry3
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf
new file mode 100644
index 00000000..b3f9a609
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-full2.vcf
@@ -0,0 +1,47 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:2005-02-26
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a note!
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;;Address2;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nCity2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;;Address1;City1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nCity1\, State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;;Address3;City3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nCity3\, State3\nzip3\nPO-BOX3\ncountry3
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phone
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefax
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pager
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDN
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phone
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radio
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telex
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabber
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msn
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf
new file mode 100644
index 00000000..596543e3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-multiline.vcf
@@ -0,0 +1,53 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:20050226
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a multiline note!\nNote how there are multiple\nl\ni\nn\ne\ns
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;Multiline street\nmultiline city;Address2;City2;State
+ 2;zip2;country2
+LABEL;TYPE=WORK:Address2\nMultiline street\nmultiline city\nCity2\, State2\
+ nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;Multiline street\nmultiline city\n;Address1;City1;Sta
+ te1;zip1;country1
+LABEL;TYPE=HOME:Address1\nMultiline street\nmultiline city\n\nCity1\, State
+ 1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;Multiline street\nmultiline city;Address3;City3;Stat
+ e3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nMultiline street\nmultiline city\nCity3\, State3
+ \nzip3\nPO-BOX3\ncountry3
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phone
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefax
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pager
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDN
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phone
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radio
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telex
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabber
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msn
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf
new file mode 100644
index 00000000..389c9c9e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-photo.vcf
@@ -0,0 +1,59 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Title First Middle Last Suffix
+N:Last;First;Middle;Title;Suffix
+ORG:organization;department;office
+REV:20050226T104124,2Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Last\, First
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nickname
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a note!
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;;Address2;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nCity2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;;Address1;City1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nCity1\, State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;;Address3;City3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nCity3\, State3\nzip3\nPO-BOX3\ncountry3
+PHOTO;ENCODING=b;TYPE=PNG:iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAAC
+ XBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QIaEQILc0Ox6gAAAB10RVh0Q29tbWVudABDc
+ mVhdGVkIHdpdGggVGhlIEdJTVDvZCVuAAAB7ElEQVRYw+2XTasxYRjH/8dwGpq8xEaajZeJU
+ BZoykL2ysbCTrGUfAZr2UtJKTtJ8QGUrWKhKOELjMKUtybO4q7ZnM7E88zT6am5Vnd3v7l+m
+ 7muf/fH8/nEb5QOv1SaWBNrYk2sif+pWJKkbrebyWRcLpfBYKBpmuO4QqEwmUze6PJ8s5bLZ
+ TgcJt/SNO12u10uF0VR5CaXy4mi+EofvGu12+0AvF5vr9e7Xq/kXhCEWq3GMAyARCJxuVzUF
+ N/v91AoBCAajR4Oh+/AdDq1WCwAKpWKmuJmswnAaDRuNpufmFarBUCv1+92O9XEPM8DKBaLC
+ owkSSzLAqhWq+qIRVHU6XQARqORMlkqlQAkk0ll7NVxWq/Xj8cDQCQSUSYJsFqt1Jnj/X5PD
+ g6HQ5kkgMz/t5uLjC8AQRCUSQLI/N+KfT4f+bnm87kySQC/36+OmGGYWCwGYDAYKGCPx2M4H
+ AJIpVKq7epGowHAZDJtt9ufmHa7TRaIAvP2ArndboFAAEA8Hj8ej9+B2WxmtVoBlMtllUNis
+ VjYbDYAHMf1+305JPb7fb1eN5vNAHieP5/PKouJOxgMyrHo8XhYlpVjMZvNnk4n9WNRjqlOp
+ 5NOp51OJ0VRn5+fHo8nn8+Px+PXm3xoz1RNrIk18Z/WF7ZpjC1N/OYqAAAAAElFTkSuQmCC
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemail
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremail
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phone
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefax
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pager
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDN
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phone
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radio
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telex
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabber
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahoo
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msn
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwise
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf
new file mode 100644
index 00000000..c38c0d34
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-special.vcf
@@ -0,0 +1,26 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Titleö Firstä Middleü Lastß Suffixö
+N:Lastß;Firstä;Middleü;Titleö;Suffixö
+ORG:organization;department;office
+REV:2005-02-26T10:41:24Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Lastß\, Firstä
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nicknameü
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a multiline note with special chars\n!"§$%&/()=?`'*+~'#-_:.\;
+ \,^°@€¹²³¼½½¬{[[]}\\¸¨þø→â†â†’€ł@æßðjđŋĸjħł
+ <-tab
+X-EVOLUTION-BLOG-URL:
+CALURI:
+FBURL:
+X-EVOLUTION-VIDEO-URL:
+X-MOZILLA-HTML:FALSE
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf
new file mode 100644
index 00000000..e7bc108e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/evolution2/evo2-umlaute.vcf
@@ -0,0 +1,54 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:Titleö Firstä Middleü Lastß Suffixö
+N:Lastß;Firstä;Middleü;Titleö;Suffixö
+ORG:organization;department;office
+REV:2005-02-26T10:41:24Z
+ROLE:profession
+TITLE:title
+UID:pas-id-421A5F6100000014
+URL:homepage
+X-EVOLUTION-FILE-AS:Lastß\, Firstä
+X-EVOLUTION-MANAGER:manager
+X-EVOLUTION-ASSISTANT:assistant
+NICKNAME:nicknameü
+BDAY:2005-02-10
+X-EVOLUTION-ANNIVERSARY:2005-02-08
+X-EVOLUTION-SPOUSE:spouse
+NOTE:This is a multiline note with special chars\nNote how there are multip
+ le\nl\ni\nn\ne\ns\nand special chars: öüööüöäüßßß asd
+CATEGORIES:Birthday,Business
+X-EVOLUTION-BLOG-URL:weblog
+CALURI:calendar
+FBURL:freebusy
+X-EVOLUTION-VIDEO-URL:video chat
+X-MOZILLA-HTML:TRUE
+ADR;TYPE=WORK:PO-BOX2;Multiline street\nmultiline cityäüööüä;Address2
+ ;City2;State2;zip2;country2
+LABEL;TYPE=WORK:Address2\nMultiline street\nmultiline cityäüööüä\nCit
+ y2\, State2\nzip2\nPO-BOX2\ncountry2
+ADR;TYPE=HOME:PO-BOX1;Multiline street\nmultiline city\nöüä;Address1;Cit
+ y1;State1;zip1;country1
+LABEL;TYPE=HOME:Address1\nMultiline street\nmultiline city\nöüä\nCity1\,
+ State1\nzip1\nPO-BOX1\ncountry1
+ADR;TYPE=OTHER:PO-BOX3;Multiline street\nmultiline cityä\nöü;Address3;Ci
+ ty3;State3;zip3;country3
+LABEL;TYPE=OTHER:Address3\nMultiline street\nmultiline cityä\nöü\nCity3\
+ , State3\nzip3\nPO-BOX3\ncountry3
+EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:workemailö
+EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:homeemailü
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=3:otheremailü
+EMAIL;TYPE=OTHER;X-EVOLUTION-UI-SLOT=4:otheremail2ä
+TEL;TYPE="X-EVOLUTION-COMPANY";X-EVOLUTION-UI-SLOT=1:company phoneöä
+TEL;TYPE=HOME;TYPE=FAX;X-EVOLUTION-UI-SLOT=2:homefaxöä
+TEL;TYPE=FAX;X-EVOLUTION-UI-SLOT=3:other fax
+TEL;TYPE=PAGER;X-EVOLUTION-UI-SLOT=4:pagerß
+TEL;TYPE=ISDN;X-EVOLUTION-UI-SLOT=5:ISDNä
+TEL;TYPE=VOICE;X-EVOLUTION-UI-SLOT=6:other phoneö
+TEL;TYPE="X-EVOLUTION-RADIO";X-EVOLUTION-UI-SLOT=7:radioü
+TEL;TYPE="X-EVOLUTION-TELEX";X-EVOLUTION-UI-SLOT=8:telexä
+X-JABBER;TYPE=HOME;X-EVOLUTION-UI-SLOT=3:jabberüä
+X-YAHOO;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:yahooä
+X-MSN;TYPE=HOME;X-EVOLUTION-UI-SLOT=1:msnöä
+X-GROUPWISE;TYPE=HOME;X-EVOLUTION-UI-SLOT=4:groupwiseä
+END:VCARD \ No newline at end of file
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf
new file mode 100644
index 00000000..c2f49165
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-conflict.vcf
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:kdepimmail
+FN;CHARSET=UTF-8;ENCODING=8BIT:samename
+N;CHARSET=UTF-8;ENCODING=8BIT:samename;;;;
+TEL;TYPE=WORK:samephone
+UID:V7xU0LoAWW
+VERSION:2.1
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf
new file mode 100644
index 00000000..09aca584
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-different.vcf
@@ -0,0 +1,7 @@
+BEGIN:VCARD
+FN;CHARSET=UTF-8;ENCODING=8BIT:kdepimname
+N;CHARSET=UTF-8;ENCODING=8BIT:kdepimname;;;;
+UID:Sd11KbFgl1
+VERSION:2.1
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf
new file mode 100644
index 00000000..77b829ed
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/1-same.vcf
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:samemail
+FN;CHARSET=UTF-8;ENCODING=8BIT:samename
+N;CHARSET=UTF-8;ENCODING=8BIT:samename;;;;
+TEL;TYPE=WORK:samephone
+UID:sZYtQZb5Ec
+URL:samehomepage
+VERSION:2.1
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf
new file mode 100644
index 00000000..74a0a636
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-conflict.vcf
@@ -0,0 +1,12 @@
+BEGIN:VCARD
+ADR;TYPE=home:;;sameaddress;;;;Germany
+CLASS:PUBLIC
+EMAIL:samemail
+FN:kdepimname
+N:kdepimname;;;;
+TEL;TYPE=WORK:samephone
+TEL;TYPE=HOME:samephone2
+UID:NbLz18IEVc
+VERSION:3.0
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf
new file mode 100644
index 00000000..496e8512
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-different.vcf
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+ADR;TYPE=home:;;kdepimaddress;;;;Germany
+CLASS:PUBLIC
+FN:samename
+N:samename;;;;
+TEL;TYPE=WORK:kdepimphone
+UID:XtGNq0mPdN
+VERSION:3.0
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf
new file mode 100644
index 00000000..d08155c5
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/compare/2-same.vcf
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+CLASS:PUBLIC
+EMAIL:samemail
+FN:samename
+N:samename;;;;
+NICKNAME:samenick
+UID:XfqLidtnBt
+VERSION:3.0
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf
new file mode 100644
index 00000000..d99a4df6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-2.1.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:always
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf
new file mode 100644
index 00000000..8e746820
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full1-3.0.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PUBLIC
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:never
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:always
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf
new file mode 100644
index 00000000..a6388d19
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-2.1.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf
new file mode 100644
index 00000000..7975ce6a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-full2-3.0.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf
new file mode 100644
index 00000000..dc500211
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-2.1.vcf
@@ -0,0 +1,78 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nm
+ ultine;local1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a multine note!\nwith\nmultiple\nl
+ ines
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf
new file mode 100644
index 00000000..15ef5bb1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-multiline-3.0.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nmultine;local1;region1;postal
+ code1;Germany
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a multine note!\nwith\nmultiple\nlines
+ORG:organization
+ROLE:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf
new file mode 100644
index 00000000..cb06cb9b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-2.1.vcf
@@ -0,0 +1,114 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAID
+ AAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiKG
+ S5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSRS
+ BZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgW
+ QSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKGq
+ sggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHxq
+ zKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6+
+ sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+h
+ +1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKos
+ gvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+8
+ AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJI
+ sgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+qL
+ IIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/63
+ aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz3
+ HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZR
+ FEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHKI
+ pAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi0
+ b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJ
+ FIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+PHOTO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAI
+ DAAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiK
+ GS5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSR
+ SBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUg
+ WQSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKG
+ qsggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHx
+ qzKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6
+ +sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+
+ h+1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKo
+ sgvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+
+ 8AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJ
+ IsgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+q
+ LIIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/6
+ 3aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz
+ 3HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZ
+ RFEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHK
+ IpAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi
+ 0b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJ
+ JFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf
new file mode 100644
index 00000000..79dbe4da
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo1-3.0.vcf
@@ -0,0 +1,113 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAID
+ AAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiKG
+ S5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSRS
+ BZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgW
+ QSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKGq
+ sggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHxq
+ zKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6+
+ sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+h
+ +1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKos
+ gvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+8
+ AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJI
+ sgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+qL
+ IIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/63
+ aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz3
+ HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZR
+ FEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHKI
+ pAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi0
+ b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJ
+ FIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+PHOTO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAI
+ DAAAD1ElEQVR4nO2byyt1URjGH5dyyWXAiAghQwkRkswwFKZSMiD/gTIzlDIQYYiRYkYypCiFiK
+ GS5J6J+zd4favdOV9fHnvbO/X8Rus5WHv186591ll7nYSPjw+Ir5EY9QB+E5JFIFkEkkUgWQSSR
+ SBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJJFIFkEkkUg
+ WQSSRSBZBJJFkBz1APD6+gpgcXHR4tLSEoCdnR2Ll5eXAJKSkiwWFhYCaGxstNjb2wugqakpnKG
+ qsggSojomeXx8bI2uri4A+/v73p+mpqZaIy8vD8DT05PFi4sLAG9vb95f7unpscb09DSAjIyMHx
+ qzKotAsggimIY2Ad1N+vr6GkBpaanFsbExAB0dHRZTUlK8f2u/PDc3Z3F0dBTA4+OjxYaGBgDr6
+ +sW3VwOClUWQXiV9fLyYo2qqioABwcHFqurq+Eph+zs7K/3ubu7C6C1tdXi/f09gOHhYYvj4+P+
+ h+1FlUUgWQThTUNbBAHo7+8HkJaWZtHmY0lJybd7np2dtUZfXx+A5OTPjyWnp6cAioqKvt1zDKo
+ sgvAqq76+3hpbW1v4WwUAZmZmfPbsFvTFxcUAzs7OLNrCYmRkxGf/DlUWgWQRhDENbYXtFlDv7+
+ 8AVldXLba3twd1ocHBQQCTk5MWm5ubAWxubgbVvyqLIIzNP3sLt4JyVFZWBn6hmD7dLlBQqLIIJ
+ IsgjGlo+yox5ObmBn6hmD7/eV0/qLIIJItAsggkiyCMG3xOTk78i1dXV9bIz88P6kKuz/9c1w+q
+ LIIwKqusrAxAYuLnP8aW8nt7exYDrCzXp1FRURFUz4Yqi0CyCMKYhnb4oKamxuL29jaA5eVli/6
+ 3aNxH9JWVFe/rLS0tPnuOQZVFEN4e/NTUlDUGBgYApKenW7SnO7Z9/j3m5+etYce13NOdk5MTnz
+ 3HoMoikCyC8Kbh8/OzNWw/8+joyGJtbS2AtbU1i1lZWV/v0xZW7kZ+d3cHYGhoyOLExIT/YXtRZ
+ RFEcD7r8PAQnlOzt7e3AMrLyy3a+ay2tjaLMeezbm5u4Lmj22PUh4cHi3V1dQA2NjYsuhMCQaHK
+ IpAsgshOK9tkBNDd3e2NhjvhaB+z3ZvD+fk54k4rd3Z2WsOO02RmZv7QmFVZBJFVlsOOTy4sLFi
+ 0b1jY+UfEfcOioKAAcd+wsMf0IaDKIpAsguin4S9ClUUgWQSSRSBZBJJFIFkEkkUgWQSSRSBZBJ
+ JFIFkEkkUgWQSSRSBZBJJFIFkEkkUgWQSSRfAHfPwYMZb1bW0AAAAASUVORK5CYII=
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf
new file mode 100644
index 00000000..c0e9c712
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-2.1.vcf
@@ -0,0 +1,78 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;VALUE=URI:/home/azrael/vcard.png
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+PHOTO;VALUE=URI:/home/azrael/vcard.png
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf
new file mode 100644
index 00000000..ee5de13d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-photo2-3.0.vcf
@@ -0,0 +1,77 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+LOGO;VALUE=URI:/home/azrael/vcard.png
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+PHOTO;VALUE=URI:/home/azrael/vcard.png
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf
new file mode 100644
index 00000000..a6388d19
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-2.1.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf
new file mode 100644
index 00000000..7975ce6a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound1-3.0.vcf
@@ -0,0 +1,75 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf
new file mode 100644
index 00000000..f9e5ad7c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-2.1.vcf
@@ -0,0 +1,77 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;lo
+ cal1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a note!
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf
new file mode 100644
index 00000000..cea91d7b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-sound2-3.0.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1;local1;region1;postalcode1;Ger
+ many
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a note!
+ORG:organization
+ROLE:role
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf
new file mode 100644
index 00000000..48b85843
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-2.1.vcf
@@ -0,0 +1,79 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nm
+ ultine;local1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a multine note! öääüßöäü\n°^!"§$%&
+ /()=?`*'Ä_:;>^+#-.,<¬¹²³¼½¬{[]}\\¸~¨`^þø→↓â†Å§Â¶â‚¬Å‚@æßðđŋħjĸłË^`|«»¢“â€nµ─· <-tab
+ \nwith\nmultiple\nlines
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf
new file mode 100644
index 00000000..99923db8
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-special-3.0.vcf
@@ -0,0 +1,77 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nmultine;local1;region1;postal
+ code1;Germany
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a multine note! öääüßöäü\n°^!"§$%&/()=?`*'Ä_:;>^+#-.,<¬¹²³¼½¬{
+ []}\\¸~¨`^þø→↓â†Å§Â¶â‚¬Å‚@æßðđŋħjĸłË^`|«»¢“â€nµ─· <-tab\nwith\nmultiple\nlines
+ORG:organization
+ROLE:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf
new file mode 100644
index 00000000..c51554dd
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-2.1.vcf
@@ -0,0 +1,78 @@
+BEGIN:VCARD
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=work:pobox2;;Street1 work;locale2;regi
+ on2;postalcode2;Germany
+ADR;CHARSET=UTF-8;ENCODING=8BIT;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nm
+ ultine;local1;region1;postalcode1;Germany
+BDAY:2005-02-26T00:00:00Z
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT;TYPE=PREF:email1
+EMAIL;CHARSET=UTF-8;ENCODING=8BIT:email2@test.com
+FN;CHARSET=UTF-8;ENCODING=8BIT:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N;CHARSET=UTF-8;ENCODING=8BIT:familynames;givenname;additional names;prefix
+ ;suffix
+NOTE;CHARSET=UTF-8;ENCODING=8BIT:This is a multine note! öääüßöäü\nwith\nmu
+ ltiple\nlines
+ORG;CHARSET=UTF-8;ENCODING=8BIT:organization
+ROLE;CHARSET=UTF-8;ENCODING=8BIT:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:2.1
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF;CHARSET=UTF-8;ENCODING=8BIT:alwaysIfPossib
+ le
+X-KADDRESSBOOK-CRYPTOPROTOPREF;CHARSET=UTF-8;ENCODING=8BIT:inline openpgp,o
+ penpgp/mime,s/mime,s/mime opaque
+X-KADDRESSBOOK-CRYPTOSIGNPREF;CHARSET=UTF-8;ENCODING=8BIT:never
+X-KADDRESSBOOK-OPENPGPFP;CHARSET=UTF-8;ENCODING=8BIT:C754DDC1ECF537C4805710
+ FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary;CHARSET=UTF-8;ENCODING=8BIT:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName;CHARSET=UTF-8;ENCODING=8BIT:assistant
+X-KADDRESSBOOK-X-Department;CHARSET=UTF-8;ENCODING=8BIT:department
+X-KADDRESSBOOK-X-IMAddress;CHARSET=UTF-8;ENCODING=8BIT:im address
+X-KADDRESSBOOK-X-ManagersName;CHARSET=UTF-8;ENCODING=8BIT:manager
+X-KADDRESSBOOK-X-Office;CHARSET=UTF-8;ENCODING=8BIT:office
+X-KADDRESSBOOK-X-Profession;CHARSET=UTF-8;ENCODING=8BIT:profession
+X-KADDRESSBOOK-X-SpousesName;CHARSET=UTF-8;ENCODING=8BIT:spouse
+X-messaging/aim-All;CHARSET=UTF-8;ENCODING=8BIT:aim
+X-messaging/gadu-All;CHARSET=UTF-8;ENCODING=8BIT:gadugadu
+X-messaging/icq-All;CHARSET=UTF-8;ENCODING=8BIT:icq
+X-messaging/irc-All;CHARSET=UTF-8;ENCODING=8BIT:irc
+X-messaging/msn-All;CHARSET=UTF-8;ENCODING=8BIT:msn
+X-messaging/sms-All;CHARSET=UTF-8;ENCODING=8BIT:im sms
+X-messaging/xmpp-All;CHARSET=UTF-8;ENCODING=8BIT:jabber
+X-messaging/yahoo-All;CHARSET=UTF-8;ENCODING=8BIT:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf
new file mode 100644
index 00000000..5303c4fa
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/kdepim/kdepim-umlaute-3.0.vcf
@@ -0,0 +1,76 @@
+BEGIN:VCARD
+ADR;TYPE=work:pobox2;;Street1 work;locale2;region2;postalcode2;Germany
+ADR;TYPE=home;TYPE=pref:pobox1;;HomeAddress1\nmultine;local1;region1;postal
+ code1;Germany
+BDAY:2005-02-26T00:00:00Z
+CATEGORIES:Customer,Family
+CLASS:PRIVATE
+EMAIL;TYPE=PREF:email1
+EMAIL:email2@test.com
+FN:givenname familynames
+GEO:52.500000;13.366667
+KEY;ENCODING=b;TYPE=PGP:mQGiBECXtzARBAC99Ll8ePW6FCzq8KUBwEYzo+J/u4EmkgCxgWm
+ Vzsvj2Uu7/OhwFaGJcv+fBSF+XtGhZeUk+Pcl4x0tMY5H07/k6ObF8+0O164J+Jg5bMlk2I6X1n
+ UhmAA4aIZCALHwcNZCq9b7HMKr3Sh1eMas2MQ2hL7mTrkfrcxqSNmTA1l/BwCgo+yOOozD6kohz
+ nRr+8jiYimho30EAJDN9YKkTh3kM1jrc9Q11N7zEnQUXtPC4GqQmW7BXgEmSBErEduk3N9NqnzG
+ xFruQrpXWisExv4z/t67uBou++m64J/Ad+T6wC19h72U15UVch/4bU7YqACjdlocUBfmnV3njko
+ Dhl6wmg7fxdCOJfkCXw+VKD9iiqXiSlqFh3IjA/4hdl3npIPKa0EeDnHDSUIbtZAd74i3Lzz1fJ
+ h5vip5N3alqSynJPmzPCWE7dMzOB/iPb+G50X046QT2OEypN9L5Trd5KJonlg+crN/aUZSjCmCC
+ foaBiISdox753MkVOipWH15F27KOqPHBNLrCnrYVCLMNpN/4aSbrn7AXzjbELQlQXJtaW4gQmF1
+ ZXIgPGFybWluLmJhdWVyQGRlc3Njb24uY29tPoheBBMRAgAeBQJAl7cwAhsDBgsJCAcDAgMVAgM
+ DFgIBAh4BAheAAAoJEKvc+7/ZPVGpDNQAmwaN2121JO3i3AcRT5ns8KeQU2x2AJ9w5i2jQ5gZ4m
+ 3jVJPFohsL03i2hbQgQXJtaW4gQmF1ZXIgPGF6cmFlbEBkZXNzY29uLmNvbT6IXgQTEQIAHgUCQ
+ Je5JQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRCr3Pu/2T1RqfVrAJ9ANz3hB4TqVahybg8i
+ XJUfmOtjbACfSLJBPGBI84P/RIEe7FKCDC05ZT65AQ0EQJe3MBAEALFujyLPriDAyh0+u8KXoBf
+ SSrnyrDnjvhG0gGsyqSfE06JvKDK6q0ZUlRAj/1cbHS+Rb8t6mUN8HquVjPkWG6eNhcGNnRxjc+
+ 7OqCiVhN7rt4c2HibVQWLy/8y04/Uqj2F9TwaiiuixIJiVA0tdqdgPxFFSCS6aRJhJ6EBw+rbXA
+ AMFBACtsn+fb3aQlaFiBurznAHmv/j2X3k2WXtaubPkNKEWf7HyLos0F5vSw0/hh0/YBabdpaK8
+ LNNuP3Q0ABPjUzyK7cH5fxHPb8BWKIKvB5aXAPr4fMFnRmvpzKmmV1yxegHQvmnpZEloODtWa1J
+ /qNq8OlFhks4tVFyxj7uKmRF1yIhJBBgRAgAJBQJAl7cwAhsMAAoJEKvc+7/ZPVGpqaoAn0yTGk
+ 6w/agEpgjKrsDAACV3l8mpAJ9X3AzwPCKMIx+NpIetkoKFroWxrQ==
+N:familynames;givenname;additional names;prefix;suffix
+NICKNAME:nickname
+NOTE:This is a multine note! öääüßöäü\nwith\nmultiple\nlines
+ORG:organization
+ROLE:roleäöüüüäö
+SOUND;VALUE=URI:/usr/share/sounds/KDE_Event_5.ogg
+TEL;TYPE=WORK:workphone
+TEL;TYPE=FAX;TYPE=WORK:work fax
+TEL;TYPE=HOME:homephone
+TEL;TYPE=CELL:mobilephone
+TEL;TYPE=FAX;TYPE=HOME:homefax
+TEL;TYPE=MSG:messenger
+TEL;TYPE=FAX;TYPE=PREF:fax
+TEL;TYPE=VIDEO:vidoe
+TEL;TYPE=MODEM:modem
+TEL;TYPE=ISDN:isdn
+TEL;TYPE=PAGER:pager
+TEL;TYPE=BBS:mailbox
+TEL;TYPE=CAR:car
+TEL;TYPE=PCS:pcs
+UID:aZAQgtBIOB
+URL:homepage
+VERSION:3.0
+X-KADDRESSBOOK-CRYPTOENCRYPTPREF:alwaysIfPossible
+X-KADDRESSBOOK-CRYPTOPROTOPREF:inline openpgp,openpgp/mime,s/mime,s/mime op
+ aque
+X-KADDRESSBOOK-CRYPTOSIGNPREF:never
+X-KADDRESSBOOK-OPENPGPFP:C754DDC1ECF537C4805710FDABDCFBBFD93D51A9
+X-KADDRESSBOOK-X-Anniversary:2005-02-10
+X-KADDRESSBOOK-X-AssistantsName:assistant
+X-KADDRESSBOOK-X-Department:department
+X-KADDRESSBOOK-X-IMAddress:im address
+X-KADDRESSBOOK-X-ManagersName:manager
+X-KADDRESSBOOK-X-Office:office
+X-KADDRESSBOOK-X-Profession:profession
+X-KADDRESSBOOK-X-SpousesName:spouse
+X-messaging/aim-All:aim
+X-messaging/gadu-All:gadugadu
+X-messaging/icq-All:icq
+X-messaging/irc-All:irc
+X-messaging/msn-All:msn
+X-messaging/sms-All:im sms
+X-messaging/xmpp-All:jabber
+X-messaging/yahoo-All:yahoo
+END:VCARD
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf b/debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf
new file mode 100644
index 00000000..4d9c3a9b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vcards/malformed.vcf
@@ -0,0 +1,3 @@
+BEGIN:VCARD
+N:test user
+END:VCARD
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/crash.ics b/debian/opensync/opensync-0.22/tests/data/vevents/crash.ics
new file mode 100644
index 00000000..e98a7069
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/crash.ics
@@ -0,0 +1,27 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VEVENT
+ATTENDEE;CN=é;ROLE=REQ-PARTICIPANT;RSVP=TRUE;
+ PARTSTAT=ACCEPTED:MAILTO:e@a.org
+ORGANIZER:MAILTO:e@a.org
+DTSTART:20050726T053000Z
+DTEND:20050726T053000Z
+TRANSP:OPAQUE
+SEQUENCE:0
+UID:
+
+040000008200E00074C5B7101A82E0080000000070D7AE8F808CC501000000000000000010
+ 0000008C05F5F3D72E3B4C9A3BC7FBF434B6CD
+DTSTAMP:20050719T144024Z
+DESCRIPTION: Bruxelles\, Copenhague\, Madrid\, Paris.\n\n*~*~*~*~*~*~*~*~*~*\n\nSi
+s être là \n
+SUMMARY:ec
+PRIORITY:5
+CLASS:PUBLIC
+X-MICROSOFT-CDO-REPLYTIME:20050719T153821Z
+CREATED:20050719T153821
+LAST-MODIFIED:20050719T153821
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf
new file mode 100644
index 00000000..d5df7a17
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm.vcf
@@ -0,0 +1,43 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110542Z-4349-1000-1-1@craal
+DTSTAMP:20050329T110542Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T120000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T130000
+TRANSP:TRANSPARENT
+SEQUENCE:3
+SUMMARY:single 1 hour alarm
+CLASS:PUBLIC
+CREATED:20050329T110602
+LAST-MODIFIED:20050329T110602
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110602Z-4310-1000-1-17@craal
+DESCRIPTION:single 1 hour alarm
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf
new file mode 100644
index 00000000..a7c351a3
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour-alarm2.vcf
@@ -0,0 +1,64 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110617Z-4349-1000-1-2@craal
+DTSTAMP:20050329T110617Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T120000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T123000
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:single 1 hour alarm 2
+LOCATION:location
+DESCRIPTION:description
+CATEGORIES:Birthday\,Business
+CLASS:PRIVATE
+CREATED:20050329T110801
+LAST-MODIFIED:20050329T110801
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110648Z-4310-1000-1-21@craal
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+DESCRIPTION:single 1 hour alarm 2
+END:VALARM
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110654Z-4310-1000-1-22@craal
+TRIGGER;VALUE=DURATION;RELATED=END:PT15H
+ACTION:AUDIO
+REPEAT:1
+DURATION:PT5M
+ATTACH:/home/azrael/play.pls
+DESCRIPTION:single 1 hour alarm 2
+END:VALARM
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110725Z-4310-1000-1-23@craal
+TRIGGER;VALUE=DURATION;RELATED=START:P15D
+ACTION:PROCEDURE
+REPEAT:2
+DURATION:PT4H
+ATTACH:test
+DESCRIPTION:--test
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf
new file mode 100644
index 00000000..4d9d347d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/1-hour.vcf
@@ -0,0 +1,37 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110513Z-4310-1000-1-5@craal
+DTSTAMP:20050329T110414Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T120000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T130000
+TRANSP:OPAQUE
+SEQUENCE:3
+SUMMARY:single 1 hour
+CLASS:PUBLIC
+CREATED:20050329T110513
+LAST-MODIFIED:20050329T110513
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf
new file mode 100644
index 00000000..54b7f3fe
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day.vcf
@@ -0,0 +1,16 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VEVENT
+UID:20050329T110812Z-4349-1000-1-3@craal
+DTSTAMP:20050329T110812Z
+DTSTART;VALUE=DATE:20050101
+DTEND;VALUE=DATE:20050102
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:all day event1
+CLASS:CONFIDENTIAL
+CREATED:20050329T110837
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf
new file mode 100644
index 00000000..15ac2181
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/all-day2.vcf
@@ -0,0 +1,23 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VEVENT
+UID:20050329T110841Z-4349-1000-1-4@craal
+DTSTAMP:20050329T110841Z
+DTSTART;VALUE=DATE:20050101
+DTEND;VALUE=DATE:20050103
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:all day event 2
+CLASS:PUBLIC
+CREATED:20050329T110901
+LAST-MODIFIED:20050329T110901
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T110901Z-4310-1000-1-34@craal
+DESCRIPTION:all day event 2
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf
new file mode 100644
index 00000000..b3415b8c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/evo2-recur-until.vcf
@@ -0,0 +1,48 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050307T174013Z-32171-1000-1-31@azrael
+DTSTAMP:20050307T174013Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050307T124500
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050307T130000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:Summary
+LOCATION:Location
+DESCRIPTION:Description\nline2\näö\nasd
+CATEGORIES:Birthday\,Business
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;UNTIL=20050309;INTERVAL=1
+EXDATE;VALUE=DATE:20050308
+CREATED:20050307T174125
+LAST-MODIFIED:20050307T174125
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050307T174125Z-32152-1000-1-16@azrael
+DESCRIPTION:Summary
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf
new file mode 100644
index 00000000..ee88a38c
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/free-busy.vcf
@@ -0,0 +1,55 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Moscow
+X-LIC-LOCATION:Europe/Moscow
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0300
+TZOFFSETTO:+0400
+TZNAME:MSD
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0400
+TZOFFSETTO:+0300
+TZNAME:MSK
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/America/Los_Angeles
+X-LIC-LOCATION:America/Los_Angeles
+BEGIN:STANDARD
+TZOFFSETFROM:-0700
+TZOFFSETTO:-0800
+TZNAME:PST
+DTSTART:19701025T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:-0800
+TZOFFSETTO:-0700
+TZNAME:PDT
+DTSTART:19700405T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111426Z-4349-1000-1-11@craal
+DTSTAMP:20050329T111426Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Moscow:
+ 20050101T123000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/America/Los_Angeles:
+ 20050101T130000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:free busy + different timezone
+CLASS:PUBLIC
+CREATED:20050329T111518
+LAST-MODIFIED:20050329T111518
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf
new file mode 100644
index 00000000..7690fab6
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/full-special.vcf
@@ -0,0 +1,41 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T113101Z-4349-1000-1-18@craal
+DTSTAMP:20050329T113101Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T123000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T130000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:full special
+LOCATION:öäöää#++#\\\\\\\\\\\\///
+DESCRIPTION:
+ /&/((//&%$%!$§\"&%!$§&%$!&$%R§\"/&%!(//=)()?=?{[{]}\\¸´*+*üüäö\n#
+ ä#äö##-.\,\,..-\\n--.\,|<<>^^°
+CLASS:PUBLIC
+CREATED:20050329T113204
+LAST-MODIFIED:20050329T113204
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf
new file mode 100644
index 00000000..bf6c9b4d
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-every-year.vcf
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111314Z-4349-1000-1-9@craal
+DTSTAMP:20050329T111314Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T160000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T163000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:rec every year
+CLASS:PUBLIC
+RRULE:FREQ=YEARLY;INTERVAL=1
+CREATED:20050329T111333
+LAST-MODIFIED:20050329T111333
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf
new file mode 100644
index 00000000..77837a79
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-except.vcf
@@ -0,0 +1,39 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111337Z-4349-1000-1-10@craal
+DTSTAMP:20050329T111337Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T160000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T163000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:rec one week except
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;COUNT=7;INTERVAL=1
+EXDATE;VALUE=DATE:20050104
+CREATED:20050329T111411
+LAST-MODIFIED:20050329T111411
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf
new file mode 100644
index 00000000..eb605057
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-for.vcf
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111159Z-4349-1000-1-8@craal
+DTSTAMP:20050329T111159Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T140000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T143000
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:rec 1 week for 3 weeks
+CLASS:PUBLIC
+RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=1;BYDAY=SA
+CREATED:20050329T111306
+LAST-MODIFIED:20050329T111306
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf
new file mode 100644
index 00000000..67711685
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-forever.vcf
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T110905Z-4349-1000-1-5@craal
+DTSTAMP:20050329T110905Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T140000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T143000
+TRANSP:TRANSPARENT
+SEQUENCE:2
+SUMMARY:rec once forever
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;INTERVAL=1
+CREATED:20050329T110925
+LAST-MODIFIED:20050329T110925
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf
new file mode 100644
index 00000000..a7c8c168
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/evolution2/rec-until.vcf
@@ -0,0 +1,44 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:20050329T111052Z-4349-1000-1-7@craal
+DTSTAMP:20050329T111052Z
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T140000
+DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T143000
+TRANSP:OPAQUE
+SEQUENCE:2
+SUMMARY:rec every 2 days until 5 days
+CLASS:PUBLIC
+RRULE:FREQ=DAILY;UNTIL=20050105;INTERVAL=2
+CREATED:20050329T111148
+LAST-MODIFIED:20050329T111148
+BEGIN:VALARM
+X-EVOLUTION-ALARM-UID:20050329T111148Z-4310-1000-1-52@craal
+DESCRIPTION:rec every 2 days until 5 days
+ACTION:DISPLAY
+TRIGGER;VALUE=DURATION;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs
new file mode 100644
index 00000000..c8944e02
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-1.0.vcs
@@ -0,0 +1,19 @@
+BEGIN:VCALENDAR
+PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
+VERSION:1.0
+BEGIN:VEVENT
+DTSTART:20050101T110000Z
+DTEND:20050101T120000Z
+DCREATED:20050329T131635Z
+UID:libkcal-774591933.717
+SEQUENCE:0
+LAST-MODIFIED:20050329T131635Z
+X-ORGANIZER:MAILTO:nobody@nowhere
+SUMMARY:single 1 hour
+CLASS:PUBLIC
+PRIORITY:3
+TRANSP:0
+END:VEVENT
+
+END:VCALENDAR
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics
new file mode 100644
index 00000000..bd3feee7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/kdepim/1-hour-2.0.ics
@@ -0,0 +1,20 @@
+BEGIN:VCALENDAR
+PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
+VERSION:2.0
+BEGIN:VEVENT
+DTSTAMP:20050329T131810Z
+ORGANIZER;CN=Anonymous:MAILTO:nobody@nowhere
+CREATED:20050329T131635Z
+UID:libkcal-774591933.717
+SEQUENCE:0
+LAST-MODIFIED:20050329T131635Z
+SUMMARY:single 1 hour
+CLASS:PUBLIC
+PRIORITY:3
+DTSTART:20050101T110000Z
+DTEND:20050101T120000Z
+TRANSP:OPAQUE
+END:VEVENT
+
+END:VCALENDAR
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap b/debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap
new file mode 100644
index 00000000..2d3b6188
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/qp_wrap
@@ -0,0 +1,10 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+BEGIN:VEVENT
+DTSTART:20070112T133000Z
+DTEND:20070112T143000Z
+SUMMARY:Test Quoted Printable
+DESCRIPTION;ENCODING=QUOTED-PRINTABLE:=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1
+LOCATION;ENCODING=QUOTED-PRINTABLE:XXXX=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1=C1
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap b/debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap
new file mode 100644
index 00000000..76f990ca
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vevents/utf8_wrap
@@ -0,0 +1,10 @@
+BEGIN:VCALENDAR
+VERSION:1.0
+BEGIN:VEVENT
+DTSTART:20070112T133000Z
+DTEND:20070112T143000Z
+SUMMARY:Test UTF-8
+DESCRIPTION;CHARSET=UTF-8:ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ
+LOCATION;CHARSET=UTF-8:XXXXÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ
+END:VEVENT
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt
new file mode 100644
index 00000000..e323ab1b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote-minimal.vnt
@@ -0,0 +1,5 @@
+BEGIN:VNOTE
+VERSION:1.1
+BODY:This is just a test
+END:VNOTE
+
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt
new file mode 100644
index 00000000..860791e1
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-same.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid5
+DCREATED:2005-04-07
+LAST-MODIFIED:2005-04-08
+SUMMARY:This is a summary
+BODY:This is just a test
+CATEGORIES:Birthday,Friends
+CLASS:PUBLIC
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt
new file mode 100644
index 00000000..d9204e6f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1-similar.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid3
+DCREATED:2005-04-06
+LAST-MODIFIED:2005-04-07
+SUMMARY:This is a summary
+BODY:This is just a test
+CATEGORIES:Birthday,Friends,Test
+CLASS:PRIVATE
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt
new file mode 100644
index 00000000..0824dfdc
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote1.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid
+DCREATED:2005-04-05
+LAST-MODIFIED:2005-04-06
+SUMMARY:This is a summary
+BODY:This is just a test
+CATEGORIES:Birthday,Friends
+CLASS:PUBLIC
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt
new file mode 100644
index 00000000..2197ab4b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote2.vnt
@@ -0,0 +1,10 @@
+BEGIN:VNOTE
+VERSION:1.1
+X-IRMC-LUID:someuid2
+DCREATED:2005-04-05T01:01:01Z
+LAST-MODIFIED:2005-04-06T01:01:01Z
+SUMMARY:This is a summary
+BODY:This is just a test lines
+CATEGORIES:Birthday,Friends
+CLASS:PRIVATE
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt
new file mode 100644
index 00000000..1b065955
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vnotes/vnote3.vnt
@@ -0,0 +1,8 @@
+BEGIN:VNOTE
+VERSION:1.1
+DCREATED:20050405
+LAST-MODIFIED:20050406
+SUMMARY:This is a summary
+BODY:This is a multi\nline\nbody with special chars
+CLASS:CONFIDENTIAL
+END:VNOTE
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf
new file mode 100644
index 00000000..3a736123
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full1.vcf
@@ -0,0 +1,51 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Asia/Baghdad
+X-LIC-LOCATION:Asia/Baghdad
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0300
+TZOFFSETTO:+0400
+TZNAME:ADT
+DTSTART:19700401T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0400
+TZOFFSETTO:+0300
+TZNAME:AST
+DTSTART:19701001T040000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_4/Africa/Douala
+X-LIC-LOCATION:Africa/Douala
+BEGIN:STANDARD
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0100
+TZNAME:WAT
+DTSTART:19700101T000000
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTODO
+UID:20050306T005538Z-4378-1000-1-28@azrael
+DTSTAMP:20050306T005538Z
+SUMMARY:summary
+DESCRIPTION:Description
+DUE;TZID=/softwarestudio.org/Olson_20011030_4/Africa/Douala:
+ 20050330T003000
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Asia/Baghdad:
+ 20050306T010000
+CLASS:PUBLIC
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:0
+PRIORITY:0
+URL:webpage
+SEQUENCE:1
+CREATED:20050306T005650
+LAST-MODIFIED:20050306T005650
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf
new file mode 100644
index 00000000..c27e212e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full2.vcf
@@ -0,0 +1,22 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050306T005538Z-4378-1000-1-28@azrael
+DTSTAMP:20050306T005538Z
+SUMMARY:summary
+DUE:20050330T003000
+DTSTART:20050306T010000Z
+CLASS:PRIVATE
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:50
+PRIORITY:7
+URL:webpage
+SEQUENCE:2
+CREATED:20050306T005650
+LAST-MODIFIED:2005-03-06T00:56:50
+DESCRIPTION:Description
+STATUS:IN-PROCESS
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf
new file mode 100644
index 00000000..860aed97
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full3.vcf
@@ -0,0 +1,23 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050306T005538Z-4378-1000-1-28@azrael
+DTSTAMP:20050306T005538Z
+SUMMARY:summary
+DUE:20050330T003000
+DTSTART:20050306T010000
+CLASS:CONFIDENTIAL
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:100
+PRIORITY:5
+URL:webpage
+SEQUENCE:3
+CREATED:20050306T005650
+LAST-MODIFIED:20050306
+STATUS:COMPLETED
+DESCRIPTION:Description
+COMPLETED:20050306T010000Z
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf
new file mode 100644
index 00000000..5db8583a
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full4.vcf
@@ -0,0 +1,21 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050329T112523Z-4349-1000-1-14@craal
+DTSTAMP:20050329T112523Z
+SUMMARY:full1
+DESCRIPTION:description
+DUE;VALUE=DATE:20050101
+DTSTART;VALUE=DATE:20050102
+CLASS:PUBLIC
+CATEGORIES:Birthday\,Business
+PERCENT-COMPLETE:0
+PRIORITY:3
+URL:webpage
+SEQUENCE:1
+CREATED:20050329T112604
+LAST-MODIFIED:20050329T112604
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf
new file mode 100644
index 00000000..c21652a9
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full5.vcf
@@ -0,0 +1,42 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+X-LIC-LOCATION:Europe/Berlin
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+TZNAME:CEST
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+TZNAME:CET
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTODO
+UID:20050329T112608Z-4349-1000-1-15@craal
+DTSTAMP:20050329T112608Z
+SUMMARY:full2
+DESCRIPTION:desciption2\nmulti\nline
+DUE;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050101T000000
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
+ 20050102T010000
+CLASS:PRIVATE
+CATEGORIES:Business\,Competition
+PERCENT-COMPLETE:50
+STATUS:IN-PROCESS
+PRIORITY:5
+URL:website
+SEQUENCE:1
+CREATED:20050329T112653
+LAST-MODIFIED:20050329T112653
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf
new file mode 100644
index 00000000..72dbc93e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full6.vcf
@@ -0,0 +1,59 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/Europe/Moscow
+X-LIC-LOCATION:Europe/Moscow
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+0300
+TZOFFSETTO:+0400
+TZNAME:MSD
+DTSTART:19700329T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:+0400
+TZOFFSETTO:+0300
+TZNAME:MSK
+DTSTART:19701025T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VTIMEZONE
+TZID:/softwarestudio.org/Olson_20011030_5/America/Los_Angeles
+X-LIC-LOCATION:America/Los_Angeles
+BEGIN:STANDARD
+TZOFFSETFROM:-0700
+TZOFFSETTO:-0800
+TZNAME:PST
+DTSTART:19701025T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:-0800
+TZOFFSETTO:-0700
+TZNAME:PDT
+DTSTART:19700405T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VTODO
+UID:20050329T112655Z-4349-1000-1-16@craal
+DTSTAMP:20050329T112655Z
+SUMMARY:full3
+DUE;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Moscow:
+ 20050101T000000
+DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/America/Los_Angeles:
+ 20050101T010000
+CLASS:CONFIDENTIAL
+PERCENT-COMPLETE:100
+STATUS:COMPLETED
+PRIORITY:7
+COMPLETED:20050108T230000Z
+URL:website
+SEQUENCE:1
+CREATED:20050329T112740
+LAST-MODIFIED:20050329T112740
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf
new file mode 100644
index 00000000..c15d23ba
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-full7.vcf
@@ -0,0 +1,20 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050329T112744Z-4349-1000-1-17@craal
+DTSTAMP:20050329T112744Z
+SUMMARY:full4
+DESCRIPTION:
+ desfeefä\nüöüfeü\nöüü+#+´ßß?\\=0)()/(&/%&$§\"!{[]}\\\,\;:
+ |||><jj°j
+CLASS:PUBLIC
+PERCENT-COMPLETE:0
+STATUS:CANCELLED
+PRIORITY:0
+SEQUENCE:1
+CREATED:20050329T112842
+LAST-MODIFIED:20050329T112842
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf
new file mode 100644
index 00000000..1f472442
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/evolution2/todo-simple.vcf
@@ -0,0 +1,16 @@
+BEGIN:VCALENDAR
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:PUBLISH
+BEGIN:VTODO
+UID:20050329T112458Z-4349-1000-1-13@craal
+DTSTAMP:20050329T112458Z
+SUMMARY:simple
+CLASS:PUBLIC
+PERCENT-COMPLETE:0
+PRIORITY:0
+SEQUENCE:1
+CREATED:20050329T112521
+LAST-MODIFIED:20050329T112521
+END:VTODO
+END:VCALENDAR
diff --git a/debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs b/debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs
new file mode 100644
index 00000000..5b70b270
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/data/vtodos/kdepim/todo-full1.vcs
@@ -0,0 +1,21 @@
+BEGIN:VCALENDAR
+PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
+VERSION:1.0
+BEGIN:VTODO
+DUE:20050313T010300Z
+DTSTART:20050306T010300Z
+DCREATED:20050306T010522Z
+UID:libkcal-862506927.303
+SEQUENCE:1
+X-ORGANIZER:MAILTO:armin.bauer@desscon.com
+ATTENDEE;RSVP=TRUE;STATUS=NEEDS ACTION:MAILTO:Firstname Lastname <name@domain.com>
+DESCRIPTION:Description
+SUMMARY:title
+LOCATION:location
+STATUS:NEEDS_ACTION
+PRIORITY:3
+CATEGORIES:Birthday;Business
+END:VTODO
+
+END:VCALENDAR
+
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am
new file mode 100644
index 00000000..675bd581
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.am
@@ -0,0 +1,22 @@
+INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+
+AM_CFLAGS = -Wall -Werror @XML_CFLAGS@ @GCOV_CFLAGS@
+AM_LDFLAGS = -rpath @libdir@
+
+EXTRA_DIST = mock_sync.h Makefile.in
+
+if ENABLE_TESTS
+formatsdir=@OPENSYNC_FORMATSDIR@
+formats_LTLIBRARIES = mockformat.la
+
+pluginsdir=@OPENSYNC_PLUGINDIR@
+plugins_LTLIBRARIES = mock_sync.la
+endif
+
+mock_sync_la_SOURCES = mock_sync.c
+mock_sync_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mock_sync_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+
+mockformat_la_SOURCES = mock_format.c
+mockformat_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mockformat_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in
new file mode 100644
index 00000000..68394809
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/Makefile.in
@@ -0,0 +1,554 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tests/mock-plugin
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+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)$(formatsdir)" "$(DESTDIR)$(pluginsdir)"
+formatsLTLIBRARIES_INSTALL = $(INSTALL)
+pluginsLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(formats_LTLIBRARIES) $(plugins_LTLIBRARIES)
+mock_sync_la_DEPENDENCIES =
+am_mock_sync_la_OBJECTS = mock_sync.lo
+mock_sync_la_OBJECTS = $(am_mock_sync_la_OBJECTS)
+@ENABLE_TESTS_TRUE@am_mock_sync_la_rpath = -rpath $(pluginsdir)
+mockformat_la_DEPENDENCIES =
+am_mockformat_la_OBJECTS = mock_format.lo
+mockformat_la_OBJECTS = $(am_mockformat_la_OBJECTS)
+@ENABLE_TESTS_TRUE@am_mockformat_la_rpath = -rpath $(formatsdir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(mock_sync_la_SOURCES) $(mockformat_la_SOURCES)
+DIST_SOURCES = $(mock_sync_la_SOURCES) $(mockformat_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+INCLUDES = @PACKAGE_CFLAGS@ -I$(top_srcdir)
+AM_CFLAGS = -Wall -Werror @XML_CFLAGS@ @GCOV_CFLAGS@
+AM_LDFLAGS = -rpath @libdir@
+EXTRA_DIST = mock_sync.h Makefile.in
+@ENABLE_TESTS_TRUE@formatsdir = @OPENSYNC_FORMATSDIR@
+@ENABLE_TESTS_TRUE@formats_LTLIBRARIES = mockformat.la
+@ENABLE_TESTS_TRUE@pluginsdir = @OPENSYNC_PLUGINDIR@
+@ENABLE_TESTS_TRUE@plugins_LTLIBRARIES = mock_sync.la
+mock_sync_la_SOURCES = mock_sync.c
+mock_sync_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mock_sync_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+mockformat_la_SOURCES = mock_format.c
+mockformat_la_LDFLAGS = -avoid-version -export-dynamic -module @GCOV_LDFLAGS@
+mockformat_la_LIBADD = @PACKAGE_LIBS@ @LIBS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/mock-plugin/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/mock-plugin/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-formatsLTLIBRARIES: $(formats_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(formatsdir)" || $(mkdir_p) "$(DESTDIR)$(formatsdir)"
+ @list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(formatsdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(formatsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(formatsdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-formatsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(formats_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(formatsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(formatsdir)/$$p"; \
+ done
+
+clean-formatsLTLIBRARIES:
+ -test -z "$(formats_LTLIBRARIES)" || rm -f $(formats_LTLIBRARIES)
+ @list='$(formats_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
+install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pluginsdir)" || $(mkdir_p) "$(DESTDIR)$(pluginsdir)"
+ @list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginsdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginsdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-pluginsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(plugins_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pluginsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pluginsdir)/$$p"; \
+ done
+
+clean-pluginsLTLIBRARIES:
+ -test -z "$(plugins_LTLIBRARIES)" || rm -f $(plugins_LTLIBRARIES)
+ @list='$(plugins_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
+mock_sync.la: $(mock_sync_la_OBJECTS) $(mock_sync_la_DEPENDENCIES)
+ $(LINK) $(am_mock_sync_la_rpath) $(mock_sync_la_LDFLAGS) $(mock_sync_la_OBJECTS) $(mock_sync_la_LIBADD) $(LIBS)
+mockformat.la: $(mockformat_la_OBJECTS) $(mockformat_la_DEPENDENCIES)
+ $(LINK) $(am_mockformat_la_rpath) $(mockformat_la_LDFLAGS) $(mockformat_la_OBJECTS) $(mockformat_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mock_format.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mock_sync.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(formatsdir)" "$(DESTDIR)$(pluginsdir)"; 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-formatsLTLIBRARIES clean-generic clean-libtool \
+ clean-pluginsLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-formatsLTLIBRARIES install-pluginsLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-formatsLTLIBRARIES uninstall-info-am \
+ uninstall-pluginsLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
+ clean-formatsLTLIBRARIES clean-generic clean-libtool \
+ clean-pluginsLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-exec install-exec-am \
+ install-formatsLTLIBRARIES install-info install-info-am \
+ install-man install-pluginsLTLIBRARIES 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-formatsLTLIBRARIES \
+ uninstall-info-am uninstall-pluginsLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c
new file mode 100644
index 00000000..f8e34672
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_format.c
@@ -0,0 +1,137 @@
+/*
+ * file - A plugin for file objects for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 <opensync/opensync.h>
+#include <glib.h>
+#include "mock_sync.h"
+
+static OSyncConvCmpResult compare_file(OSyncChange *leftchange, OSyncChange *rightchange)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, leftchange, rightchange);
+
+ osync_bool data_same = FALSE;
+ osync_bool path_same = FALSE;
+
+ if (!strcmp(osync_change_get_uid(leftchange), osync_change_get_uid(rightchange)))
+ path_same = TRUE;
+
+ if (osync_change_get_datasize(leftchange) == osync_change_get_datasize(rightchange)) {
+ if (osync_change_get_data(leftchange) == osync_change_get_data(rightchange)) {
+ data_same = TRUE;
+ } else {
+ if (!memcmp(osync_change_get_data(leftchange), osync_change_get_data(rightchange), osync_change_get_datasize(leftchange)))
+ data_same = TRUE;
+ }
+ }
+
+ if (data_same && path_same) {
+ osync_trace(TRACE_EXIT, "%s: Same", __func__);
+ return CONV_DATA_SAME;
+ }
+ if (path_same) {
+ osync_trace(TRACE_EXIT, "%s: Similar", __func__);
+ return CONV_DATA_SIMILAR;
+ }
+ osync_trace(TRACE_EXIT, "%s: Mismatch", __func__);
+ return CONV_DATA_MISMATCH;
+}
+
+static osync_bool conv_file_to_plain(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ *free_input = FALSE;
+ *output = input;
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+static osync_bool conv_plain_to_file(void *user_data, char *input, int inpsize, char **output, int *outpsize, osync_bool *free_input, OSyncError **error)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ *free_input = FALSE;
+ *output = input;
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+static void destroy_file(char *input, size_t inpsize)
+{
+ g_free(input);
+}
+
+static void duplicate_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+ char *newuid = g_strdup_printf ("%s-dupe", osync_change_get_uid(change));
+ osync_change_set_uid(change, newuid);
+ g_free(newuid);
+}
+
+static osync_bool copy_file(const char *input, int inpsize, char **output, int *outpsize)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ char *new = NULL;
+
+ if (inpsize) {
+ new = g_malloc0(inpsize);
+ memcpy(new, input, inpsize);
+ }
+
+ *output = new;
+ *outpsize = inpsize;
+ return TRUE;
+}
+
+static void create_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ char *data = osync_rand_str(g_random_int_range(1, 100));
+ osync_change_set_data(change, data, strlen(data) + 1, TRUE);
+ if (!osync_change_get_uid(change))
+ osync_change_set_uid(change, osync_rand_str(6));
+}
+
+static char *print_file(OSyncChange *change)
+{
+ osync_debug("FILE", 4, "start: %s", __func__);
+
+ char *printable = g_strdup_printf ("File: %s\nSize: %i", osync_change_get_uid(change), osync_change_get_datasize(change));
+ return printable;
+}
+
+void get_info(OSyncEnv *env)
+{
+ osync_env_register_objtype(env, "data");
+ osync_env_register_objformat(env, "data", "mockformat");
+ osync_env_format_set_compare_func(env, "mockformat", compare_file);
+ osync_env_format_set_duplicate_func(env, "mockformat", duplicate_file);
+ osync_env_format_set_destroy_func(env, "mockformat", destroy_file);
+ osync_env_format_set_print_func(env, "mockformat", print_file);
+ osync_env_format_set_copy_func(env, "mockformat", copy_file);
+ osync_env_format_set_create_func(env, "mockformat", create_file);
+
+ osync_env_format_set_create_func(env, "mockformat", create_file);
+ osync_env_register_converter(env, CONVERTER_DECAP, "mockformat", "plain", conv_file_to_plain);
+ osync_env_register_converter(env, CONVERTER_ENCAP, "plain", "mockformat", conv_plain_to_file);
+}
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c
new file mode 100644
index 00000000..63ec969e
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.c
@@ -0,0 +1,559 @@
+/*
+ * mock-sync - A mock-plugin for the opensync framework
+ * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
+ *
+ * This library 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 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "mock_sync.h"
+
+#define fail(x) abort()
+
+#define fail_unless(condition, msg) do { \
+ if (!condition) fail(msg); \
+ } while (0)
+
+int mock_custom_function(mock_env *env, int input, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %p)", __func__, env, input, error);
+
+ fail_unless(input == 1, NULL);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return 2;
+}
+
+/*Load the state from a xml file and return it in the conn struct*/
+static osync_bool mock_parse_settings(mock_env *env, char *data, int size, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %i)", __func__, env, data, size);
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ //set defaults
+ env->path = NULL;
+
+ doc = xmlParseMemory(data, size);
+
+ if (!doc) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to parse settings");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (!cur) {
+ xmlFreeDoc(doc);
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to get root element of the settings");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ if (xmlStrcmp(cur->name, (xmlChar*)"config")) {
+ xmlFreeDoc(doc);
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "Config valid is not valid");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return FALSE;
+ }
+
+ cur = cur->xmlChildrenNode;
+
+ while (cur != NULL) {
+ char *str = (char*)xmlNodeGetContent(cur);
+ if (str) {
+ if (!xmlStrcmp(cur->name, (const xmlChar *)"path")) {
+ env->path = g_strdup(str);
+ }
+ xmlFree(str);
+ }
+ cur = cur->next;
+ }
+
+ xmlFreeDoc(doc);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+static osync_bool mock_get_error(OSyncMember *member, const char *domain)
+{
+ const char *env = g_getenv(domain);
+ if (!env)
+ return FALSE;
+
+ int num = atoi(env);
+ int mask = 1 << (osync_member_get_id(member) - 1);
+ if (num & mask) {
+ char *chancestr = g_strdup_printf("%s_PROB", domain);
+ const char *chance = g_getenv(chancestr);
+ g_free(chancestr);
+ if (!chance)
+ return TRUE;
+ int prob = atoi(chance);
+ if (prob >= g_random_int_range(0, 100))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void *mock_initialize(OSyncMember *member, OSyncError **error)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, member, error);
+
+ if (mock_get_error(member, "INIT_NULL")) {
+ osync_error_set(error, OSYNC_ERROR_EXPECTED, "Triggering INIT_NULL error");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+ }
+ char *configdata;
+ int configsize;
+ mock_env *env = g_malloc0(sizeof(mock_env));
+
+ if (!osync_member_get_config(member, &configdata, &configsize, error)) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error));
+ return NULL;
+ }
+
+ if (!mock_parse_settings(env, configdata, configsize, error)) {
+ g_free(env);
+ return NULL;
+ }
+
+ //Rewrite the batch commit functions so we can disable them if necessary
+ if (!mock_get_error(member, "BATCH_COMMIT")) {
+ OSyncObjFormatSink *fmtsink = member->format_sinks->data;
+ osync_trace(TRACE_INTERNAL, "Disabling batch_commit on %p:%s: %i", fmtsink, fmtsink->format ? fmtsink->format->name : "None", g_list_length(member->format_sinks));
+ OSyncFormatFunctions *functions = &(fmtsink->functions);
+ functions->batch_commit = NULL;
+ }
+
+ env->member = member;
+ env->hashtable = osync_hashtable_new();
+
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, env);
+ return (void *)env;
+}
+
+static void mock_connect(OSyncContext *ctx)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, ctx);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ env->committed_all = TRUE;
+
+ if (mock_get_error(env->member, "CONNECT_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering CONNECT_ERROR error");
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, "Triggering CONNECT_ERROR error");
+ return;
+ }
+
+ if (mock_get_error(env->member, "CONNECT_TIMEOUT")) {
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, "Triggering CONNECT_TIMEOUT error");
+ return;
+ }
+
+ OSyncError *error = NULL;
+ if (!osync_hashtable_load(env->hashtable, env->member, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ osync_error_free(&error);
+ return;
+ }
+
+ if (!osync_anchor_compare(env->member, "path", env->path))
+ osync_member_set_slow_sync(env->member, "data", TRUE);
+
+ GError *direrror = NULL;
+
+ env->dir = g_dir_open(env->path, 0, &direrror);
+ if (direrror) {
+ //Unable to open directory
+ osync_context_report_error(ctx, OSYNC_ERROR_FILE_NOT_FOUND, "Unable to open directory %s", env->path);
+ g_error_free (direrror);
+ } else {
+ osync_context_report_success(ctx);
+ }
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static char *mock_generate_hash(struct stat *buf)
+{
+ char *hash = g_strdup_printf("%i-%i", (int)buf->st_mtime, (int)buf->st_ctime);
+ return hash;
+}
+
+static void mock_get_changeinfo(OSyncContext *ctx)
+{
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (mock_get_error(env->member, "GET_CHANGES_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering GET_CHANGES_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "GET_CHANGES_TIMEOUT"))
+ return;
+ if (mock_get_error(env->member, "GET_CHANGES_TIMEOUT2"))
+ sleep(8);
+
+ if (osync_member_get_slow_sync(env->member, "data")) {
+ osync_debug("FILE-SYNC", 3, "Slow sync requested");
+ osync_hashtable_set_slow_sync(env->hashtable, "data");
+ }
+
+ GDir *dir;
+ GError *gerror = NULL;
+ const char *de = NULL;
+
+ dir = g_dir_open(env->path, 0, &gerror);
+ if (!dir) {
+ osync_trace(TRACE_EXIT_ERROR, "mock_report_dir: Unable to open directory %s: %s", env->path, gerror ? gerror->message : "None");
+ return;
+ }
+ while ((de = g_dir_read_name(dir))) {
+ char *filename = g_build_filename(env->path, de, NULL);
+ if (g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
+ /* Report normal files */
+ OSyncChange *change = osync_change_new();
+ osync_change_set_member(change, env->member);
+ osync_change_set_uid(change, de);
+
+ osync_change_set_objformat_string(change, "mockformat");
+
+ struct stat buf;
+ stat(filename, &buf);
+ char *hash = mock_generate_hash(&buf);
+ osync_change_set_hash(change, hash);
+
+ if (mock_get_error(env->member, "ONLY_INFO")) {
+ osync_change_set_data(change, NULL, 0, FALSE);
+ } else {
+ char *data = NULL;
+ int size = 0;
+ OSyncError *error = NULL;
+ if (!osync_file_read(filename, &data, &size, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ return;
+ }
+
+ osync_change_set_data(change, data, size, TRUE);
+ }
+
+ if (mock_get_error(env->member, "SLOW_REPORT"))
+ sleep(1);
+
+ if (osync_hashtable_detect_change(env->hashtable, change)) {
+ osync_context_report_change(ctx, change);
+ osync_hashtable_update_hash(env->hashtable, change);
+ }
+ g_free(hash);
+
+
+ }
+ }
+ g_dir_close(dir);
+ osync_hashtable_report_deleted(env->hashtable, ctx, "data");
+
+ fail_unless(env->committed_all == TRUE, NULL);
+ env->committed_all = FALSE;
+
+ osync_context_report_success(ctx);
+}
+
+static void mock_get_data(OSyncContext *ctx, OSyncChange *change)
+{
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (mock_get_error(env->member, "GET_DATA_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering GET_DATA_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "GET_DATA_TIMEOUT"))
+ return;
+
+ char *filename = g_strdup_printf("%s/%s", env->path, osync_change_get_uid(change));
+ char *data = NULL;
+ int size = 0;
+ OSyncError *error = NULL;
+ if (!osync_file_read(filename, &data, &size, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ return;
+ }
+
+ osync_change_set_data(change, data, size, TRUE);
+ g_free(filename);
+
+ osync_context_report_success(ctx);
+}
+
+static void mock_read(OSyncContext *ctx, OSyncChange *change)
+{
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ char *filename = g_strdup_printf("%s/%s", env->path, osync_change_get_uid(change));
+
+ char *data = NULL;
+ int size = 0;
+ OSyncError *error = NULL;
+ if (!osync_file_read(filename, &data, &size, &error)) {
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ return;
+ }
+
+ osync_change_set_data(change, data, size, TRUE);
+
+ g_free(filename);
+
+ osync_context_report_success(ctx);
+}
+
+static osync_bool mock_access(OSyncContext *ctx, OSyncChange *change)
+{
+ /*TODO: Create directory for file, if it doesn't exist */
+ osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, ctx, change);
+
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ char *filename = NULL;
+ OSyncError *error = NULL;
+ filename = g_strdup_printf ("%s/%s", env->path, osync_change_get_uid(change));
+
+ switch (osync_change_get_changetype(change)) {
+ case CHANGE_DELETED:
+ if (!remove(filename) == 0) {
+ osync_debug("FILE-SYNC", 0, "Unable to remove file %s", filename);
+ osync_context_report_error(ctx, OSYNC_ERROR_FILE_NOT_FOUND, "Unable to write");
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "%s: Unable to write", __func__);
+ return FALSE;
+ }
+ break;
+ case CHANGE_ADDED:
+ if (g_file_test(filename, G_FILE_TEST_EXISTS)) {
+ osync_debug("FILE-SYNC", 0, "File %s already exists", filename);
+ osync_context_report_error(ctx, OSYNC_ERROR_EXISTS, "Entry already exists");
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "%s: Entry already exists", __func__);
+ return FALSE;
+ }
+ /* No break. Continue below */
+ case CHANGE_MODIFIED:
+ //FIXME add permission and ownership for file-sync
+ if (!osync_file_write(filename, osync_change_get_data(change), osync_change_get_datasize(change), 0700, &error)) {
+ osync_debug("FILE-SYNC", 0, "Unable to write to file %s", filename);
+ osync_context_report_osyncerror(ctx, &error);
+ g_free(filename);
+ osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error));
+ return FALSE;
+ }
+
+ struct stat buf;
+ stat(filename, &buf);
+ char *hash = mock_generate_hash(&buf);
+ osync_change_set_hash(change, hash);
+ break;
+ default:
+ fail("no changetype given");
+ }
+ g_free(filename);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+ return TRUE;
+}
+
+static osync_bool mock_commit_change(OSyncContext *ctx, OSyncChange *change)
+{
+ osync_debug("FILE-SYNC", 4, "start: %s", __func__);
+ osync_debug("FILE-SYNC", 3, "Writing change %s with changetype %i", osync_change_get_uid(change), osync_change_get_changetype(change));
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ fail_unless(env->committed_all == FALSE, NULL);
+
+ if (mock_get_error(env->member, "COMMIT_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering COMMIT_ERROR error");
+ return FALSE;
+ }
+ if (mock_get_error(env->member, "COMMIT_TIMEOUT"))
+ return FALSE;
+
+ if (!mock_access(ctx, change))
+ return FALSE;
+
+ osync_hashtable_update_hash(env->hashtable, change);
+ osync_context_report_success(ctx);
+ osync_debug("FILE-SYNC", 4, "end: %s", __func__);
+ return TRUE;
+}
+
+static void mock_sync_done(OSyncContext *ctx)
+{
+ osync_debug("FILE-SYNC", 3, "start: %s", __func__);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (mock_get_error(env->member, "SYNC_DONE_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering SYNC_DONE_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "SYNC_DONE_TIMEOUT"))
+ return;
+
+ osync_anchor_update(env->member, "path", env->path);
+ osync_context_report_success(ctx);
+ osync_debug("FILE-SYNC", 3, "end: %s", __func__);
+}
+
+static void mock_disconnect(OSyncContext *ctx)
+{
+ osync_debug("FILE-SYNC", 3, "start: %s", __func__);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(ctx);
+
+ if (!g_getenv("NO_COMMITTED_ALL_CHECK"))
+ fail_unless(env->committed_all == TRUE, NULL);
+ env->committed_all = FALSE;
+
+ if (mock_get_error(env->member, "DISCONNECT_ERROR")) {
+ osync_context_report_error(ctx, OSYNC_ERROR_EXPECTED, "Triggering DISCONNECT_ERROR error");
+ return;
+ }
+ if (mock_get_error(env->member, "DISCONNECT_TIMEOUT"))
+ return;
+
+ g_dir_close(env->dir);
+ osync_hashtable_close(env->hashtable);
+ osync_context_report_success(ctx);
+ osync_debug("FILE-SYNC", 3, "end: %s", __func__);
+}
+
+static void mock_finalize(void *data)
+{
+ osync_debug("FILE-SYNC", 3, "start: %s", __func__);
+ mock_env *env = (mock_env *)data;
+ osync_hashtable_free(env->hashtable);
+
+ g_free(env->path);
+ g_free(env);
+}
+
+static osync_bool mock_is_available(OSyncError **error)
+{
+ if (g_getenv("IS_NOT_AVAILABLE")) {
+ osync_error_set(error, OSYNC_ERROR_GENERIC, "file-sync plugin is not available");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void mock_batch_commit(OSyncContext *context, OSyncContext **contexts, OSyncChange **changes)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, context, contexts, changes);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(context);
+
+ fail_unless(env->committed_all == FALSE, NULL);
+ env->committed_all = TRUE;
+
+ int i;
+ for (i = 0; contexts[i]; i++) {
+ if (mock_access(contexts[i], changes[i])) {
+ osync_hashtable_update_hash(env->hashtable, changes[i]);
+ osync_context_report_success(contexts[i]);
+ }
+ }
+
+ if (g_getenv("NUM_BATCH_COMMITS")) {
+ int req = atoi(g_getenv("NUM_BATCH_COMMITS"));
+ fail_unless(req == i, NULL);
+ }
+
+ if (mock_get_error(env->member, "COMMITTED_ALL_ERROR")) {
+ osync_context_report_error(context, OSYNC_ERROR_EXPECTED, "Triggering COMMITTED_ALL_ERROR error");
+ return;
+ }
+
+ osync_context_report_success(context);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+static void mock_committed_all(OSyncContext *context)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, context);
+ mock_env *env = (mock_env *)osync_context_get_plugin_data(context);
+
+ fail_unless(env->committed_all == FALSE, NULL);
+ env->committed_all = TRUE;
+
+ if (mock_get_error(env->member, "COMMITTED_ALL_ERROR")) {
+ osync_context_report_error(context, OSYNC_ERROR_EXPECTED, "Triggering COMMITTED_ALL_ERROR error");
+ osync_trace(TRACE_EXIT_ERROR, "%s: Reporting error", __func__);
+ return;
+ }
+
+ osync_context_report_success(context);
+
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void get_info(OSyncEnv *env)
+{
+ OSyncPluginInfo *info = osync_plugin_new_info(env);
+
+ info->name = "file-sync";
+ info->longname = "Mock Plugin";
+ info->description = "Mock Plugin";
+ info->version = 1;
+
+ info->functions.initialize = mock_initialize;
+ info->functions.connect = mock_connect;
+ info->functions.sync_done = mock_sync_done;
+ info->functions.disconnect = mock_disconnect;
+ info->functions.finalize = mock_finalize;
+ info->functions.get_changeinfo = mock_get_changeinfo;
+ info->functions.get_data = mock_get_data;
+
+ osync_plugin_accept_objtype(info, "data");
+ osync_plugin_accept_objformat(info, "data", "mockformat", NULL);
+
+ osync_plugin_set_access_objformat(info, "data", "mockformat", mock_access);
+ osync_plugin_set_read_objformat(info, "data", "mockformat", mock_read);
+
+ //Lets reduce the timeouts a bit so the checks work faster
+ info->timeouts.disconnect_timeout = 5;
+ info->timeouts.connect_timeout = 5;
+ info->timeouts.sync_done_timeout = 5;
+ info->timeouts.get_changeinfo_timeout = 5;
+ info->timeouts.get_data_timeout = 5;
+ info->timeouts.commit_timeout = 15;
+
+
+ if (g_getenv("NO_TIMEOUTS")) {
+ info->timeouts.disconnect_timeout = 0;
+ info->timeouts.connect_timeout = 0;
+ info->timeouts.sync_done_timeout = 0;
+ info->timeouts.get_changeinfo_timeout = 0;
+ info->timeouts.get_data_timeout = 0;
+ info->timeouts.commit_timeout = 0;
+ }
+
+ if (g_getenv("IS_AVAILABLE"))
+ info->functions.is_available = mock_is_available;
+
+ osync_plugin_set_batch_commit_objformat(info, "data", "mockformat", mock_batch_commit);
+ osync_plugin_set_commit_objformat(info, "data", "mockformat", mock_commit_change);
+ osync_plugin_set_committed_all_objformat(info, "data", "mockformat", mock_committed_all);
+}
diff --git a/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h
new file mode 100644
index 00000000..5eb62454
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/mock-plugin/mock_sync.h
@@ -0,0 +1,18 @@
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <glib.h>
+#include <string.h>
+#include <config.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+typedef struct mock_env {
+ char *path;
+ OSyncMember *member;
+ GDir *dir;
+ OSyncHashTable *hashtable;
+ osync_bool committed_all;
+} mock_env;
diff --git a/debian/opensync/opensync-0.22/tests/support.c b/debian/opensync/opensync-0.22/tests/support.c
new file mode 100644
index 00000000..18eb8817
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/support.c
@@ -0,0 +1,529 @@
+#include "support.h"
+
+char *olddir = NULL;
+
+static void reset_env(void)
+{
+ unsetenv("CONNECT_ERROR");
+ unsetenv("CONNECT_TIMEOUT");
+ unsetenv("INIT_NULL");
+ unsetenv("GET_CHANGES_ERROR");
+ unsetenv("GET_CHANGES_TIMEOUT");
+ unsetenv("GET_CHANGES_TIMEOUT2");
+ unsetenv("COMMIT_ERROR");
+ unsetenv("COMMIT_TIMEOUT");
+ unsetenv("SYNC_DONE_ERROR");
+ unsetenv("SYNC_DONE_TIMEOUT");
+ unsetenv("DISCONNECT_ERROR");
+ unsetenv("DISCONNECT_TIMEOUT");
+}
+
+char *setup_testbed(char *fkt_name)
+{
+
+ setuid(65534);
+ char *testbed = g_strdup_printf("%s/testbed.XXXXXX", g_get_tmp_dir());
+ mkdtemp(testbed);
+
+ char *command = NULL;
+ if (fkt_name) {
+ command = g_strdup_printf("cp -R "OPENSYNC_TESTDATA"data/%s/* %s", fkt_name, testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+ }
+
+ command = g_strdup_printf("cp -R ../osplugin/osplugin %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("cp -R mock-plugin/.libs/*.so %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("cp -R ../formats/.libs/*.so %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("cp -R ../formats/vformats-xml/.libs/*.so %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ command = g_strdup_printf("chmod -R 700 %s", testbed);
+ if (system(command))
+ abort();
+ g_free(command);
+
+ olddir = g_get_current_dir();
+ if (chdir(testbed))
+ abort();
+
+ osync_trace(TRACE_INTERNAL, "Seting up %s at %s", fkt_name, testbed);
+
+// printf(".");
+// fflush(NULL);
+// fflush(stderr);
+ reset_env();
+ return testbed;
+}
+
+void destroy_testbed(char *path)
+{
+ char *command = g_strdup_printf("rm -rf %s", path);
+ if (olddir)
+ chdir(olddir);
+ system(command);
+ g_free(command);
+ osync_trace(TRACE_INTERNAL, "Tearing down %s", path);
+ g_free(path);
+}
+
+void conflict_handler_choose_first(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ OSyncChange *change = osengine_mapping_nth_change(mapping, 0);
+ osengine_mapping_solve(engine, mapping, change);
+}
+
+void conflict_handler_choose_modified(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ int i;
+ for (i = 0; i < osengine_mapping_num_changes(mapping); i++) {
+ OSyncChange *change = osengine_mapping_nth_change(mapping, i);
+ if (change->changetype == CHANGE_MODIFIED) {
+ osengine_mapping_solve(engine, mapping, change);
+ return;
+ }
+ }
+ fail();
+}
+
+void conflict_handler_choose_deleted(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ int i;
+ for (i = 0; i < osengine_mapping_num_changes(mapping); i++) {
+ OSyncChange *change = osengine_mapping_nth_change(mapping, i);
+ if (change->changetype == CHANGE_DELETED) {
+ osengine_mapping_solve(engine, mapping, change);
+ return;
+ }
+ }
+ fail(NULL);
+}
+
+void conflict_handler_duplication(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ osengine_mapping_duplicate(engine, mapping);
+}
+
+void conflict_handler_ignore(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ if (user_data)
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ OSyncError *error = NULL;
+ fail_unless(osengine_mapping_ignore_conflict(engine, mapping, &error), NULL);
+ fail_unless(error == NULL, NULL);
+}
+
+
+void conflict_handler_random(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ int num = osengine_mapping_num_changes(mapping);
+ int choosen = g_random_int_range(0, num);
+ OSyncChange *change = osengine_mapping_nth_change(mapping, choosen);
+ osengine_mapping_solve(engine, mapping, change);
+}
+
+static void solve_conflict(OSyncMapping *mapping)
+{
+ sleep(5);
+
+ OSyncEngine *engine = mapping->table->engine;
+
+ int i;
+ for (i = 0; i < osengine_mapping_num_changes(mapping); i++) {
+ OSyncChange *change = osengine_mapping_nth_change(mapping, i);
+ if (change->changetype == CHANGE_MODIFIED) {
+ osengine_mapping_solve(engine, mapping, change);
+ return;
+ }
+ }
+}
+
+void conflict_handler_delay(OSyncEngine *engine, OSyncMapping *mapping, void *user_data)
+{
+ num_conflicts++;
+ fail_unless(osengine_mapping_num_changes(mapping) == GPOINTER_TO_INT(user_data), NULL);
+ fail_unless(num_engine_end_conflicts == 0, NULL);
+
+ g_thread_create ((GThreadFunc)solve_conflict, mapping, TRUE, NULL);
+}
+
+void entry_status(OSyncEngine *engine, OSyncChangeUpdate *status, void *user_data)
+{
+ switch (status->type) {
+ case CHANGE_RECEIVED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_read++;
+ break;
+ case CHANGE_RECEIVED_INFO:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_read_info++;
+ break;
+ case CHANGE_SENT:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_written++;
+ break;
+ case CHANGE_WRITE_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "CHANGE_WRITE_ERROR: %s", status->error->message);
+ num_written_errors++;
+ break;
+ case CHANGE_RECV_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "CHANGE_RECV_ERROR: %s", status->error->message);
+ num_recv_errors++;
+ break;
+ }
+}
+
+void member_status(OSyncMemberUpdate *status, void *user_data)
+{
+ mark_point();
+ switch (status->type) {
+ case MEMBER_CONNECTED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_connected++;
+ break;
+ case MEMBER_DISCONNECTED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_disconnected++;
+ break;
+ case MEMBER_SENT_CHANGES:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_member_sent_changes++;
+ break;
+ case MEMBER_COMMITTED_ALL:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ num_member_comitted_all++;
+ break;
+ case MEMBER_CONNECT_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_CONNECT_ERROR: %s", status->error->message);
+ num_member_connect_errors++;
+ break;
+ case MEMBER_GET_CHANGES_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_CONNECT_ERROR: %s", status->error->message);
+ num_member_get_changes_errors++;
+ break;
+ case MEMBER_SYNC_DONE_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_SYNC_DONE_ERROR: %s", status->error->message);
+ num_member_sync_done_errors++;
+ break;
+ case MEMBER_DISCONNECT_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_DISCONNECT_ERROR: %s", status->error->message);
+ num_member_disconnect_errors++;
+ break;
+ case MEMBER_COMMITTED_ALL_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MEMBER_COMMITTED_ALL_ERROR: %s", status->error->message);
+ num_member_comitted_all_errors++;
+ break;
+ }
+}
+
+void engine_status(OSyncEngine *engine, OSyncEngineUpdate *status, void *user_data)
+{
+ switch (status->type) {
+ case ENG_ENDPHASE_CON:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients connected or error");
+ num_engine_connected++;
+ break;
+ case ENG_ENDPHASE_READ:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients sent changes or error");
+ num_engine_read++;
+ break;
+ case ENG_ENDPHASE_WRITE:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients have writen");
+ num_engine_wrote++;
+ break;
+ case ENG_ENDPHASE_DISCON:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "All clients have disconnected");
+ num_engine_disconnected++;
+ break;
+ case ENG_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "ENG_ERROR: %s", status->error->message);
+ num_engine_errors++;
+ break;
+ case ENG_SYNC_SUCCESSFULL:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Sync Successfull");
+ num_engine_successfull++;
+ break;
+ case ENG_PREV_UNCLEAN:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Previous sync was unclean");
+ num_engine_prev_unclean++;
+ break;
+ case ENG_END_CONFLICTS:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "End conflicts");
+ num_engine_end_conflicts++;
+ break;
+ }
+}
+
+void mapping_status(OSyncMappingUpdate *status, void *user_data)
+{
+ switch (status->type) {
+ case MAPPING_SOLVED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Mapping solved");
+ break;
+ case MAPPING_SYNCED:
+ fail_unless(!osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "Mapping Synced");
+ break;
+ case MAPPING_WRITE_ERROR:
+ fail_unless(osync_error_is_set(&(status->error)), NULL);
+ osync_debug("TEST", 4, "MAPPING_WRITE_ERROR: %s", status->error->message);
+ num_mapping_errors++;
+ break;
+ }
+}
+
+OSyncEngine *init_engine(OSyncGroup *group)
+{
+ OSyncError *error = NULL;
+ OSyncEngine *engine = osengine_new(group, &error);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ osengine_set_memberstatus_callback(engine, member_status, NULL);
+ osengine_set_mappingstatus_callback(engine, mapping_status, NULL);
+ osengine_set_changestatus_callback(engine, entry_status, NULL);
+ mark_point();
+ fail_unless(engine != NULL, NULL);
+ fail_unless(osengine_init(engine, &error), NULL);
+ return engine;
+}
+
+osync_bool synchronize_once(OSyncEngine *engine, OSyncError **error)
+{
+ num_connected = 0;
+ num_disconnected = 0;
+ num_conflicts = 0;
+ num_written = 0;
+ num_read = 0;
+ num_read_info = 0;
+ num_member_connect_errors = 0;
+ num_member_sent_changes = 0;
+ num_engine_errors = 0;
+ num_engine_successfull = 0;
+ num_member_get_changes_errors = 0;
+ num_written_errors = 0;
+ num_mapping_errors = 0;
+ num_member_sync_done_errors = 0;
+ num_member_disconnect_errors = 0;
+ num_engine_prev_unclean = 0;
+ num_engine_end_conflicts = 0;
+ num_engine_connected = 0;
+ num_engine_read = 0;
+ num_engine_wrote = 0;
+ num_engine_disconnected = 0;
+ num_member_comitted_all_errors = 0;
+ num_recv_errors = 0;
+ num_member_comitted_all = 0;
+
+ mark_point();
+ return osengine_sync_and_block(engine, error);
+}
+
+/*needed because of an incompatible API change in 0.94*/
+#if CHECK_VERSION <= 903
+void create_case(Suite *s, const char *name, void (*function)(void))
+#else /*CHECK_VERSION > 903*/
+void create_case(Suite *s, const char *name, void (*function)(int))
+#endif /*CHECK_VERSION*/
+{
+ TCase *tc_new = tcase_create(name);
+ tcase_set_timeout(tc_new, 30);
+ suite_add_tcase (s, tc_new);
+ tcase_add_test(tc_new, function);
+}
+
+OSyncMappingTable *mappingtable_load(OSyncGroup *group, int num_mappings, int num_unmapped)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %i)", __func__, group, num_mappings, num_unmapped);
+ mark_point();
+ OSyncEnv *osync = init_env();
+ OSyncGroup *newgroup = osync_group_load(osync, "configs/group", NULL);
+ OSyncMappingTable *maptable = _osengine_mappingtable_load_group(newgroup);
+ mark_point();
+ fail_unless(g_list_length(maptable->mappings) == num_mappings, NULL);
+ fail_unless(g_list_length(maptable->unmapped) == num_unmapped, NULL);
+ osync_trace(TRACE_EXIT, "%s: %p", __func__, maptable);
+ return maptable;
+}
+
+void mappingtable_close(OSyncMappingTable *maptable)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p)", __func__, maptable);
+ osengine_mappingtable_close(maptable);
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+void check_mapping(OSyncMappingTable *maptable, int memberid, int mappingid, int numentries, const char *uid, const char *format, const char *objecttype)
+{
+ osync_trace(TRACE_ENTRY, "%s(%p, %i, %i, %i, %s, %s, %s)", __func__, maptable, memberid, mappingid, numentries, uid, format, objecttype);
+ OSyncMapping *mapping = NULL;
+ mark_point();
+ OSyncMember *member = osync_member_from_id(maptable->group, memberid);
+ OSyncMappingView *view = osengine_mappingtable_find_view(maptable, member);
+ mark_point();
+ if (mappingid != -1) {
+ mapping = g_list_nth_data(maptable->mappings, mappingid);
+ } else {
+ GList *m;
+ for (m = maptable->mappings; m; m = m->next) {
+ mapping = m->data;
+ OSyncMappingEntry *entry = osengine_mapping_find_entry(mapping, NULL, view);
+ if (!entry)
+ continue;
+ OSyncChange *change = entry->change;
+ fail_unless(change != NULL, NULL);
+ if (!strcmp(osync_change_get_uid(change), uid))
+ break;
+ }
+ }
+ fail_unless(mapping != NULL, NULL);
+ fail_unless(osengine_mapping_num_changes(mapping) == numentries, "osengine_mapping_num_changes(mapping) == numentries for %s, %i: %i != %i", uid, memberid, osengine_mapping_num_changes(mapping), numentries);
+ mark_point();
+
+
+ OSyncChange *change = osengine_mapping_find_entry(mapping, NULL, view)->change;
+ fail_unless(change != NULL, NULL);
+ if (format)
+ fail_unless(!strcmp(osync_objformat_get_name(osync_change_get_objformat(change)), format), NULL);
+ if (objecttype)
+ fail_unless(!strcmp(osync_objtype_get_name(osync_change_get_objtype(change)), objecttype), NULL);
+ if (uid && strcmp(osync_change_get_uid(change), uid)) {
+ printf("uid mismatch: %s != %s for member %i and mapping %i\n", osync_change_get_uid(change), uid, memberid, mappingid);
+ fail("uid mismatch");
+ }
+ osync_trace(TRACE_EXIT, "%s", __func__);
+}
+
+OSyncHashTable *hashtable_load(OSyncGroup *group, int memberid, int entries)
+{
+ mark_point();
+ OSyncMember *member = osync_member_from_id(group, memberid);
+ mark_point();
+ OSyncHashTable *table = osync_hashtable_new();
+ mark_point();
+ fail_unless(osync_hashtable_load(table, member, NULL), NULL);
+ mark_point();
+ fail_unless(osync_hashtable_num_entries(table) == entries, NULL);
+ return table;
+}
+
+void check_hash(OSyncHashTable *table, const char *cmpuid)
+{
+ char *uid = NULL;
+ char *hash = NULL;
+ int i;
+ osync_bool found = FALSE;
+ for (i = 0; i < osync_hashtable_num_entries(table); i++) {
+ osync_hashtable_nth_entry(table, i, &uid, &hash);
+ if (!strcmp(cmpuid, uid))
+ found = TRUE;
+ }
+ fail_unless(found == TRUE, NULL);
+}
+
+static void load_format(OSyncEnv *env, const char *name)
+{
+ OSyncError *error = NULL;
+ char *path = g_strdup_printf("%s/%s", g_get_current_dir(), name);
+ fail_unless(osync_module_load(env, path, &error), NULL);
+ g_free(path);
+}
+
+OSyncEnv *init_env(void)
+{
+ mark_point();
+ OSyncEnv *osync = osync_env_new();
+ mark_point();
+ osync_env_set_option(osync, "LOAD_GROUPS", "FALSE");
+ osync_env_set_option(osync, "LOAD_FORMATS", "FALSE");
+ osync_env_set_option(osync, "LOAD_PLUGINS", "FALSE");
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_env_initialize(osync, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+
+ char *path = g_strdup_printf("%s/%s", g_get_current_dir(), "mock_sync.so");
+ fail_unless(osync_module_load(osync, path, &error), NULL);
+ g_free(path);
+
+ load_format(osync, "contact.so");
+ load_format(osync, "data.so");
+ load_format(osync, "event.so");
+ load_format(osync, "note.so");
+ load_format(osync, "todo.so");
+ load_format(osync, "xml-vcal.so");
+ load_format(osync, "xml-vcard.so");
+ load_format(osync, "xml-vnote.so");
+ load_format(osync, "xml-evolution.so");
+ load_format(osync, "xml-kde.so");
+ load_format(osync, "mockformat.so");
+
+ return osync;
+}
+
+OSyncEnv *init_env_none(void)
+{
+ mark_point();
+ OSyncEnv *osync = osync_env_new();
+ mark_point();
+ osync_env_set_option(osync, "LOAD_GROUPS", "FALSE");
+ osync_env_set_option(osync, "LOAD_FORMATS", "FALSE");
+ osync_env_set_option(osync, "LOAD_PLUGINS", "FALSE");
+ mark_point();
+ OSyncError *error = NULL;
+ fail_unless(osync_env_initialize(osync, &error), NULL);
+ fail_unless(!osync_error_is_set(&error), NULL);
+ return osync;
+}
diff --git a/debian/opensync/opensync-0.22/tests/support.h b/debian/opensync/opensync-0.22/tests/support.h
new file mode 100644
index 00000000..9ccee451
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tests/support.h
@@ -0,0 +1,78 @@
+#ifndef SUPPORT_H
+#define SUPPORT_H
+
+#include <check.h>
+
+#ifndef CHECK_VERSION
+#define CHECK_VERSION (CHECK_MAJOR_VERSION * 10000 + CHECK_MINOR_VERSION * 100 + CHECK_MICRO_VERSION)
+#endif /*CHECK_VERSION*/
+
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include "engine.h"
+#include "engine_internals.h"
+
+char *setup_testbed(char *fkt_name);
+void destroy_testbed(char *path);
+
+int num_conflicts;
+int num_written;
+int num_read;
+int num_connected;
+int num_disconnected;
+int num_read_info;
+
+int num_member_connect_errors;
+int num_member_sent_changes;
+int num_member_get_changes_errors;
+int num_member_sync_done_errors;
+int num_member_disconnect_errors;
+int num_member_comitted_all_errors;
+int num_member_comitted_all;
+
+int num_written_errors;
+int num_mapping_errors;
+int num_recv_errors;
+
+int num_engine_errors;
+int num_engine_successfull;
+int num_engine_prev_unclean;
+int num_engine_end_conflicts;
+int num_engine_connected;
+int num_engine_read;
+int num_engine_wrote;
+int num_engine_disconnected;
+
+void conflict_handler_choose_first(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_choose_modified(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_choose_deleted(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_duplication(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_delay(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+void conflict_handler_ignore(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+
+void entry_status(OSyncEngine *engine, OSyncChangeUpdate *status, void *user_data);
+void member_status(OSyncMemberUpdate *status, void *user_data);
+void engine_status(OSyncEngine *engine, OSyncEngineUpdate *status, void *user_data);
+void mapping_status(OSyncMappingUpdate *status, void *user_data);
+
+OSyncEngine *init_engine(OSyncGroup *group);
+void conflict_handler_random(OSyncEngine *engine, OSyncMapping *mapping, void *user_data);
+osync_bool synchronize_once(OSyncEngine *engine, OSyncError **error);
+
+/*needed because of an incompatible API change in 0.94*/
+#if CHECK_VERSION <= 903
+void create_case(Suite *s, const char *name, void (*function)(void));
+#else /*CHECK_VERSION > 903*/
+void create_case(Suite *s, const char *name, void (*function)(int));
+#endif /*CHECK_VERSION*/
+
+OSyncMappingTable *mappingtable_load(OSyncGroup *group, int num_mappings, int num_unmapped);
+void mappingtable_close(OSyncMappingTable *maptable);
+
+OSyncHashTable *hashtable_load(OSyncGroup *group, int member, int entries);
+void check_hash(OSyncHashTable *table, const char *cmpuid);
+void check_mapping(OSyncMappingTable *table, int memberid, int mappingid, int numentries, const char *uid, const char *format, const char *objecttype);
+OSyncEnv *init_env(void);
+OSyncEnv *init_env_none(void);
+
+#endif /*SUPPORT_H*/
diff --git a/debian/opensync/opensync-0.22/tools/Makefile.am b/debian/opensync/opensync-0.22/tools/Makefile.am
new file mode 100755
index 00000000..eeec3a84
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tools/Makefile.am
@@ -0,0 +1,34 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CFLAGS = -Wall -Werror @GCOV_CFLAGS@
+
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine
+
+if ENABLE_TOOLS
+bin_PROGRAMS = osyncdump osyncstress osyncplugin osynctest osyncbinary
+endif
+
+osyncdump_SOURCES = osyncdump.c
+osyncdump_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osyncdump_LDADD = $(top_builddir)/opensync/libopensync.la
+
+osyncstress_SOURCES = osyncstress.c
+osyncstress_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osyncstress_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
+
+osyncplugin_SOURCES = osyncplugin.c
+osyncplugin_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osyncplugin_LDADD = $(top_builddir)/opensync/libopensync.la
+
+osynctest_SOURCES = osynctest.c
+osynctest_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osynctest_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
+
+osyncbinary_SOURCES = osyncbinary.c
+osyncbinary_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir)
+osyncbinary_LDADD = $(top_builddir)/opensync/libopensync.la
+
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
diff --git a/debian/opensync/opensync-0.22/tools/Makefile.in b/debian/opensync/opensync-0.22/tools/Makefile.in
new file mode 100644
index 00000000..006666c0
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tools/Makefile.in
@@ -0,0 +1,556 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_TOOLS_TRUE@bin_PROGRAMS = osyncdump$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@ osyncstress$(EXEEXT) osyncplugin$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@ osynctest$(EXEEXT) osyncbinary$(EXEEXT)
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_osyncbinary_OBJECTS = osyncbinary.$(OBJEXT)
+osyncbinary_OBJECTS = $(am_osyncbinary_OBJECTS)
+osyncbinary_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+am_osyncdump_OBJECTS = osyncdump.$(OBJEXT)
+osyncdump_OBJECTS = $(am_osyncdump_OBJECTS)
+osyncdump_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+am_osyncplugin_OBJECTS = osyncplugin.$(OBJEXT)
+osyncplugin_OBJECTS = $(am_osyncplugin_OBJECTS)
+osyncplugin_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+am_osyncstress_OBJECTS = osyncstress.$(OBJEXT)
+osyncstress_OBJECTS = $(am_osyncstress_OBJECTS)
+osyncstress_DEPENDENCIES = $(top_builddir)/osengine/libosengine.la \
+ $(top_builddir)/opensync/libopensync.la
+am_osynctest_OBJECTS = osynctest.$(OBJEXT)
+osynctest_OBJECTS = $(am_osynctest_OBJECTS)
+osynctest_DEPENDENCIES = $(top_builddir)/osengine/libosengine.la \
+ $(top_builddir)/opensync/libopensync.la
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(osyncbinary_SOURCES) $(osyncdump_SOURCES) \
+ $(osyncplugin_SOURCES) $(osyncstress_SOURCES) \
+ $(osynctest_SOURCES)
+DIST_SOURCES = $(osyncbinary_SOURCES) $(osyncdump_SOURCES) \
+ $(osyncplugin_SOURCES) $(osyncstress_SOURCES) \
+ $(osynctest_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = -Wall -Werror @GCOV_CFLAGS@
+INCLUDES = -I$(top_srcdir) @PACKAGE_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/osengine
+osyncdump_SOURCES = osyncdump.c
+osyncdump_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osyncdump_LDADD = $(top_builddir)/opensync/libopensync.la
+osyncstress_SOURCES = osyncstress.c
+osyncstress_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osyncstress_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
+osyncplugin_SOURCES = osyncplugin.c
+osyncplugin_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osyncplugin_LDADD = $(top_builddir)/opensync/libopensync.la
+osynctest_SOURCES = osynctest.c
+osynctest_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+osynctest_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
+osyncbinary_SOURCES = osyncbinary.c
+osyncbinary_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir)
+osyncbinary_LDADD = $(top_builddir)/opensync/libopensync.la
+CLEANFILES = \
+ *.bb \
+ *.bbg \
+ *.da
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign 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: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+osyncbinary$(EXEEXT): $(osyncbinary_OBJECTS) $(osyncbinary_DEPENDENCIES)
+ @rm -f osyncbinary$(EXEEXT)
+ $(LINK) $(osyncbinary_LDFLAGS) $(osyncbinary_OBJECTS) $(osyncbinary_LDADD) $(LIBS)
+osyncdump$(EXEEXT): $(osyncdump_OBJECTS) $(osyncdump_DEPENDENCIES)
+ @rm -f osyncdump$(EXEEXT)
+ $(LINK) $(osyncdump_LDFLAGS) $(osyncdump_OBJECTS) $(osyncdump_LDADD) $(LIBS)
+osyncplugin$(EXEEXT): $(osyncplugin_OBJECTS) $(osyncplugin_DEPENDENCIES)
+ @rm -f osyncplugin$(EXEEXT)
+ $(LINK) $(osyncplugin_LDFLAGS) $(osyncplugin_OBJECTS) $(osyncplugin_LDADD) $(LIBS)
+osyncstress$(EXEEXT): $(osyncstress_OBJECTS) $(osyncstress_DEPENDENCIES)
+ @rm -f osyncstress$(EXEEXT)
+ $(LINK) $(osyncstress_LDFLAGS) $(osyncstress_OBJECTS) $(osyncstress_LDADD) $(LIBS)
+osynctest$(EXEEXT): $(osynctest_OBJECTS) $(osynctest_DEPENDENCIES)
+ @rm -f osynctest$(EXEEXT)
+ $(LINK) $(osynctest_LDFLAGS) $(osynctest_OBJECTS) $(osynctest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osyncbinary.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osyncdump.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osyncplugin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osyncstress.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osynctest.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; 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:
+ -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-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic 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-binPROGRAMS install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-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:
diff --git a/debian/opensync/opensync-0.22/tools/osyncbinary.c b/debian/opensync/opensync-0.22/tools/osyncbinary.c
new file mode 100644
index 00000000..b712526b
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tools/osyncbinary.c
@@ -0,0 +1,147 @@
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <sys/time.h>
+
+
+static void usage (char *name, int ecode)
+{
+ fprintf (stderr, "Usage: %s\n", name);
+ fprintf (stderr, "%s <Input> <Output>\n", name);
+ fprintf (stderr, "[--hex]\tConvert from a plain hex format\n");
+ exit (ecode);
+}
+
+osync_bool convert_hex(const char *input, unsigned int inpsize, char **output, unsigned int *outsize)
+{
+ int i = 0;
+ GString *string = g_string_new("");
+ unsigned int character = 0;
+ for (i = 0; i < inpsize - 1; i = i + 2) {
+ printf("Current char is %c%c\n", input[i], input[i + 1]);
+
+ char tmp[3];
+ tmp[0] = input[i];
+ tmp[1] = input[i + 1];
+ tmp[2] = 0;
+
+ sscanf(tmp, " %x", &character);
+ g_string_append_c(string, character);
+ }
+
+ *outsize = string->len;
+ *output = g_string_free(string, FALSE);
+ return TRUE;
+}
+
+osync_bool convert_bin(const char *input, unsigned int inpsize, char **output, unsigned int *outsize)
+{
+ int i = 0;
+ GString *string = g_string_new("");
+
+ for (i = 0; i < inpsize; i++) {
+ printf("\nCurrent char is %i (%c)\n", input[i], input[i]);
+ if (input[i] == '\r' || input[i] == '\n') {
+ printf("Invalid input\n");
+ return FALSE;
+ }
+
+ //char string1[2] = "";
+ //char string2[3] = "";
+ unsigned int character = 0;
+ //int ret = ;
+ printf("returned is %i\n", sscanf(input + i, " %x %*s", &character));
+ printf("returned is %i\n", sscanf(input + i, " %x %*s", &character));
+ if (g_pattern_match_simple(" ?? *", input + i) && sscanf(input + i, " %x %*s", &character) == 1) {
+ printf("returned is %i\n", sscanf(input + i, " %x %*s", &character));
+
+ //if () { //0-9][0-9]
+
+ printf("escaped chars are %.4s %i\n", input + i, sscanf(input + i, " %x %*s", &character));
+ printf("returned is %i\n", sscanf(input + i, " %x %*s", &character));
+ if (sscanf(input + i, " %x %*s", &character) != 1)
+ return FALSE;
+ printf("Found a escaped char %i\n", character);
+ g_string_append_c(string, character);
+ i+=3;
+ } else {
+ if (input[i] != 0) {
+ printf("Appending normal char %i\n", input[i]);
+ g_string_append_c(string, input[i]);
+ }
+ }
+ }
+
+ *outsize = string->len;
+ *output = g_string_free(string, FALSE);
+ return TRUE;
+}
+
+int main (int argc, char *argv[])
+{
+ OSyncError *error = NULL;
+
+ osync_bool hex = FALSE;
+
+ if (argc < 3)
+ usage (argv[0], 1);
+
+ int i = 1;
+ for (i = 1; i < argc; i++) {
+ char *arg = argv[i];
+ if (!strcmp (arg, "--hex")) {
+ hex = TRUE;
+ } else if (!strcmp (arg, "--help")) {
+ usage (argv[0], 0);
+ } else {
+ break;
+ }
+ }
+
+ char *input = argv[i];
+ char *output = argv[i + 1];
+
+ printf("input %s output %s\n", input, output);
+
+ char *buffer = NULL;
+ int size = 0;
+ if (!osync_file_read(input, &buffer, &size, &error)) {
+ fprintf(stderr, "%s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+
+ char **array = g_strsplit(buffer, "\n", 0);
+ g_free(buffer);
+ buffer = g_strjoinv(NULL, array);
+ size = strlen(buffer) + 1;
+ g_strfreev(array);
+
+ char *outbuffer = NULL;
+ unsigned int outsize = 0;
+ if (hex) {
+ if (!convert_hex(buffer, size, &outbuffer, &outsize)) {
+ fprintf(stderr, "Unable to convert");
+ return 1;
+ }
+ } else {
+ if (!convert_bin(buffer, size, &outbuffer, &outsize)) {
+ fprintf(stderr, "Unable to convert");
+ return 1;
+ }
+ }
+
+ if (!osync_file_write(output, outbuffer, outsize, 0644, &error)) {
+ fprintf(stderr, "Unable to write file %s: %s", output, osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/debian/opensync/opensync-0.22/tools/osyncdump.c b/debian/opensync/opensync-0.22/tools/osyncdump.c
new file mode 100644
index 00000000..423f1827
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tools/osyncdump.c
@@ -0,0 +1,241 @@
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include <osengine/engine.h>
+#include <osengine/engine_internals.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sqlite3.h>
+
+static void usage (char *name, int ecode)
+{
+ fprintf (stderr, "Usage: %s <groupname>\n", name);
+ fprintf (stderr, "[--mappings] \tDump all mappings. Default\n");
+ fprintf (stderr, "[--hash <memberid>] \tDump hash table for member id\n");
+ fprintf (stderr, "[--unmapped] \tAlso dumps changes which are unmapped\n");
+ fprintf (stderr, "[--configdir] \tSet a different configdir then ~./opensync\n");
+ fprintf (stderr, "[--reset] \tReset the database for this group\n");
+ exit(ecode);
+}
+
+typedef enum {
+ DUMPMAPS = 1,
+ DUMPHASH = 2,
+ DUMPUNMAPPED = 3,
+ RESET = 4
+} ToolAction;
+
+static void dump_map(OSyncEnv *osync, char *groupname)
+{
+ OSyncGroup *group = osync_env_find_group(osync, groupname);
+
+ if (!group) {
+ printf("Unable to find group with name \"%s\"\n", groupname);
+ return;
+ }
+
+
+ OSyncChange **changes = NULL;
+ OSyncError *error = NULL;
+ if (!osync_changes_load(group, &changes, &error)) {
+ printf("Unable to load changes: %s\n", osync_error_print(&error));
+ return;
+ }
+
+ int i = 0;
+ OSyncChange *change = NULL;
+ while ((change = changes[i])) {
+ OSyncMember *member = osync_change_get_member(change);
+ int memberid = 0;
+ if (member)
+ memberid = osync_member_get_id(member);
+ const char *formatname = NULL;
+ if (osync_change_get_objformat(change))
+ formatname = osync_objformat_get_name(osync_change_get_objformat(change));
+ const char *objname = NULL;
+ if (osync_change_get_objtype(change))
+ objname = osync_objtype_get_name(osync_change_get_objtype(change));
+ printf("ID: %lli UID: %s MEMBER: %i\n\tOBJTYPE: %s OBJFORMAT: %s MAPPINGID: %lli\n", osync_change_get_id(change), osync_change_get_uid(change), memberid, objname, formatname, osync_change_get_mappingid(change));
+ i++;
+ }
+
+ osync_changes_close(group);
+}
+
+static void dump_unmapped(OSyncEnv *osync, char *groupname)
+{
+ OSyncGroup *group = osync_env_find_group(osync, groupname);
+
+ if (!group) {
+ printf("Unable to find group with name \"%s\"\n", groupname);
+ return;
+ }
+
+ char *filename = g_strdup_printf("%s/change.db", osync_group_get_configdir(group));
+ OSyncDB *db = osync_db_open(filename, NULL);
+ g_free(filename);
+
+ sqlite3 *sdb = db->db;
+
+ sqlite3_stmt *ppStmt = NULL;
+ sqlite3_prepare(sdb, "SELECT id, uid, objtype, format, memberid FROM tbl_changes WHERE mappingid=0", -1, &ppStmt, NULL);
+ while (sqlite3_step(ppStmt) == SQLITE_ROW) {
+ long long int entryid = sqlite3_column_int64(ppStmt, 0);
+ char *uid = g_strdup((gchar*)sqlite3_column_text(ppStmt, 1));
+ char *objtype = g_strdup((gchar*)sqlite3_column_text(ppStmt, 2));
+ char *objformat = g_strdup((gchar*)sqlite3_column_text(ppStmt, 3));
+ long long int memberid = sqlite3_column_int64(ppStmt, 4);
+
+ printf("ID: %lli UID: %s MEMBER: %lli, TYPE %s, FORMAT %s\n", entryid, uid, memberid, objtype, objformat);
+ }
+ sqlite3_finalize(ppStmt);
+
+ osync_db_close(db);
+
+
+ /*
+
+ OSyncMappingTable *table = osync_mappingtable_new(group);
+ char *entrydb = g_strdup_printf("%s/change.db", osync_group_get_configdir(group)); //FIXME!!!
+ DB *entrytable = osync_db_open(entrydb, "Entries", DB_BTREE, NULL);
+ g_free(entrydb);
+ if (!entrytable) {
+ printf("Unable to open change database\n");
+ return;
+ }
+
+ DBC *dbcp = osync_db_cursor_new(entrytable);
+
+ void *entryid;
+ void *data;
+
+ OSyncChange *change = NULL;
+
+ while (osync_db_cursor_next(dbcp, &entryid, &data)) {
+ change = osync_change_new();
+ osync_change_unmarshal(table, change, data);
+
+ }
+ osync_db_cursor_close(dbcp);
+
+ osync_db_close(entrytable);*/
+}
+
+static void dump_hash(OSyncEnv *osync, char *groupname, char *memberid)
+{
+ long long int id = atoi(memberid);
+ OSyncGroup *group = osync_env_find_group(osync, groupname);
+
+ if (!group) {
+ printf("Unable to find group with name %s\n", groupname);
+ return;
+ }
+
+ OSyncMember *member = osync_member_from_id(group, id);
+ if (!member) {
+ printf("Unable to find member with id %s\n", memberid);
+ return;
+ }
+
+ OSyncHashTable *table = osync_hashtable_new();
+ osync_db_open_hashtable(table, member, NULL);
+
+ sqlite3 *sdb = table->dbhandle->db;
+
+ sqlite3_stmt *ppStmt = NULL;
+ sqlite3_prepare(sdb, "SELECT uid, hash FROM tbl_hash", -1, &ppStmt, NULL);
+ while (sqlite3_step(ppStmt) == SQLITE_ROW) {
+ char *uid = g_strdup((gchar*)sqlite3_column_text(ppStmt, 0));
+ char *hash = g_strdup((gchar*)sqlite3_column_text(ppStmt, 1));
+ printf("UID: %s HASH: %s\n", uid, hash);
+ }
+ sqlite3_finalize(ppStmt);
+
+ osync_db_close_hashtable(table);
+}
+
+static void reset(OSyncEnv *osync, char *groupname)
+{
+ OSyncGroup *group = osync_env_find_group(osync, groupname);
+
+ if (!group) {
+ printf("Unable to find group with name \"%s\"\n", groupname);
+ return;
+ }
+
+ osync_group_reset(group);
+}
+
+int main (int argc, char *argv[])
+{
+ int i;
+ char *groupname = NULL;
+ char *membername = NULL;
+ ToolAction action = DUMPMAPS;
+ char *configdir = NULL;
+
+ if (argc == 1)
+ usage (argv[0], 1);
+
+ groupname = argv[1];
+ for (i = 2; i < argc; i++) {
+ char *arg = argv[i];
+ if (!strcmp (arg, "--mappings")) {
+ action = DUMPMAPS;
+ } else if (!strcmp (arg, "--hash")) {
+ action = DUMPHASH;
+ membername = argv[i + 1];
+ i++;
+ if (!membername)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--reset")) {
+ action = RESET;
+ } else if (!strcmp (arg, "--unmapped")) {
+ action = DUMPUNMAPPED;
+ } else if (!strcmp (arg, "--help")) {
+ usage (argv[0], 0);
+ } else if (!strcmp (arg, "--configdir")) {
+ configdir = argv[i + 1];
+ i++;
+ if (!configdir)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--")) {
+ break;
+ } else if (arg[0] == '-') {
+ usage (argv[0], 1);
+ } else {
+ usage (argv[0], 1);
+ }
+ }
+
+ OSyncEnv *osync = osync_env_new();
+ osync_env_set_option(osync, "GROUPS_DIRECTORY", configdir);
+
+ OSyncError *error = NULL;
+ if (!osync_env_initialize(osync, &error)) {
+ printf("Unable to initialize environment: %s\n", error->message);
+ osync_error_free(&error);
+ return 1;
+ }
+
+ switch (action) {
+ case DUMPMAPS:
+ dump_map(osync, groupname);
+ break;
+ case DUMPHASH:
+ dump_hash(osync, groupname, membername);
+ break;
+ case DUMPUNMAPPED:
+ dump_unmapped(osync, groupname);
+ break;
+ case RESET:
+ reset(osync, groupname);
+ break;
+ default:
+ printf("error\n");
+ }
+
+ return 0;
+}
diff --git a/debian/opensync/opensync-0.22/tools/osyncplugin.c b/debian/opensync/opensync-0.22/tools/osyncplugin.c
new file mode 100644
index 00000000..f6bf9853
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tools/osyncplugin.c
@@ -0,0 +1,576 @@
+#include <opensync/opensync.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <glib.h>
+
+GMutex *working;
+GMutex *working2;
+GList *changes;
+GList *tests;
+osync_bool alwaysempty;
+osync_bool noaccess = FALSE;
+
+typedef struct OSyncPluginTest {
+ char *name;
+ void (*test)(OSyncMember *, const char *);
+} OSyncPluginTest;
+
+static void usage (char *name, int ecode)
+{
+ fprintf (stderr, "Usage: %s <pluginname>\n", name);
+ fprintf (stderr, "--config <filename>\tSet the config file to use\n");
+ fprintf (stderr, "--type <object type>\tSets the objtype to test\n");
+ fprintf (stderr, "--empty\tOnly deleta all data. Do not test\n");
+ exit (ecode);
+}
+
+GMainLoop *loop = NULL;
+gboolean busy = FALSE;
+
+static void stress_message_callback(OSyncMember *member, void *user_data, OSyncError *error)
+{
+ //g_mutex_unlock(working);
+ g_main_loop_quit(loop);
+ busy = FALSE;
+}
+
+static void stress_message_callback2(OSyncMember *member, void *user_data, OSyncError *error)
+{
+ g_mutex_unlock(working2);
+}
+
+static void changes_sink(OSyncMember *member, OSyncChange *change, void *user_data)
+{
+ if (!osync_change_has_data(change)) {
+ g_mutex_lock(working2);
+ osync_member_get_change_data(member, change, (OSyncEngCallback)stress_message_callback2, NULL);
+ g_mutex_lock(working2);
+ g_mutex_unlock(working2);
+ }
+ changes = g_list_append(changes, change);
+}
+
+static void connect(OSyncMember *member)
+{
+ //g_mutex_lock(working);
+ osync_member_connect(member, (OSyncEngCallback)stress_message_callback, NULL);
+ g_main_loop_run(loop);
+ //g_mutex_lock(working);
+ //g_mutex_unlock(working);
+}
+
+static void disconnect(OSyncMember *member)
+{
+ /*g_mutex_lock(working);
+ osync_member_sync_done(member, (OSyncEngCallback)stress_message_callback, NULL);
+ g_mutex_lock(working);
+ g_mutex_unlock(working);*/
+
+ //g_mutex_lock(working);
+ busy = TRUE;
+
+ osync_member_disconnect(member, (OSyncEngCallback)stress_message_callback, NULL);
+
+ if (busy)
+ g_main_loop_run(loop);
+
+ //g_mutex_lock(working);
+ //g_mutex_unlock(working);
+}
+
+static void sync_done(OSyncMember *member)
+{
+ //g_mutex_lock(working);
+ osync_member_sync_done(member, (OSyncEngCallback)stress_message_callback, NULL);
+ g_main_loop_run(loop);
+ //g_mutex_lock(working);
+ //g_mutex_unlock(working);
+}
+
+static void committed_all(OSyncMember *member)
+{
+ osync_member_committed_all(member, (OSyncEngCallback)stress_message_callback, NULL);
+ g_main_loop_run(loop);
+}
+
+static GList *get_changes(OSyncMember *member)
+{
+ changes = NULL;
+ //g_mutex_lock(working);
+ osync_member_get_changeinfo(member, (OSyncEngCallback)stress_message_callback, NULL);
+ g_main_loop_run(loop);
+ //g_mutex_lock(working);
+ //g_mutex_unlock(working);
+ printf("Number of changes %i\n", g_list_length(changes));
+ return changes;
+}
+
+static OSyncChange *add_data(OSyncMember *member, const char *objtype)
+{
+ OSyncChange *change = NULL;
+ if (!(change = osync_member_add_random_data(member, objtype))) {
+ printf("unable to add data\n");
+ g_assert_not_reached();
+ }
+ printf("Added change with uid %s\n", osync_change_get_uid(change));
+ return change;
+}
+
+static void modify_data(OSyncMember *member, OSyncChange *change)
+{
+ sleep(2);
+ if (!osync_member_modify_random_data(member, change)) {
+ printf("unable to modify data\n");
+ g_assert_not_reached();
+ }
+ printf("Modified change with uid %s\n", osync_change_get_uid(change));
+ return;
+}
+
+static void delete_data(OSyncMember *member, OSyncChange *change)
+{
+ if (!osync_member_delete_data(member, change)) {
+ printf("unable to delete data\n");
+ g_assert_not_reached();
+ }
+
+ printf("Deleted change with uid %s\n", osync_change_get_uid(change));
+ return;
+}
+
+static void multi_init(OSyncMember *member, const char *objtype)
+{
+ printf("initializing multiple times\n");
+ connect(member);
+ disconnect(member);
+
+ osync_member_finalize(member);
+
+ OSyncError *error = NULL;
+ if (!osync_member_initialize(member, &error)) {
+ osync_trace(TRACE_EXIT_ERROR, "unable to initialize: %s", osync_error_print(&error));
+ printf("Unable to initialize\n");
+ exit(1);
+ }
+
+ if (objtype) {
+ osync_member_set_objtype_enabled(member, "data", FALSE);
+ osync_member_set_objtype_enabled(member, objtype, TRUE);
+ }
+
+ connect(member);
+ disconnect(member);
+
+ osync_member_finalize(member);
+
+ if (!osync_member_initialize(member, &error)) {
+ osync_trace(TRACE_EXIT_ERROR, "unable to initialize: %s", osync_error_print(&error));
+ printf("Unable to initialize\n");
+ exit(1);
+ }
+
+ if (objtype) {
+ osync_member_set_objtype_enabled(member, "data", FALSE);
+ osync_member_set_objtype_enabled(member, objtype, TRUE);
+ }
+}
+
+static void add_test1(OSyncMember *member, const char *objtype)
+{
+ printf("Test \"Add1\" starting\n");
+ printf("Adding data... ");
+ fflush(stdout);
+ connect(member);
+ get_changes(member);
+ OSyncChange *change = add_data(member, objtype);
+ committed_all(member);
+ if (noaccess)
+ sync_done(member);
+ disconnect(member);
+ printf("success\n");
+
+ if (noaccess)
+ osync_member_set_slow_sync(member, "data", TRUE);
+
+
+ printf("Reading data... \r");
+ connect(member);
+ GList *chg = get_changes(member);
+
+ g_assert(g_list_length(chg) == 1);
+ OSyncChange *newchange = g_list_nth_data(chg, 0);
+ g_assert(osync_change_compare(newchange, osync_change_copy(change, NULL)) == CONV_DATA_SAME);
+ committed_all(member);
+ sync_done(member);
+ disconnect(member);
+ printf("success\n");
+
+ printf("Deleting data... \r");
+ connect(member);
+ delete_data(member, change);
+ committed_all(member);
+ if (noaccess)
+ sync_done(member);
+ disconnect(member);
+ printf("success\n");
+
+ if (noaccess)
+ osync_member_set_slow_sync(member, "data", TRUE);
+
+
+ printf("Reading remaining data... \r");
+ connect(member);
+ chg = get_changes(member);
+ if (noaccess) {
+ g_assert(g_list_length(chg) == 0);
+ } else {
+ g_assert(g_list_length(chg) == 1);
+ newchange = g_list_nth_data(chg, 0);
+ g_assert(osync_change_get_changetype(newchange) == CHANGE_DELETED);
+ }
+ disconnect(member);
+ printf("success\n");
+
+ printf("Test \"Add1\" ended\n");
+}
+
+static void add_test2(OSyncMember *member, const char *objtype)
+{
+ printf("Test \"Add2\" starting\n");
+ connect(member);
+ OSyncChange *change1 = add_data(member, objtype);
+ OSyncChange *change2 = add_data(member, objtype);
+ OSyncChange *change3 = add_data(member, objtype);
+ disconnect(member);
+
+ connect(member);
+ GList *chg = get_changes(member);
+ g_assert(g_list_length(chg) == 3);
+
+ OSyncChange *cpychange1 = osync_change_copy(change1, NULL);
+ OSyncChange *cpychange2 = osync_change_copy(change2, NULL);
+ OSyncChange *cpychange3 = osync_change_copy(change3, NULL);
+
+
+ OSyncChange *newchange = g_list_nth_data(chg, 0);
+ g_assert(osync_change_compare(newchange, cpychange1) == CONV_DATA_SAME || osync_change_compare(newchange, cpychange2) == CONV_DATA_SAME || osync_change_compare(newchange, cpychange3) == CONV_DATA_SAME);
+
+ newchange = g_list_nth_data(chg, 1);
+ g_assert(osync_change_compare(newchange, cpychange1) == CONV_DATA_SAME || osync_change_compare(newchange, cpychange2) == CONV_DATA_SAME || osync_change_compare(newchange, cpychange3) == CONV_DATA_SAME);
+
+ newchange = g_list_nth_data(chg, 2);
+ g_assert(osync_change_compare(newchange, cpychange1) == CONV_DATA_SAME || osync_change_compare(newchange, cpychange2) == CONV_DATA_SAME || osync_change_compare(newchange, cpychange3) == CONV_DATA_SAME);
+ sync_done(member);
+ disconnect(member);
+
+ connect(member);
+ delete_data(member, change1);
+ delete_data(member, change2);
+ delete_data(member, change3);
+ disconnect(member);
+
+ connect(member);
+ chg = get_changes(member);
+ g_assert(g_list_length(chg) == 3);
+ newchange = g_list_nth_data(chg, 0);
+ g_assert(osync_change_get_changetype(newchange) == CHANGE_DELETED);
+ newchange = g_list_nth_data(chg, 1);
+ g_assert(osync_change_get_changetype(newchange) == CHANGE_DELETED);
+ newchange = g_list_nth_data(chg, 2);
+ g_assert(osync_change_get_changetype(newchange) == CHANGE_DELETED);
+ disconnect(member);
+
+ connect(member);
+ chg = get_changes(member);
+ g_assert(g_list_length(chg) == 0);
+ disconnect(member);
+ printf("Test \"Add3\" ended\n");
+}
+
+static void modify_test1(OSyncMember *member, const char *objtype)
+{
+ printf("Test \"Modify1\" starting\n");
+
+ connect(member);
+ OSyncChange *change = add_data(member, objtype);
+ disconnect(member);
+
+ connect(member);
+ GList *chg = get_changes(member);
+ g_assert(g_list_length(chg) == 1);
+ OSyncChange *newchange = g_list_nth_data(chg, 0);
+ g_assert(osync_change_compare(newchange, osync_change_copy(change, NULL)) == CONV_DATA_SAME);
+ disconnect(member);
+
+ connect(member);
+ modify_data(member, change);
+ disconnect(member);
+
+ connect(member);
+ chg = get_changes(member);
+ g_assert(g_list_length(chg) == 1);
+ newchange = g_list_nth_data(chg, 0);
+ g_assert(osync_change_compare(newchange, osync_change_copy(change, NULL)) == CONV_DATA_SAME);
+ disconnect(member);
+
+ connect(member);
+ delete_data(member, change);
+ disconnect(member);
+
+ connect(member);
+ chg = get_changes(member);
+ g_assert(g_list_length(chg) == 1);
+ newchange = g_list_nth_data(chg, 0);
+ g_assert(osync_change_get_changetype(newchange) == CHANGE_DELETED);
+ disconnect(member);
+
+ connect(member);
+ chg = get_changes(member);
+ g_assert(g_list_length(chg) == 0);
+ disconnect(member);
+ printf("Test \"Modify1\" ended\n");
+}
+
+static void empty_all(OSyncMember *member)
+{
+ printf("Emptying requested sources (Access available: %s)\n", noaccess == TRUE ? "No" : "Yes");
+ //connect(member);
+ //sync_done(member);
+ //disconnect(member);
+
+ osync_member_set_slow_sync(member, "data", TRUE);
+ connect(member);
+ GList *chg = get_changes(member);
+ GList *i = NULL;
+ int num_del = 0;
+ for (i = chg; i; i = i->next) {
+ OSyncChange *change = i->data;
+ delete_data(member, change);
+ num_del++;
+ }
+ committed_all(member);
+ disconnect(member);
+
+ if (!alwaysempty && !noaccess) {
+ connect(member);
+ chg = get_changes(member);
+ g_assert(g_list_length(chg) == num_del);
+ disconnect(member);
+
+ connect(member);
+ chg = get_changes(member);
+ g_assert(g_list_length(chg) == 0);
+ disconnect(member);
+ }
+ printf("Done emptying\n");
+}
+
+static void run_all_tests(OSyncMember *member, const char *objtype)
+{
+ empty_all(member);
+ GList *t;
+ for (t = tests; t; t = t->next) {
+ OSyncPluginTest *test = t->data;
+ test->test(member, objtype);
+ }
+}
+
+static void run_test(const char *name, OSyncMember *member, const char *objtype)
+{
+ empty_all(member);
+ GList *t;
+ for (t = tests; t; t = t->next) {
+ OSyncPluginTest *test = t->data;
+ if (!strcmp(name, test->name))
+ test->test(member, objtype);
+ }
+}
+
+static void register_test(const char *name, void test(OSyncMember *, const char *))
+{
+ OSyncPluginTest *newtest = g_malloc0(sizeof(OSyncPluginTest));
+ newtest->name = g_strdup(name);
+ newtest->test = test;
+ tests = g_list_append(tests, newtest);
+}
+
+static void register_tests(void)
+{
+ tests = NULL;
+ register_test("add_test1", add_test1);
+ register_test("add_test1", add_test1);
+ register_test("add_test2", add_test2);
+ register_test("modify_test1", modify_test1);
+ register_test("multi_init", multi_init);
+}
+
+int main (int argc, char *argv[])
+{
+ int i;
+ char *pluginname = NULL;
+ char *plugindir = NULL;
+ char *plugin = NULL;
+ char *format = NULL;
+ char *configfile = NULL;
+ char *objtype = NULL;
+ char *testname = NULL;
+ OSyncError *error = NULL;
+ alwaysempty = FALSE;
+ gboolean emptyonly = FALSE;
+ noaccess = TRUE;
+
+ if (argc < 2)
+ usage (argv[0], 1);
+
+ pluginname = argv[1];
+ for (i = 2; i < argc; i++) {
+ char *arg = argv[i];
+ if (!strcmp (arg, "--config")) {
+ configfile = argv[i + 1];
+ i++;
+ if (!configfile)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--type")) {
+ objtype = argv[i + 1];
+ i++;
+ if (!objtype)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--plugindir")) {
+ printf("plugindir %s\n", argv[i + 1]);
+ plugindir = argv[i + 1];
+ i++;
+ if (!plugindir)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--plugin")) {
+ plugin = argv[i + 1];
+ i++;
+ if (!plugin)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--format")) {
+ format = argv[i + 1];
+ i++;
+ if (!format)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--help")) {
+ usage (argv[0], 0);
+ } else if (!strcmp (arg, "--alwaysempty")) {
+ alwaysempty = TRUE;
+ } else if (!strcmp (arg, "--noaccess")) {
+ noaccess = TRUE;
+ } else if (!strcmp (arg, "--empty")) {
+ emptyonly = TRUE;
+ } else {
+ if (testname)
+ usage (argv[0], 1);
+ testname = argv[i + 1];
+ }
+ }
+
+ OSyncEnv *env = osync_env_new();
+ osync_env_set_option(env, "LOAD_GROUPS", "FALSE");
+
+ if (plugin) {
+ osync_env_set_option(env, "LOAD_PLUGINS", "FALSE");
+ if (!osync_module_load(env, plugin, &error)) {
+ printf("Unable to load plugin: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+ } else {
+ if (plugindir)
+ osync_env_set_option(env, "PLUGINS_DIRECTORY", plugindir);
+ }
+
+ if (format) {
+ osync_env_set_option(env, "LOAD_FORMATS", "FALSE");
+ if (!osync_module_load(env, format, &error)) {
+ printf("Unable to load format: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+ }
+
+ if (!osync_env_initialize(env, &error)) {
+ printf("Unable to initialize environment: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+
+ OSyncGroup *group = osync_group_new(env);
+ osync_group_set_name(group, osync_rand_str(8));
+ OSyncMember *member = osync_member_new(group);
+
+ char *testdir = g_strdup_printf("%s/plgtest.XXXXXX", g_get_tmp_dir());
+ char *result = mktemp(testdir);
+
+ if ((result == NULL) || (mkdir(result, 0700) != 0))
+ {
+ osync_trace(TRACE_EXIT_ERROR, "unable to create temporary dir: %s",
+ strerror(errno));
+ return 1;
+ }
+
+ char *config = NULL;
+ int size = 0;
+ if (configfile) {
+ if (!osync_file_read(configfile, &config, &size, &error)) {
+ fprintf(stderr, "Unable to read config: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+ osync_member_set_config(member, config, size);
+ }
+
+ osync_member_set_pluginname(member, pluginname);
+ osync_member_set_configdir(member, testdir);
+ OSyncMemberFunctions *functions = osync_member_get_memberfunctions(member);
+ functions->rf_change = changes_sink;
+
+ //started_mutex = g_mutex_new();
+ //started = g_cond_new();
+ //GMainContext *context = g_main_context_new();
+ loop = g_main_loop_new(NULL, TRUE);
+ //g_mutex_lock(started_mutex);
+ //GSource *idle = g_idle_source_new();
+ //g_source_set_callback(idle, startupfunc, NULL, NULL);
+ // g_source_attach(idle, context);
+ //g_thread_create ((GThreadFunc)g_main_loop_run, loop, TRUE, NULL);
+ //g_cond_wait(started, started_mutex);
+ //g_mutex_unlock(started_mutex);
+
+ //osync_member_set_loop(member, context);
+
+ if (!osync_member_initialize(member, &error)) {
+ printf("unable to initialize: %s\n", osync_error_print(&error));
+ return 1;
+ }
+
+ if (objtype) {
+ osync_member_set_objtype_enabled(member, "data", FALSE);
+ osync_member_set_objtype_enabled(member, objtype, TRUE);
+ }
+
+ if (!g_thread_supported ()) g_thread_init (NULL);
+ working = g_mutex_new();
+ working2 = g_mutex_new();
+
+ if (emptyonly) {
+ empty_all(member);
+ } else {
+ register_tests();
+
+ if (testname)
+ run_test(testname, member, objtype);
+ else
+ run_all_tests(member, objtype);
+ }
+
+ osync_member_finalize(member);
+
+ return 0;
+}
diff --git a/debian/opensync/opensync-0.22/tools/osyncstress.c b/debian/opensync/opensync-0.22/tools/osyncstress.c
new file mode 100644
index 00000000..04b2bf53
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tools/osyncstress.c
@@ -0,0 +1,451 @@
+#include <opensync/opensync.h>
+#include "engine.h"
+#include "engine_internals.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <glib.h>
+
+static void usage (char *name, int ecode)
+{
+ fprintf (stderr, "Usage: %s <groupname>\n", name);
+ fprintf (stderr, "[--configdir] \tSet a different configdir then ~./opensync\n");
+ fprintf (stderr, "[--num] \tHow often do you want to synchronize?\n");
+ fprintf (stderr, "[--tryrecover] \tIf something goes wrong try to recover via slow-sync\n");
+ fprintf (stderr, "[--crash] \tRandomly crash the engine/plugins\n");
+ exit (ecode);
+}
+
+GList *members = NULL;
+
+typedef struct member_info {
+ OSyncMember *member;
+ GList *changes;
+ osync_bool connected;
+ osync_bool disconnected;
+ osync_bool sent_changes;
+} member_info;
+
+typedef struct change_info {
+ OSyncChange *change;
+ char *uid;
+ OSyncChangeType type;
+ osync_bool sent;
+ osync_bool received;
+} change_info;
+
+void update_change_list(OSyncEngine *engine)
+{
+ g_assert(engine);
+ members = NULL;
+ GList *v;
+ GList *e;
+ for (v = engine->maptable->views; v; v = v->next) {
+ member_info *meminfo = g_malloc0(sizeof(member_info));
+ members = g_list_append(members, meminfo);
+ OSyncMappingView *view = v->data;
+ meminfo->member = view->client->member;
+ for (e = view->changes; e; e = e->next) {
+ OSyncMappingEntry *entry = e->data;
+ change_info *chinfo = g_malloc0(sizeof(change_info));
+ meminfo->changes = g_list_append(meminfo->changes, chinfo);
+ chinfo->change = entry->change;
+ chinfo->type = CHANGE_UNMODIFIED;
+ chinfo->uid = g_strdup(osync_change_get_uid(chinfo->change));
+ }
+ }
+}
+
+member_info *find_member_info(OSyncMember *member)
+{
+ GList *m;
+ for (m = members; m; m = m->next) {
+ member_info *meminfo = m->data;
+ if (meminfo->member == member)
+ return meminfo;
+ }
+ return NULL;
+}
+
+change_info *find_change_info(member_info *meminfo, OSyncChange *change)
+{
+ GList *c;
+ for (c = meminfo->changes; c; c = c->next) {
+ change_info *chinfo = c->data;
+ if (chinfo->uid && !strcmp(chinfo->uid, osync_change_get_uid(change)))
+ return chinfo;
+ }
+ return NULL;
+}
+
+void conflict_handler(OSyncEngine *engine, OSyncMapping *mapping)
+{
+ if (g_random_int_range(0, 3) == 0) {
+ osengine_mapping_duplicate(engine, mapping);
+ printf("Conflict for Mapping %p: Duplicating\n", mapping);
+ } else {
+ int num = osengine_mapping_num_changes(mapping);
+ int choosen = g_random_int_range(0, num);
+ OSyncChange *change = osengine_mapping_nth_change(mapping, choosen);
+ osengine_mapping_solve(engine, mapping, change);
+ printf("Conflict for Mapping %p: Choosing entry %i\n", mapping, choosen);
+ }
+}
+
+
+void member_status(OSyncMemberUpdate *status)
+{
+ member_info *meminfo = find_member_info(status->member);
+ if (!meminfo)
+ return;
+ switch (status->type) {
+ case MEMBER_CONNECTED:
+ meminfo->connected = TRUE;
+ break;
+ case MEMBER_DISCONNECTED:
+ meminfo->disconnected = TRUE;
+ break;
+ default:
+ printf("Unknown status\n");
+ }
+}
+
+void mapping_status(OSyncMappingUpdate *status)
+{
+ switch (status->type) {
+ case MAPPING_SOLVED:
+ printf("Mapping solved\n");
+ break;
+ case MAPPING_SYNCED:
+ printf("Mapping Synced\n");
+ break;
+ default:
+ printf("errro\n");
+ }
+}
+
+void entry_status(OSyncChangeUpdate *status)
+{
+ member_info *meminfo = find_member_info(osync_change_get_member(status->change));
+ if (!meminfo)
+ return;
+ change_info *chinfo = find_change_info(meminfo, status->change);
+ switch (status->type) {
+ case CHANGE_RECEIVED:
+ if (chinfo && (chinfo->type == osync_change_get_changetype(status->change)))
+ chinfo->received = TRUE;
+ break;
+ case CHANGE_SENT:
+ if (chinfo)
+ chinfo->sent = TRUE;
+ break;
+ default:
+ printf("Unknown status\n");
+ }
+}
+
+GMutex *working;
+
+GMainLoop *loop = NULL;
+gboolean busy = FALSE;
+
+void stress_message_callback(OSyncMember *member, void *user_data, OSyncError *error)
+{
+ g_main_loop_quit(loop);
+ busy = FALSE;
+}
+
+void change_content(OSyncEngine *engine)
+{
+ GList *m;
+ for (m = members; m; m = m->next) {
+ member_info *meminfo = m->data;
+
+ busy = TRUE;
+ osync_member_connect(meminfo->member, (OSyncEngCallback)stress_message_callback, NULL);
+ if (busy)
+ g_main_loop_run(loop);
+
+ GList *c = NULL;
+ for (c = meminfo->changes; c; c = c->next) {
+ change_info *chinfo = c->data;
+ if (g_random_int_range(0, 3) == 0) {
+ switch (g_random_int_range(1, 6)) {
+ case 1:
+ case 5:
+ if (osync_member_modify_random_data(meminfo->member, chinfo->change)) {
+ printf("Modifying data %s for member %lli. Objtype: %s Format: %s\n", osync_change_get_uid(chinfo->change), osync_member_get_id(meminfo->member), osync_objtype_get_name(osync_change_get_objtype(chinfo->change)), osync_objformat_get_name(osync_change_get_objformat(chinfo->change)));
+ chinfo->type = CHANGE_MODIFIED;
+ }
+ break;
+ case 2:
+ if (osync_member_delete_data(meminfo->member, chinfo->change)) {
+ printf("Deleting data %s for member %lli. Objtype: %s Format: %s\n", osync_change_get_uid(chinfo->change), osync_member_get_id(meminfo->member), osync_objtype_get_name(osync_change_get_objtype(chinfo->change)), osync_objformat_get_name(osync_change_get_objformat(chinfo->change)));
+ if (!osync_group_get_slow_sync(engine->group, osync_objtype_get_name(osync_change_get_objtype(chinfo->change))));
+ chinfo->type = CHANGE_DELETED;
+ }
+ break;
+ case 3:
+ //printf("Modifying all for %s\n", osync_change_get_uid(change));
+ break;
+ case 4:
+ //printf("Deleting all for %s\n", osync_change_get_uid(change));
+ break;
+ default:
+ printf("error\n");
+ }
+ }
+ }
+
+ int num_new = g_random_int_range(0, 8);
+ int n = 0;;
+ for (n = 0; n < num_new; n++) {
+ change_info *chinfo = g_malloc0(sizeof(change_info));
+ if ((chinfo->change = osync_member_add_random_data(meminfo->member, NULL))) {
+ if (find_change_info(meminfo, chinfo->change))
+ continue;
+ meminfo->changes = g_list_append(meminfo->changes, chinfo);
+ chinfo->type = CHANGE_ADDED;
+ chinfo->uid = g_strdup(osync_change_get_uid(chinfo->change));
+ printf("Adding new data %s for member %lli. Objtype: %s Format: %s\n", osync_change_get_uid(chinfo->change), osync_member_get_id(meminfo->member), osync_objtype_get_name(osync_change_get_objtype(chinfo->change)), osync_objformat_get_name(osync_change_get_objformat(chinfo->change)));
+ }
+ }
+
+ busy = TRUE;
+ osync_member_disconnect(meminfo->member, (OSyncEngCallback)stress_message_callback, NULL);
+ if (busy)
+ g_main_loop_run(loop);
+ }
+}
+
+static osync_bool check_mappings(OSyncEngine *engine)
+{
+ member_info *meminfo = NULL;
+ GList *m;
+ for (m = members; m; m = m->next) {
+ meminfo = m->data;
+
+ if (g_list_length(engine->maptable->mappings) != g_list_length(meminfo->changes)) {
+ printf("Number of mappings do not match for member %lli, %i compared to %i\n", osync_member_get_id(meminfo->member), g_list_length(engine->maptable->mappings), g_list_length(meminfo->changes));
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static osync_bool check_hashtables(OSyncEngine *engine)
+{
+ GList *m;
+ for (m = members; m; m = m->next) {
+ member_info *meminfo = m->data;
+ OSyncHashTable *table = osync_hashtable_new();
+ osync_hashtable_load(table, meminfo->member, NULL);
+ /*if (osync_hashtable_num_entries(table) != g_list_length(meminfo->changes)) {
+ printf("Hashtable for member %i has wrong number %i compared to %i\n", osync_member_get_id(meminfo->member), osync_hashtable_num_entries(table), g_list_length(meminfo->changes));
+ abort();
+ }*/
+ printf("hashtable %p\n", table);
+ if (osync_hashtable_num_entries(table) && g_list_length(engine->maptable->mappings) != osync_hashtable_num_entries(table)) {
+ printf("Number of mappings do not match hastable for member %lli, %i compared to %i\n", osync_member_get_id(meminfo->member), g_list_length(engine->maptable->mappings), osync_hashtable_num_entries(table));
+ return FALSE;
+ }
+
+ osync_hashtable_close(table);
+ }
+ return TRUE;
+}
+
+/*static osync_bool compare_updates(OSyncEngine *engine)
+{
+ GList *m;
+ for (m = members; m; m = m->next) {
+ member_info *meminfo = m->data;
+
+ if (!meminfo->connected) {
+ printf("Member %lli never connected\n", osync_member_get_id(meminfo->member));
+ return FALSE;
+ }
+ if (!meminfo->disconnected) {
+ printf("Member %lli never connected\n", osync_member_get_id(meminfo->member));
+ return FALSE;
+ }
+
+ GList *c = NULL;
+ for (c = meminfo->changes; c; c = c->next) {
+ change_info *chinfo = c->data;
+ if (chinfo->type != CHANGE_UNMODIFIED) {
+ if (chinfo->received != TRUE) {
+ printf("Never received change %s from member %lli\n", chinfo->uid, osync_member_get_id(meminfo->member));
+ return FALSE;
+ }
+ }
+ }
+ }
+ return TRUE;
+}*/
+
+static osync_bool compare_content(OSyncEngine *engine)
+{
+ /*if (system("test \"x$(diff -x \".*\" r1 r2)\" = \"x\"")) { //FIXME
+ printf("Content did not match!\n");
+ return FALSE;
+ }*/
+ return TRUE;
+}
+
+int main (int argc, char *argv[])
+{
+ int i;
+ char *groupname = NULL;
+ char *configdir = NULL;
+ int num = -1;
+ osync_bool failed = FALSE;
+ osync_bool tryrecover = FALSE;
+ OSyncError *error = NULL;
+ OSyncEngine *engine = NULL;
+
+ if (argc <= 1)
+ usage (argv[0], 1);
+
+ groupname = argv[1];
+ for (i = 2; i < argc; i++) {
+ char *arg = argv[i];
+ if (!strcmp (arg, "--configdir")) {
+ configdir = argv[i + 1];
+ i++;
+ if (!configdir)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--num")) {
+ num = atoi(argv[i + 1]);
+ i++;
+ if (num <= 0)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--help")) {
+ usage (argv[0], 0);
+ } else if (!strcmp (arg, "--tryrecover")) {
+ tryrecover = TRUE;
+ } else if (!strcmp (arg, "--")) {
+ break;
+ } else if (arg[0] == '-') {
+ usage (argv[0], 1);
+ } else {
+ usage (argv[0], 1);
+ }
+ }
+
+ loop = g_main_loop_new(NULL, TRUE);
+ if (!g_thread_supported ()) g_thread_init (NULL);
+
+ osync_trace(TRACE_ENTRY, "++++ Started the sync stress test +++");
+ OSyncEnv *osync = osync_env_new();
+ osync_env_set_option(osync, "GROUPS_DIRECTORY", configdir);
+
+ if (!osync_env_initialize(osync, &error)) {
+ printf("Unable to initialize environment: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_env;
+ }
+
+ OSyncGroup *group = osync_env_find_group(osync, groupname);
+
+ if (!group) {
+ printf("Unable to find group with name \"%s\"\n", groupname);
+ goto error_free_env;
+ }
+
+ if (!g_thread_supported ()) g_thread_init (NULL);
+ working = g_mutex_new();
+ int count = 0;
+ while (1) {
+ engine = osengine_new(group, &error);
+ if (!engine) {
+ printf("Error while creating syncengine: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_env;
+ }
+
+ if (!osengine_init(engine, &error)) {
+ printf("Error while initializing syncengine: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_engine;
+ }
+
+ do {
+ count++;
+ printf("++++++++++++++++++++++++++++++\n");
+ printf("Initializing new round #%i!\n", count);
+
+ if (g_random_int_range(0, 5) == 0) {
+ int i;
+ OSyncFormatEnv *env = osync_group_get_format_env(group);
+ for (i = 0; i < osync_conv_num_objtypes(env); i++) {
+ if (g_random_int_range(0, 5) == 0) {
+ OSyncObjType *type = osync_conv_nth_objtype(env, i);
+ osync_group_set_slow_sync(group, osync_objtype_get_name(type), TRUE);
+ printf("Requesting slow-sync for: %s\n", osync_objtype_get_name(type));
+ }
+ }
+ osync_conv_env_free(env);
+ }
+
+ update_change_list(engine);
+
+ if (!check_mappings(engine) || !check_hashtables(engine) || !compare_content(engine)) {
+ if (failed) {
+ printf("already failed last round...\n");
+ goto error_free_engine;
+ }
+ failed = TRUE;
+ if (!tryrecover) {
+ printf("Failed. Not trying to recover\n");
+ goto error_free_engine;
+ } else {
+ printf("Failed. Trying to recover!\n");
+ osync_group_set_slow_sync(group, "data", TRUE);
+ }
+ } else {
+ failed = FALSE;
+ }
+
+ change_content(engine);
+
+ printf("Starting to synchronize\n");
+ if (!osengine_sync_and_block(engine, &error)) {
+ printf("Error while starting synchronization: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_engine;
+ }
+
+ if (!compare_content(engine))
+ goto error_free_engine;
+
+ sleep(2);
+ printf("End of synchronization\n");
+
+ if (count == num)
+ goto out;
+ } while (g_random_int_range(0, 3) != 0);
+
+ printf("Finalizing engine\n");
+ osengine_finalize(engine);
+ osengine_free(engine);
+ }
+
+out:
+ osync_trace(TRACE_EXIT, "Stress test successful");
+ printf("Stress test successful\n");
+ return 0;
+
+error_free_engine:
+ osengine_free(engine);
+error_free_env:
+ osync_env_free(osync);
+ g_main_loop_unref(loop);
+ osync_trace(TRACE_EXIT_ERROR, "Stress test failed");
+ printf("ERROR: Stress test failed\n");
+ return 1;
+}
diff --git a/debian/opensync/opensync-0.22/tools/osynctest.c b/debian/opensync/opensync-0.22/tools/osynctest.c
new file mode 100644
index 00000000..c2b44633
--- /dev/null
+++ b/debian/opensync/opensync-0.22/tools/osynctest.c
@@ -0,0 +1,576 @@
+#include <opensync/opensync.h>
+#include <opensync/opensync_internals.h>
+#include "engine.h"
+#include "engine_internals.h"
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+
+GMutex *working;
+GMutex *working2;
+GList *changes;
+GList *tests;
+osync_bool alwaysempty;
+osync_bool noaccess = FALSE;
+
+typedef struct OSyncPluginTest {
+ char *name;
+ double (*test)(OSyncEngine *engine, OSyncMember *file, int num, const char *);
+ double alltime;
+ double connecttime;
+ double readtime;
+ double writetime;
+ double othertime;
+ int num;
+} OSyncPluginTest;
+
+static void usage (char *name, int ecode)
+{
+ fprintf (stderr, "Usage: %s <pluginname>\n", name);
+ fprintf (stderr, "--config <filename>\tSet the config file to use\n");
+ fprintf (stderr, "--type <object type>\tSets the objtype to test\n");
+ fprintf (stderr, "--empty\tOnly deleta all data. Do not test\n");
+ exit (ecode);
+}
+
+gboolean only_random = FALSE;
+char *localdir = NULL;
+
+static void sync_now(OSyncEngine *engine)
+{
+ OSyncError *error = NULL;
+ printf(".");
+ fflush(stdout);
+
+ if (!osengine_sync_and_block(engine, &error)) {
+ printf("Error while starting synchronization: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ exit(1);
+ }
+
+ printf(".");
+ fflush(stdout);
+}
+
+static void check_empty(void)
+{
+ printf(".");
+ fflush(stdout);
+ char *command = g_strdup_printf("test \"x$(ls %s)\" = \"x\"", localdir);
+ int ret = system(command);
+ g_free(command);
+ if (ret)
+ abort();
+ printf(".");
+ fflush(stdout);
+}
+
+double starttime;
+double currenttime;
+
+double connecttime;
+double readtime;
+double writetime;
+
+double _second() /* note that some compilers like AIX xlf do not require the trailing '_' */
+{
+ struct timeval tp;
+ int rtn;
+ rtn=gettimeofday(&tp, NULL);
+
+ return ((double)tp.tv_sec+(1.e-6)*tp.tv_usec);
+}
+
+void engine_status(OSyncEngine *engine, OSyncEngineUpdate *status, void *user_data)
+{
+ switch (status->type) {
+ case ENG_ENDPHASE_CON:
+ osync_trace(TRACE_INTERNAL, "++++++++++++++++ Connection Phase ended ++++++++++++++");
+ currenttime = _second();
+ connecttime = currenttime - starttime;
+ break;
+ case ENG_ENDPHASE_READ:
+ osync_trace(TRACE_INTERNAL, "++++++++++++++++ Read Phase ended ++++++++++++++");
+ readtime = _second() - currenttime;
+ currenttime = _second();
+ break;
+ case ENG_ENDPHASE_WRITE:
+ osync_trace(TRACE_INTERNAL, "++++++++++++++++ Write Phase ended ++++++++++++++");
+ writetime = _second() - currenttime;
+ currenttime = _second();
+ break;
+ default:
+ ;
+ }
+}
+
+double check_sync(OSyncEngine *engine, const char *name, int num)
+{
+ int ret;
+ printf(".");
+ fflush(stdout);
+ starttime = _second();
+ osync_trace(TRACE_INTERNAL, "++++++++++++++++ Test \"%s %i\" starting ++++++++++++++", name, num);
+ osengine_set_enginestatus_callback(engine, engine_status, NULL);
+ sync_now(engine);
+ osengine_set_enginestatus_callback(engine, NULL, NULL);
+ int wasted = 0;
+ int alldeciders = 0;
+ osengine_get_wasted(engine, &alldeciders, &wasted);
+ osync_trace(TRACE_INTERNAL, "++++++++++++++++ Test \"%s %i\" ended (%i / %i (%i%%)) ++++++++++++++", name, num, wasted, alldeciders, (int)(((float)wasted / (float)alldeciders) * 100));
+ double thistime = _second() - starttime;
+
+ printf(".");
+ fflush(stdout);
+
+ char *tempdir = g_strdup_printf("%s/plgtest.XXXXXX", g_get_tmp_dir());
+ char *tmpresult = mktemp(tempdir);
+ if ((tmpresult == NULL) || (mkdir(tmpresult, 0700) != 0))
+ {
+ g_free(tempdir);
+ osync_trace(TRACE_INTERNAL, "unable to create temporary dir: %s", strerror(errno));
+ abort();
+ }
+ char *command = g_strdup_printf("mv %s/* %s &> /dev/null", localdir, tempdir);
+ ret = system(command);
+ if (ret)
+ {
+ g_free(tempdir);
+ g_free(command);
+ osync_trace(TRACE_INTERNAL, "Unable to move files to temporary dir: %d", ret);
+ abort();
+ }
+ g_free(command);
+ printf(".");
+ fflush(stdout);
+
+ check_empty();
+
+ printf(".");
+ fflush(stdout);
+
+ osync_group_set_slow_sync(engine->group, "data", TRUE);
+
+ sync_now(engine);
+ printf(".");
+ fflush(stdout);
+ command = g_strdup_printf("test \"x$(diff -x \".*\" %s %s)\" = \"x\"", localdir, tempdir);
+ int result = system(command);
+ g_free(command);
+
+ g_free(tempdir);
+ if (result)
+ abort();
+
+ printf(" success\n");
+ return thistime;
+}
+
+void add_data(OSyncMember *member, const char *objtype)
+{
+ OSyncChange *change = osync_change_new();
+ if (!osync_member_make_random_data(member, change, objtype)) {
+ printf("Unable to create random data\n");
+ abort();
+ }
+
+ char *filename = NULL;
+ while (1) {
+ char *randstr = osync_rand_str(8);
+ filename = g_strdup_printf("%s/%s", localdir, randstr);
+ g_free(randstr);
+ char *command = g_strdup_printf("ls %s &> /dev/null", filename);
+ int ret = system(command);
+ g_free(command);
+ if (ret)
+ break;
+ g_free(filename);
+ }
+
+ OSyncError *error = NULL;
+ if (!osync_file_write(filename, osync_change_get_data(change), osync_change_get_datasize(change), 0700, &error)) {
+ printf("Unable to write to file %s\n", osync_error_print(&error));
+ abort();
+ }
+ g_free(filename);
+}
+
+void modify_data(OSyncMember *member, const char *objtype)
+{
+ GDir *dir;
+ GError *gerror = NULL;
+
+ dir = g_dir_open(localdir, 0, &gerror);
+ if (!dir)
+ abort();
+
+ const char *de = NULL;
+ while ((de = g_dir_read_name(dir))) {
+ char *filename = g_build_filename(localdir, de, NULL);
+
+ OSyncChange *change = osync_change_new();
+ if (!osync_member_make_random_data(member, change, objtype)) {
+ printf("Unable to create random data\n");
+ abort();
+ }
+
+ OSyncError *error = NULL;
+ if (!osync_file_write(filename, osync_change_get_data(change), osync_change_get_datasize(change), 0700, &error)) {
+ printf("Unable to write to file %s\n", osync_error_print(&error));
+ abort();
+ }
+
+ g_free(filename);
+ }
+ g_dir_close(dir);
+}
+
+
+void delete_data(OSyncMember *member, const char *objtype)
+{
+ char *command = g_strdup_printf("rm -f %s/*", localdir);
+ int ret = system(command);
+ if (ret)
+ {
+ osync_trace(TRACE_INTERNAL, "Unable to delete data: %d", ret);
+ abort();
+ }
+ g_free(command);
+}
+
+static void empty_all(OSyncEngine *engine)
+{
+ printf(".");
+ fflush(stdout);
+
+ osync_group_set_slow_sync(engine->group, "data", TRUE);
+ sync_now(engine);
+
+ char *command = g_strdup_printf("rm -f %s/*", localdir);
+ int ret = system(command);
+ if (ret)
+ {
+ osync_trace(TRACE_INTERNAL, "Unable to delete data: %d", ret);
+ abort();
+ }
+ g_free(command);
+ sync_now(engine);
+
+ printf(".");
+ fflush(stdout);
+
+ check_empty();
+
+}
+
+double add_test(OSyncEngine *engine, OSyncMember *member, int num, const char *objtype)
+{
+ printf("Test \"Add %i\" starting", num);
+ fflush(stdout);
+
+ empty_all(engine);
+
+ printf(".");
+ fflush(stdout);
+ int i = 0;
+ for (i = 0; i < num; i++)
+ add_data(member, objtype);
+ printf(".");
+ fflush(stdout);
+
+ return check_sync(engine, "Add", num);
+}
+
+double modify_test(OSyncEngine *engine, OSyncMember *member, int num, const char *objtype)
+{
+ printf("Test \"Modify %i\" starting", num);
+ fflush(stdout);
+
+ empty_all(engine);
+
+ printf(".");
+ fflush(stdout);
+ int i = 0;
+ for (i = 0; i < num; i++)
+ add_data(member, objtype);
+ printf(".");
+ fflush(stdout);
+
+ check_sync(engine, "None", num);
+
+ printf(".");
+ fflush(stdout);
+ modify_data(member, objtype);
+ printf(".");
+ fflush(stdout);
+
+ return check_sync(engine, "Modify", num);
+}
+
+double delete_test(OSyncEngine *engine, OSyncMember *member, int num, const char *objtype)
+{
+ printf("Test \"Delete %i\" starting", num);
+ fflush(stdout);
+
+ empty_all(engine);
+
+ printf(".");
+ fflush(stdout);
+ int i = 0;
+ for (i = 0; i < num; i++)
+ add_data(member, objtype);
+ printf(".");
+ fflush(stdout);
+
+ check_sync(engine, "None", num);
+
+ printf(".");
+ fflush(stdout);
+ delete_data(member, objtype);
+ printf(".");
+ fflush(stdout);
+
+ return check_sync(engine, "Delete", num);
+}
+
+static void run_all_tests(OSyncEngine *engine, OSyncMember *file, OSyncMember *target, const char *objtype)
+{
+
+ GList *t;
+ for (t = tests; t; t = t->next) {
+ OSyncPluginTest *test = t->data;
+ test->alltime = test->test(engine, target, test->num, objtype);
+ test->connecttime = connecttime;
+ test->readtime = readtime;
+ test->writetime = writetime;
+ test->othertime = test->alltime - test->connecttime - test->readtime - test->writetime;
+ }
+
+ printf("\nOutcome:\n");
+
+ for (t = tests; t; t = t->next) {
+ OSyncPluginTest *test = t->data;
+ printf("Test \"%s\": All: %f Connect: %f(%i%%) Read: %f(%i%%) Write: %f(%i%%) Other: %f(%i%%)\n", test->name, test->alltime, test->connecttime, (int)((test->connecttime / test->alltime)* 100), test->readtime, (int)((test->readtime / test->alltime)* 100), test->writetime, (int)((test->writetime / test->alltime)* 100), test->othertime, (int)((test->othertime / test->alltime)* 100));
+ }
+}
+
+static void register_test(const char *name, double test(OSyncEngine *engine, OSyncMember *file, int num, const char *), int num)
+{
+ OSyncPluginTest *newtest = g_malloc0(sizeof(OSyncPluginTest));
+ newtest->name = g_strdup(name);
+ newtest->test = test;
+ newtest->num = num;
+ tests = g_list_append(tests, newtest);
+}
+
+static void register_tests(void)
+{
+ tests = NULL;
+ /*register_test("add_test1", add_test, 1);
+ register_test("add_test5", add_test, 5);
+ register_test("add_test10", add_test, 10);
+ register_test("add_test20", add_test, 20);*/
+ /*register_test("add_test50", add_test, 50);
+ register_test("add_test100", add_test, 100);
+ register_test("add_test200", add_test, 200);*/
+
+ /*register_test("modify_test1", modify_test, 1);
+ register_test("modify_test5", modify_test, 5);
+ register_test("modify_test10", modify_test, 10);
+ register_test("modify_test20", modify_test, 20);
+ register_test("modify_test50", modify_test, 50);*/
+ register_test("modify_test100", modify_test, 100);
+ //register_test("modify_test200", modify_test, 200);
+
+ /*register_test("delete_test1", delete_test, 1);
+ register_test("delete_test5", delete_test, 5);
+ register_test("delete_test10", delete_test, 10);
+ register_test("delete_test20", delete_test, 20);
+ register_test("delete_test50", delete_test, 50);*/
+ //register_test("delete_test100", delete_test, 100);
+ //register_test("delete_test200", delete_test, 200);
+}
+
+void change_content(void)
+{
+ printf("changing content\n");
+}
+
+int main (int argc, char *argv[])
+{
+ int i;
+ char *pluginname = NULL;
+ char *plugindir = NULL;
+ char *configfile = NULL;
+ char *objtype = NULL;
+ OSyncError *error = NULL;
+
+ if (argc < 2)
+ usage (argv[0], 1);
+
+ pluginname = argv[1];
+ for (i = 2; i < argc; i++) {
+ char *arg = argv[i];
+ if (!strcmp (arg, "--config")) {
+ configfile = argv[i + 1];
+ i++;
+ if (!configfile)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--type")) {
+ objtype = argv[i + 1];
+ i++;
+ if (!objtype)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--plugindir")) {
+ printf("plugindir %s\n", argv[i + 1]);
+ plugindir = argv[i + 1];
+ i++;
+ if (!plugindir)
+ usage (argv[0], 1);
+ } else if (!strcmp (arg, "--random")) {
+ only_random = TRUE;
+ } else if (!strcmp (arg, "--help")) {
+ usage (argv[0], 0);
+ } else {
+ usage (argv[0], 1);
+ }
+ }
+
+ OSyncEnv *env = osync_env_new();
+ osync_env_set_option(env, "LOAD_GROUPS", "FALSE");
+
+ if (plugindir)
+ osync_env_set_option(env, "PLUGINS_DIRECTORY", plugindir);
+
+ if (!osync_env_initialize(env, &error)) {
+ printf("Unable to initialize environment: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+
+ char *testdir = g_strdup_printf("%s/plgtest.XXXXXX", g_get_tmp_dir());
+ char *result = mktemp(testdir);
+
+ if ((result == NULL) || (mkdir(result, 0700) != 0))
+ {
+ osync_trace(TRACE_EXIT_ERROR, "unable to create temporary dir: %s", strerror(errno));
+ return 1;
+ }
+
+ OSyncGroup *group = osync_group_new(env);
+ osync_group_set_name(group, osync_rand_str(8));
+ osync_group_set_configdir(group, testdir);
+ OSyncMember *member = osync_member_new(group);
+
+ char *config = NULL;
+ int size = 0;
+ if (configfile) {
+ if (!osync_file_read(configfile, &config, &size, &error)) {
+ fprintf(stderr, "Unable to read config: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ return 1;
+ }
+ osync_member_set_config(member, config, size);
+ }
+
+ osync_member_set_pluginname(member, pluginname);
+
+ OSyncMember *file = osync_member_new(group);
+
+ localdir = g_strdup_printf("%s/plgtest.XXXXXX", g_get_tmp_dir());
+ result = mktemp(testdir);
+
+ if ((result == NULL) || (mkdir(result, 0700) != 0))
+ {
+ osync_trace(TRACE_EXIT_ERROR, "unable to create temporary dir: %s",
+ strerror(errno));
+ return 1;
+ }
+
+ config = g_strdup_printf("<config><path>%s</path><recursive>0</recursive></config>", localdir);
+ osync_member_set_config(file, config, strlen(config) + 1);
+ osync_member_set_pluginname(file, "file-sync");
+
+ if (!osync_group_save(group, &error)) {
+ printf("Error while creating syncengine: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_env;
+ }
+
+ if (!g_thread_supported ()) g_thread_init (NULL);
+
+ OSyncEngine *engine = osengine_new(group, &error);
+ if (!engine) {
+ printf("Error while creating syncengine: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_env;
+ }
+
+ if (!osengine_init(engine, &error)) {
+ printf("Error while initializing syncengine: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_engine;
+ }
+
+ int count = 0;
+ if (only_random) {
+ do {
+ count++;
+ printf("++++++++++++++++++++++++++++++\n");
+ printf("Initializing new round #%i!\n", count);
+
+ if (g_random_int_range(0, 5) == 0) {
+ int i;
+ OSyncFormatEnv *env = osync_group_get_format_env(group);
+ for (i = 0; i < osync_conv_num_objtypes(env); i++) {
+ if (g_random_int_range(0, 5) == 0) {
+ OSyncObjType *type = osync_conv_nth_objtype(env, i);
+ osync_group_set_slow_sync(group, osync_objtype_get_name(type), TRUE);
+ printf("Requesting slow-sync for: %s\n", osync_objtype_get_name(type));
+ }
+ }
+ osync_conv_env_free(env);
+ }
+
+ change_content();
+
+ check_sync(engine, "Random", 1);
+ } while (g_random_int_range(0, 3) != 0);
+
+ printf("Finalizing engine\n");
+ osengine_finalize(engine);
+ osengine_free(engine);
+
+ engine = osengine_new(group, &error);
+ if (!engine) {
+ printf("Error while creating syncengine: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_env;
+ }
+
+ if (!osengine_init(engine, &error)) {
+ printf("Error while initializing syncengine: %s\n", osync_error_print(&error));
+ osync_error_free(&error);
+ goto error_free_engine;
+ }
+ } else {
+ register_tests();
+ run_all_tests(engine, file, member, objtype);
+ }
+
+ printf("\nCompleted successfully\n");
+ return 0;
+
+error_free_engine:
+ osengine_free(engine);
+error_free_env:
+ osync_group_free(group);
+ osync_env_free(env);
+ return 1;
+}
diff --git a/debian/opensync/opensync-0.22/wrapper/Makefile.am b/debian/opensync/opensync-0.22/wrapper/Makefile.am
new file mode 100644
index 00000000..47d435b7
--- /dev/null
+++ b/debian/opensync/opensync-0.22/wrapper/Makefile.am
@@ -0,0 +1,26 @@
+
+AM_CFLAGS = -Werror
+
+INCLUDES= @PACKAGE_CFLAGS@ $(PYTHON_INCLUDES) -I$(top_srcdir) -I$(top_srcdir)/opensync @XML_CFLAGS@
+
+opensync_wrap.c: $(srcdir)/opensync.i
+ $(SWIG) -Werror -python -modern -I$(top_srcdir)/opensync $(PYTHON_INCLUDES) -o opensync_wrap.c $(srcdir)/opensync.i
+
+EXTRA_DIST = opensync.i
+
+CLEANFILES = \
+ opensync.py \
+ opensync.pyc \
+ opensync_wrap.c
+
+if HAVE_PYTHON
+osdir = $(pyexecdir)
+nodist_os_PYTHON = opensync.py
+
+osbindingsdir = $(pyexecdir)
+osbindings_LTLIBRARIES = _opensync.la
+endif
+
+nodist__opensync_la_SOURCES = opensync_wrap.c
+_opensync_la_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ $(PYTHON_LDFLAGS) -R $(libdir) -module -avoid-version
+_opensync_la_LIBADD = $(top_builddir)/opensync/libopensync.la
diff --git a/debian/opensync/opensync-0.22/wrapper/Makefile.in b/debian/opensync/opensync-0.22/wrapper/Makefile.in
new file mode 100644
index 00000000..33defe9f
--- /dev/null
+++ b/debian/opensync/opensync-0.22/wrapper/Makefile.in
@@ -0,0 +1,554 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = wrapper
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+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)$(osbindingsdir)" "$(DESTDIR)$(osdir)"
+osbindingsLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(osbindings_LTLIBRARIES)
+_opensync_la_DEPENDENCIES = $(top_builddir)/opensync/libopensync.la
+nodist__opensync_la_OBJECTS = opensync_wrap.lo
+_opensync_la_OBJECTS = $(nodist__opensync_la_OBJECTS)
+@HAVE_PYTHON_TRUE@am__opensync_la_rpath = -rpath $(osbindingsdir)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(nodist__opensync_la_SOURCES)
+DIST_SOURCES =
+nodist_osPYTHON_INSTALL = $(INSTALL_DATA)
+py_compile = $(top_srcdir)/py-compile
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_ENGINE = @BUILD_ENGINE@
+BUILD_ENGINE_FALSE = @BUILD_ENGINE_FALSE@
+BUILD_ENGINE_TRUE = @BUILD_ENGINE_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_PROF_FALSE = @ENABLE_PROF_FALSE@
+ENABLE_PROF_TRUE = @ENABLE_PROF_TRUE@
+ENABLE_TESTS_FALSE = @ENABLE_TESTS_FALSE@
+ENABLE_TESTS_TRUE = @ENABLE_TESTS_TRUE@
+ENABLE_TOOLS_FALSE = @ENABLE_TOOLS_FALSE@
+ENABLE_TOOLS_TRUE = @ENABLE_TOOLS_TRUE@
+ENABLE_TRACE = @ENABLE_TRACE@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCOV_CFLAGS = @GCOV_CFLAGS@
+GCOV_LDFLAGS = @GCOV_LDFLAGS@
+GREP = @GREP@
+HAVE_PYTHON_FALSE = @HAVE_PYTHON_FALSE@
+HAVE_PYTHON_TRUE = @HAVE_PYTHON_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+OPENSYNC_CONFIGDIR = @OPENSYNC_CONFIGDIR@
+OPENSYNC_ENGINEHEADERDIR = @OPENSYNC_ENGINEHEADERDIR@
+OPENSYNC_FORMATSDIR = @OPENSYNC_FORMATSDIR@
+OPENSYNC_HEADERDIR = @OPENSYNC_HEADERDIR@
+OPENSYNC_PLUGINDIR = @OPENSYNC_PLUGINDIR@
+OSPLUGIN = @OSPLUGIN@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_workaround_abs_builddir = @ac_workaround_abs_builddir@
+ac_workaround_abs_srcdir = @ac_workaround_abs_srcdir@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CFLAGS = -Werror
+INCLUDES = @PACKAGE_CFLAGS@ $(PYTHON_INCLUDES) -I$(top_srcdir) -I$(top_srcdir)/opensync @XML_CFLAGS@
+EXTRA_DIST = opensync.i
+CLEANFILES = \
+ opensync.py \
+ opensync.pyc \
+ opensync_wrap.c
+
+@HAVE_PYTHON_TRUE@osdir = $(pyexecdir)
+@HAVE_PYTHON_TRUE@nodist_os_PYTHON = opensync.py
+@HAVE_PYTHON_TRUE@osbindingsdir = $(pyexecdir)
+@HAVE_PYTHON_TRUE@osbindings_LTLIBRARIES = _opensync.la
+nodist__opensync_la_SOURCES = opensync_wrap.c
+_opensync_la_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ $(PYTHON_LDFLAGS) -R $(libdir) -module -avoid-version
+_opensync_la_LIBADD = $(top_builddir)/opensync/libopensync.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign wrapper/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign wrapper/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-osbindingsLTLIBRARIES: $(osbindings_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(osbindingsdir)" || $(mkdir_p) "$(DESTDIR)$(osbindingsdir)"
+ @list='$(osbindings_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(osbindingsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(osbindingsdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(osbindingsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(osbindingsdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-osbindingsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list='$(osbindings_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(osbindingsdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(osbindingsdir)/$$p"; \
+ done
+
+clean-osbindingsLTLIBRARIES:
+ -test -z "$(osbindings_LTLIBRARIES)" || rm -f $(osbindings_LTLIBRARIES)
+ @list='$(osbindings_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
+_opensync.la: $(_opensync_la_OBJECTS) $(_opensync_la_DEPENDENCIES)
+ $(LINK) $(am__opensync_la_rpath) $(_opensync_la_LDFLAGS) $(_opensync_la_OBJECTS) $(_opensync_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opensync_wrap.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-nodist_osPYTHON: $(nodist_os_PYTHON)
+ @$(NORMAL_INSTALL)
+ test -z "$(osdir)" || $(mkdir_p) "$(DESTDIR)$(osdir)"
+ @list='$(nodist_os_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_osPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(osdir)/$$f'"; \
+ $(nodist_osPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(osdir)/$$f"; \
+ else :; fi; \
+ done; \
+ if test -n "$$dlist"; then \
+ if test -z "$(DESTDIR)"; then \
+ PYTHON=$(PYTHON) $(py_compile) --basedir "$(osdir)" $$dlist; \
+ else \
+ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(osdir)" $$dlist; \
+ fi; \
+ else :; fi
+
+uninstall-nodist_osPYTHON:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_os_PYTHON)'; dlist=''; for p in $$list; do\
+ f=$(am__strip_dir) \
+ rm -f "$(DESTDIR)$(osdir)/$$f"; \
+ rm -f "$(DESTDIR)$(osdir)/$${f}c"; \
+ rm -f "$(DESTDIR)$(osdir)/$${f}o"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(osbindingsdir)" "$(DESTDIR)$(osdir)"; 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:
+ -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-osbindingsLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nodist_osPYTHON install-osbindingsLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-nodist_osPYTHON \
+ uninstall-osbindingsLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-osbindingsLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-nodist_osPYTHON install-osbindingsLTLIBRARIES \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-info-am uninstall-nodist_osPYTHON \
+ uninstall-osbindingsLTLIBRARIES
+
+
+opensync_wrap.c: $(srcdir)/opensync.i
+ $(SWIG) -Werror -python -modern -I$(top_srcdir)/opensync $(PYTHON_INCLUDES) -o opensync_wrap.c $(srcdir)/opensync.i
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/debian/opensync/opensync-0.22/wrapper/opensync.i b/debian/opensync/opensync-0.22/wrapper/opensync.i
new file mode 100644
index 00000000..623c0f45
--- /dev/null
+++ b/debian/opensync/opensync-0.22/wrapper/opensync.i
@@ -0,0 +1,393 @@
+%module opensync
+%include "cdata.i"
+%include "cstring.i"
+%include "typemaps.i"
+
+%{
+#include "opensync.h"
+#include <glib.h>
+%}
+
+%include "opensync.h"
+typedef struct {} OSyncEnv;
+typedef struct {} OSyncPlugin;
+typedef struct {} OSyncPluginInfo;
+typedef struct {} OSyncContext;
+typedef struct {} OSyncChange;
+typedef struct {} OSyncMember;
+typedef struct {} OSyncHashTable;
+
+%extend OSyncMember {
+ OSyncMember(PyObject *obj) {
+ OSyncMember *member = NULL;
+ member = (OSyncMember *)PyCObject_AsVoidPtr(obj);
+ return member;
+ }
+
+ osync_bool get_slow_sync(const char *objtype) {
+ return osync_member_get_slow_sync(self, objtype);
+ }
+
+ void set_slow_sync(const char *objtype, osync_bool set) {
+ osync_member_set_slow_sync(self, objtype, set);
+ }
+
+ osync_bool objtype_enabled(const char *objtype) {
+ return osync_member_objtype_enabled(self, objtype);
+ }
+
+ const char *get_configdir() {
+ return osync_member_get_configdir(self);
+ }
+
+ void set_configdir(const char *configdir) {
+ osync_member_set_configdir(self, configdir);
+ }
+
+ %pythoncode %{
+ configdir = property(get_configdir, set_configdir);
+ %}
+
+ /* This SWIG code is really confusing, so I'd better explain it:
+ * The %apply directive means that any argument called int *sizeout is actually a return value;
+ * this means that __get_config (from python) returns two values, a pointer and a length.
+ * The char * is returned as a void * to avoid SWIG converting it to a string automatically
+ * (because theoretically it might not be null-terminated).
+ */
+ %apply int *OUTPUT {int *sizeout};
+ void * __get_config(int *sizeout) {
+ char *data;
+ OSyncError *error;
+ /* FIXME: do something with the error! */
+ if (osync_member_get_config(self, &data, sizeout, &error))
+ return data;
+ else
+ return NULL;
+ }
+
+ void __set_config(void *data, int size) {
+ osync_member_set_config(self, data, size);
+ }
+
+ %pythoncode %{
+ def get_config(self):
+ data, len = self.__get_config()
+ return cdata(data, len)
+ def set_config(self, data):
+ self.__set_config(data, len(data))
+ config = property(get_config, set_config)
+ %}
+}
+
+%extend OSyncChange {
+ OSyncChange(PyObject *obj=NULL) {
+ OSyncChange *change = NULL;
+ if (obj)
+ change = (OSyncChange *)PyCObject_AsVoidPtr(obj);
+ else
+ change = osync_change_new();
+ return change;
+ }
+
+ ~OSyncChange() {
+ osync_trace(TRACE_INTERNAL, "Deleting change %p", self);
+ }
+
+ %cstring_input_binary(char *data, int datasize);
+ void __set_data(char *data, int datasize) {
+ osync_change_set_data(self, data, datasize, TRUE);
+ }
+
+ void *__get_data() {
+ return osync_change_get_data(self);
+ }
+
+ int __get_datasize() {
+ return osync_change_get_datasize(self);
+ }
+
+ %pythoncode %{
+ def get_data(self):
+ try:
+ return self.__data
+ except AttributeError:
+ self.__data = cdata(self.__get_data(), self.__get_datasize())
+ # FIXME: despite passing the size around, sometimes the data
+ # seems also to be null-terminated; remove this.
+ if self.__data[-1] == '\0':
+ self.__data = self.__data[:-1]
+ return self.__data
+
+ def set_data(self, data):
+ self.__data = data
+ self.__set_data(data)
+
+ data = property(get_data,set_data)
+ %}
+
+ void report(OSyncContext *ctx)
+ {
+ /* take a copy of the data, so python does not try to reclaim it
+ * this memory should be freed by opensync after the change is written
+ */
+ if (osync_change_has_data(self)) {
+ void *data = osync_change_get_data(self);
+ int datasize = osync_change_get_datasize(self);
+ void *copy = memcpy(malloc(datasize), data, datasize);
+ osync_change_set_data(self, copy, datasize, TRUE);
+ }
+ osync_context_report_change(ctx, self);
+ }
+
+ void set_uid(const char *uid) {
+ osync_change_set_uid(self, uid);
+ }
+
+ const char *get_uid() {
+ return osync_change_get_uid(self);
+ }
+
+ %pythoncode %{
+ uid = property(get_uid, set_uid)
+ %}
+
+ void set_format(const char *format) {
+ osync_change_set_objformat_string(self, format);
+ }
+
+ const char *get_format() {
+ OSyncObjFormat *format = osync_change_get_objformat(self);
+ if (!format)
+ return NULL;
+ return osync_objformat_get_name(format);
+ }
+
+ %pythoncode %{
+ format = property(get_format, set_format)
+ %}
+
+ void set_objtype(const char *objtype) {
+ osync_change_set_objtype_string(self, objtype);
+ }
+
+ const char *get_objtype() {
+ OSyncObjType *objtype = osync_change_get_objtype(self);
+ if (!objtype)
+ return NULL;
+ return osync_objtype_get_name(objtype);
+ }
+
+ %pythoncode %{
+ objtype = property(get_objtype, set_objtype)
+ %}
+
+ void set_changetype(int changetype) {
+ osync_change_set_changetype(self, changetype);
+ }
+
+ int get_changetype() {
+ return osync_change_get_changetype(self);
+ }
+
+ %pythoncode %{
+ changetype = property(get_changetype, set_changetype)
+ %}
+
+ void set_hash(const char *hash) {
+ osync_change_set_hash(self, hash);
+ }
+
+ const char *get_hash() {
+ return osync_change_get_hash(self);
+ }
+
+ %pythoncode %{
+ hash = property(get_hash, set_hash)
+ %}
+
+ void set_member(OSyncMember *member) {
+ osync_change_set_member(self, member);
+ }
+
+ OSyncMember *get_member() {
+ return osync_change_get_member(self);
+ }
+
+ %pythoncode %{
+ member = property(get_member, set_member);
+ %}
+};
+
+%extend OSyncContext {
+ OSyncContext(PyObject *obj) {
+ OSyncContext *ctx = (OSyncContext *)PyCObject_AsVoidPtr(obj);
+ return ctx;
+ }
+
+ void report_success(void) {
+ osync_context_report_success(self);
+ }
+
+ void report_error(int type, const char *msg) {
+ osync_context_report_error(self, type, msg);
+ }
+};
+
+%extend OSyncPlugin {
+ OSyncPlugin(OSyncEnv *env) {
+ OSyncPlugin *plugin = osync_plugin_new(env);
+ return plugin;
+ }
+
+ ~OSyncPlugin() {
+ osync_plugin_free(self);
+ }
+
+ const char *get_name() {
+ return osync_plugin_get_name(self);
+ }
+
+ %pythoncode %{
+ name = property(get_name)
+ %}
+};
+
+%extend OSyncPluginInfo {
+ OSyncPluginInfo(PyObject *obj) {
+ OSyncPluginInfo *exinfo = (OSyncPluginInfo *)PyCObject_AsVoidPtr(obj);
+ return exinfo;
+ }
+
+ void accept_objtype(const char *objtype) {
+ osync_plugin_accept_objtype(self, objtype);
+ }
+
+ void accept_objformat(const char *objtype, const char *objformat, const char *extension = NULL) {
+ osync_plugin_accept_objformat(self, objtype, objformat, extension);
+ }
+
+ void set_name(const char *name) {
+ self->name = g_strdup(name);
+ }
+ const char *get_name() {
+ return self->name;
+ }
+
+ void set_longname(const char *name) {
+ self->longname = g_strdup(name);
+ }
+ const char *get_longname() {
+ return self->longname;
+ }
+
+ void set_description(const char *desc) {
+ self->description = g_strdup(desc);
+ }
+ const char *get_description() {
+ return self->description;
+ }
+
+ %pythoncode %{
+ name = property(get_name, set_name)
+ longname = property(get_longname, set_longname)
+ description = property(get_description, set_description)
+ %}
+};
+
+%extend OSyncEnv {
+ OSyncEnv(PyObject *obj) {
+ return (OSyncEnv *)PyCObject_AsVoidPtr(obj);
+ }
+
+ OSyncEnv() {
+ return osync_env_new();
+ }
+
+ ~OSyncEnv() {
+ osync_env_free(self);
+ }
+
+ int initialize() {
+ return osync_env_initialize(self, NULL);
+ }
+
+ int finalize() {
+ return osync_env_finalize(self, NULL);
+ }
+
+ int num_plugins() {
+ return osync_env_num_plugins(self);
+ }
+
+ OSyncPlugin *get_nth_plugin(int nth) {
+ OSyncPlugin *plugin = osync_env_nth_plugin(self, nth);
+ return plugin;
+ }
+};
+
+%extend OSyncHashTable {
+ OSyncHashTable() {
+ return osync_hashtable_new();
+ }
+
+ ~OSyncHashTable() {
+ osync_hashtable_free(self);
+ }
+
+ void forget() {
+ osync_hashtable_forget(self);
+ }
+
+ osync_bool load(OSyncMember *member) {
+ OSyncError *error;
+ /* FIXME: do something with the error! */
+ return osync_hashtable_load(self, member, &error);
+ }
+
+ void close() {
+ osync_hashtable_close(self);
+ }
+
+ void update_hash(OSyncChange *change) {
+ osync_hashtable_update_hash(self, change);
+ }
+
+ void report(const char *uid) {
+ osync_hashtable_report(self, uid);
+ }
+
+ void report_deleted(OSyncContext *context, const char *objtype) {
+ osync_hashtable_report_deleted(self, context, objtype);
+ }
+
+ OSyncChangeType get_changetype(const char *uid, const char *hash, const char *objtype) {
+ return osync_hashtable_get_changetype(self, uid, hash, objtype);
+ }
+
+ osync_bool detect_change(OSyncChange *change) {
+ return osync_hashtable_detect_change(self, change);
+ }
+
+ void set_slow_sync(const char *objtype) {
+ osync_hashtable_set_slow_sync(self, objtype);
+ }
+};
+
+/* pull in constants from opensync_error.h without all the functions */
+%constant int NO_ERROR = OSYNC_NO_ERROR;
+%constant int ERROR_GENERIC = OSYNC_ERROR_GENERIC;
+%constant int ERROR_IO_ERROR = OSYNC_ERROR_IO_ERROR;
+%constant int ERROR_NOT_SUPPORTED = OSYNC_ERROR_NOT_SUPPORTED;
+%constant int ERROR_TIMEOUT = OSYNC_ERROR_TIMEOUT;
+%constant int ERROR_DISCONNECTED = OSYNC_ERROR_DISCONNECTED;
+%constant int ERROR_FILE_NOT_FOUND = OSYNC_ERROR_FILE_NOT_FOUND;
+%constant int ERROR_EXISTS = OSYNC_ERROR_EXISTS;
+%constant int ERROR_CONVERT = OSYNC_ERROR_CONVERT;
+%constant int ERROR_MISCONFIGURATION = OSYNC_ERROR_MISCONFIGURATION;
+%constant int ERROR_INITIALIZATION = OSYNC_ERROR_INITIALIZATION;
+%constant int ERROR_PARAMETER = OSYNC_ERROR_PARAMETER;
+%constant int ERROR_EXPECTED = OSYNC_ERROR_EXPECTED;
+%constant int ERROR_NO_CONNECTION = OSYNC_ERROR_NO_CONNECTION;
+%constant int ERROR_TEMPORARY = OSYNC_ERROR_TEMPORARY;
+%constant int ERROR_LOCKED = OSYNC_ERROR_LOCKED;
+%constant int ERROR_PLUGIN_NOT_FOUND = OSYNC_ERROR_PLUGIN_NOT_FOUND;
diff --git a/debian/opensync/opensync_0.22.orig.tar.xz b/debian/opensync/opensync_0.22.orig.tar.xz
new file mode 100644
index 00000000..da8a36e2
--- /dev/null
+++ b/debian/opensync/opensync_0.22.orig.tar.xz
Binary files differ