From dee917a286cd99797288f8fd3c2e69c0ce74b5e5 Mon Sep 17 00:00:00 2001 From: Yu Jiung Date: Tue, 17 Nov 2015 15:19:50 +0900 Subject: [PATCH] [gupnp] Update gupnp version from 0.14.1 to 0.20.4 Change-Id: I035ad37d3903b1eee1996bcee7f15584afa0509f Signed-off-by: Yu jiung --- ChangeLog | 3216 ----------- INSTALL | 260 +- Makefile.am | 8 +- Makefile.in | 166 +- NEWS | 377 +- aclocal.m4 | 158 +- config.guess => build-aux/config.guess | 397 +- config.sub => build-aux/config.sub | 229 +- depcomp => build-aux/depcomp | 190 +- install-sh => build-aux/install-sh | 29 +- ltmain.sh => build-aux/ltmain.sh | 4016 +++++++++----- missing => build-aux/missing | 53 +- config.h.in | 14 + configure | 6779 +++++++++++++---------- configure.ac | 162 +- doc/Makefile.am | 49 +- doc/Makefile.in | 309 +- doc/client-tutorial.xml | 7 +- doc/glossary.xml | 2 +- doc/gupnp-docs.xml | 1 + doc/gupnp-sections.txt | 90 + doc/html/GUPnPContext.html | 205 +- doc/html/GUPnPContextManager.html | 179 +- doc/html/GUPnPControlPoint.html | 76 +- doc/html/GUPnPDevice.html | 18 +- doc/html/GUPnPDeviceInfo.html | 222 +- doc/html/GUPnPDeviceProxy.html | 16 +- doc/html/GUPnPResourceFactory.html | 79 +- doc/html/GUPnPRootDevice.html | 92 +- doc/html/GUPnPService.html | 304 +- doc/html/GUPnPServiceInfo.html | 110 +- doc/html/GUPnPServiceProxy.html | 270 +- doc/html/GUPnPWhiteList.html | 311 ++ doc/html/GUPnPXMLDoc.html | 43 +- doc/html/annotation-glossary.html | 22 +- doc/html/api-device-control.html | 6 +- doc/html/api-device-impl.html | 6 +- doc/html/api-device-info.html | 6 +- doc/html/api-tools.html | 6 +- doc/html/api-utility.html | 9 +- doc/html/api.html | 9 +- doc/html/client-tutorial.html | 23 +- doc/html/glossary.html | 8 +- doc/html/gupnp-Error-codes.html | 42 +- doc/html/gupnp-Special-UPnP-types.html | 26 +- doc/html/gupnp-binding-tool.html | 12 +- doc/html/gupnp-gupnp-service-introspection.html | 109 +- doc/html/gupnp.devhelp | 241 - doc/html/gupnp.devhelp2 | 54 +- doc/html/home.png | Bin 654 -> 578 bytes doc/html/index.html | 13 +- doc/html/index.sgml | 36 +- doc/html/ix01.html | 80 +- doc/html/left.png | Bin 459 -> 373 bytes doc/html/overview.html | 6 +- doc/html/right.png | Bin 472 -> 380 bytes doc/html/schemas-device.html | 6 +- doc/html/schemas-service.html | 6 +- doc/html/schemas.html | 6 +- doc/html/server-tutorial.html | 57 +- doc/html/tutorial.html | 6 +- doc/html/up.png | Bin 406 -> 291 bytes doc/server-tutorial.xml | 40 +- doc/tmpl/gupnp-context-manager.sgml | 87 - doc/tmpl/gupnp-context.sgml | 145 - doc/tmpl/gupnp-control-point.sgml | 122 - doc/tmpl/gupnp-device-info.sgml | 305 - doc/tmpl/gupnp-device-proxy.sgml | 28 - doc/tmpl/gupnp-device.sgml | 33 - doc/tmpl/gupnp-error.sgml | 91 - doc/tmpl/gupnp-resource-factory.sgml | 86 - doc/tmpl/gupnp-root-device.sgml | 117 - doc/tmpl/gupnp-service-info.sgml | 175 - doc/tmpl/gupnp-service-introspection.sgml | 130 - doc/tmpl/gupnp-service-proxy.sgml | 276 - doc/tmpl/gupnp-service.sgml | 252 - doc/tmpl/gupnp-types.sgml | 85 - doc/tmpl/gupnp-unused.sgml | 0 doc/tmpl/gupnp-xml-doc.sgml | 48 - examples/Makefile.in | 110 +- examples/light-client.c | 7 +- examples/light-server.c | 30 +- gtk-doc.make | 182 +- gupnp-1.0-uninstalled.pc.in | 3 +- gupnp-1.0.pc.in | 3 +- libgupnp/Makefile.am | 163 +- libgupnp/Makefile.in | 375 +- libgupnp/gena-protocol.h | 4 +- libgupnp/gupnp-connman-manager.c | 781 +++ libgupnp/gupnp-connman-manager.h | 74 + libgupnp/gupnp-context-manager.c | 453 +- libgupnp/gupnp-context-manager.h | 33 +- libgupnp/gupnp-context-private.h | 4 +- libgupnp/gupnp-context.c | 376 +- libgupnp/gupnp-context.h | 23 +- libgupnp/gupnp-control-point.c | 90 +- libgupnp/gupnp-control-point.h | 14 +- libgupnp/gupnp-device-info-private.h | 4 +- libgupnp/gupnp-device-info.c | 100 +- libgupnp/gupnp-device-info.h | 23 +- libgupnp/gupnp-device-proxy.c | 6 +- libgupnp/gupnp-device-proxy.h | 14 +- libgupnp/gupnp-device.c | 4 +- libgupnp/gupnp-device.h | 14 +- libgupnp/gupnp-error-private.h | 4 +- libgupnp/gupnp-error.c | 4 +- libgupnp/gupnp-error.h | 6 +- libgupnp/gupnp-linux-context-manager.c | 817 +++ libgupnp/gupnp-linux-context-manager.h | 75 + libgupnp/gupnp-marshal.c | 47 +- libgupnp/gupnp-marshal.h | 8 - libgupnp/gupnp-marshal.list | 1 - libgupnp/gupnp-network-manager.c | 727 ++- libgupnp/gupnp-network-manager.h | 12 +- libgupnp/gupnp-resource-factory-private.h | 4 +- libgupnp/gupnp-resource-factory.c | 34 +- libgupnp/gupnp-resource-factory.h | 14 +- libgupnp/gupnp-root-device.c | 36 +- libgupnp/gupnp-root-device.h | 20 +- libgupnp/gupnp-service-info.c | 42 +- libgupnp/gupnp-service-info.h | 16 +- libgupnp/gupnp-service-introspection-private.h | 4 +- libgupnp/gupnp-service-introspection.c | 15 +- libgupnp/gupnp-service-introspection.h | 22 +- libgupnp/gupnp-service-proxy.c | 544 +- libgupnp/gupnp-service-proxy.h | 16 +- libgupnp/gupnp-service.c | 280 +- libgupnp/gupnp-service.h | 24 +- libgupnp/gupnp-simple-context-manager.c | 217 + libgupnp/gupnp-simple-context-manager.h | 78 + libgupnp/gupnp-types-private.h | 4 +- libgupnp/gupnp-types.c | 4 +- libgupnp/gupnp-types.h | 4 +- libgupnp/gupnp-unix-context-manager.c | 251 +- libgupnp/gupnp-unix-context-manager.h | 16 +- libgupnp/gupnp-white-list.c | 390 ++ libgupnp/gupnp-white-list.h | 107 + libgupnp/gupnp-windows-context-manager.c | 106 + libgupnp/gupnp-windows-context-manager.h | 73 + libgupnp/gupnp-xml-doc.c | 17 +- libgupnp/gupnp-xml-doc.h | 27 +- libgupnp/gupnp.h | 5 +- libgupnp/gvalue-util.c | 12 +- libgupnp/gvalue-util.h | 4 +- libgupnp/http-headers.c | 135 +- libgupnp/http-headers.h | 9 +- libgupnp/xml-util.c | 4 +- libgupnp/xml-util.h | 4 +- m4/gtk-doc.m4 | 6 + m4/introspection.m4 | 6 + m4/libtool.m4 | 2248 +++++--- m4/ltoptions.m4 | 32 +- m4/ltversion.m4 | 12 +- m4/lt~obsolete.m4 | 12 +- m4/vapigen.m4 | 43 + packaging/gupnp.spec | 48 +- tests/Makefile.am | 10 +- tests/Makefile.in | 348 +- tests/gtest/Makefile.am | 19 + tests/gtest/Makefile.in | 672 +++ tests/gtest/data/ServiceBgo69762.xml | 107 + tests/gtest/data/TestBgo696762.xml | 21 + tests/gtest/data/random4k.bin | Bin 0 -> 4096 bytes tests/gtest/test-bugs.c | 183 + tests/gtest/test-context.c | 220 + tests/test-browsing.c | 36 +- tests/test-introspection.c | 28 +- tests/test-proxy.c | 42 +- tests/test-server.c | 25 +- tests/test-white-list.c | 291 + tools/Makefile.in | 92 +- tools/gupnp-binding-tool | 454 +- vala/GUPnP-1.0.metadata | 40 + vala/Makefile.am | 21 + vala/Makefile.in | 494 ++ vala/gupnp-1.0-custom.vala | 68 + vala/gupnp-1.0.deps | 3 + 177 files changed, 19205 insertions(+), 14757 deletions(-) rename config.guess => build-aux/config.guess (86%) rename config.sub => build-aux/config.sub (89%) rename depcomp => build-aux/depcomp (77%) rename install-sh => build-aux/install-sh (95%) rename ltmain.sh => build-aux/ltmain.sh (67%) mode change 100755 => 100644 rename missing => build-aux/missing (89%) create mode 100644 doc/html/GUPnPWhiteList.html delete mode 100644 doc/html/gupnp.devhelp delete mode 100644 doc/tmpl/gupnp-context-manager.sgml delete mode 100644 doc/tmpl/gupnp-context.sgml delete mode 100644 doc/tmpl/gupnp-control-point.sgml delete mode 100644 doc/tmpl/gupnp-device-info.sgml delete mode 100644 doc/tmpl/gupnp-device-proxy.sgml delete mode 100644 doc/tmpl/gupnp-device.sgml delete mode 100644 doc/tmpl/gupnp-error.sgml delete mode 100644 doc/tmpl/gupnp-resource-factory.sgml delete mode 100644 doc/tmpl/gupnp-root-device.sgml delete mode 100644 doc/tmpl/gupnp-service-info.sgml delete mode 100644 doc/tmpl/gupnp-service-introspection.sgml delete mode 100644 doc/tmpl/gupnp-service-proxy.sgml delete mode 100644 doc/tmpl/gupnp-service.sgml delete mode 100644 doc/tmpl/gupnp-types.sgml delete mode 100644 doc/tmpl/gupnp-unused.sgml delete mode 100644 doc/tmpl/gupnp-xml-doc.sgml create mode 100644 libgupnp/gupnp-connman-manager.c create mode 100644 libgupnp/gupnp-connman-manager.h create mode 100644 libgupnp/gupnp-linux-context-manager.c create mode 100644 libgupnp/gupnp-linux-context-manager.h create mode 100644 libgupnp/gupnp-simple-context-manager.c create mode 100644 libgupnp/gupnp-simple-context-manager.h create mode 100644 libgupnp/gupnp-white-list.c create mode 100644 libgupnp/gupnp-white-list.h create mode 100644 libgupnp/gupnp-windows-context-manager.c create mode 100644 libgupnp/gupnp-windows-context-manager.h create mode 100644 m4/vapigen.m4 create mode 100644 tests/gtest/Makefile.am create mode 100644 tests/gtest/Makefile.in create mode 100644 tests/gtest/data/ServiceBgo69762.xml create mode 100644 tests/gtest/data/TestBgo696762.xml create mode 100644 tests/gtest/data/random4k.bin create mode 100644 tests/gtest/test-bugs.c create mode 100644 tests/gtest/test-context.c create mode 100644 tests/test-white-list.c create mode 100644 vala/GUPnP-1.0.metadata create mode 100644 vala/Makefile.am create mode 100644 vala/Makefile.in create mode 100644 vala/gupnp-1.0-custom.vala create mode 100644 vala/gupnp-1.0.deps diff --git a/ChangeLog b/ChangeLog index df42c6b..e69de29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3216 +0,0 @@ -2009-01-05 Ross Burton - - * libgupnp/gena-protocol.h: - * libgupnp/gupnp-service-proxy.c: - Don't assume subscription timeout is > 30s. - - Instead choose a random timeout value that is between 1 and half - the timeout value given by service (thanks Zeeshan Ali) - -2008-12-08 Ross Burton - - * libgupnp/gupnp-device-info.c: - Don't look for closest icon if there are no icons. Fixes the crash - in case of empty iconList nodes in device descriptions. (thanks - Zeeshan Ali) - -2008-11-29 Jorn Baayen - - * libgupnp/gupnp-device.c (gupnp_device_get_device), - (gupnp_device_get_service), (gupnp_device_set_property), - (gupnp_device_dispose): - * libgupnp/gupnp-service.c (gupnp_service_set_property), - (gupnp_service_dispose): - - Reference the root device weakly to avoid reference loops when - subclassing RootDevice. Based on patch from Zeeshan Ali. - -2008-11-28 Jorn Baayen - - * libgupnp/gupnp-control-point.c (got_description_url): - * libgupnp/gupnp-root-device.c (download_and_parse): - * libgupnp/gupnp-service-info.c - (gupnp_service_info_get_introspection), (got_scpd_url): - * libgupnp/gupnp-service-proxy.c (check_action_response), - (server_handler): - * libgupnp/gupnp-service.c (control_server_handler): - - Use xmlRecoverMemory instead of xmlParseMemory when parsing xml. - Hopefully we now manage better with the masses of über-broken xml - out there. (Thanks Jussi for the suggestion) - -2008-11-24 Ross Burton - - * libgupnp/gupnp-resource-factory.c: - Use the correct value to key_equal_func argument of - g_hash_table_new_full (thanks Zeeshan Ali) - -2008-11-18 Jorn Baayen - - * AUTHORS: - - New e-mail address. - - * configure.ac: - - Depend on glib 2.18. - - * libgupnp/gupnp-error-private.h: - * libgupnp/gupnp-error.c (_gupnp_error_set_server_error), - (_gupnp_error_new_server_error): - * libgupnp/gupnp-service-info.c - (gupnp_service_info_get_introspection), (got_scpd_url): - * libgupnp/gupnp-service-proxy.c (check_action_response): - - Use g_set_error_literal(). (instead of our own home-cooked - set_error_literal()) - - Mark private error functions as G_GNUC_INTERNAL. - -2008-11-18 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c (subscribe_got_response): - * libgupnp/gupnp-service.c (notify_got_response), - (notify_subscriber): - - Use g_error_new_literal() instead of passing literal error - messages through "%s". - - Specify character set (UTF-8) in NOTIFY messages. - -2008-11-18 Ross Burton - - * tests/test-proxy.c: - * tests/test-server.c: - * tests/test-browsing.c: - * tests/test-introspection.c: - * examples/light-client.c: - * examples/light-server.c: - Don't user g_error but g_printerr (Sven Neumann). - -2008-11-17 Jussi Kukkonen - - * configure.ac: - * NEWS: - Version 0.12.4. - -2008-11-14 Ross Burton - - * libgupnp/gupnp-service-proxy.c: - Set the Content Type header correctly (#1257, Zeeshan Ali Khattak) - -2008-11-14 Ross Burton - - * libgupnp/gupnp-service.c: - * libgupnp/gupnp-service-proxy.c: - * tests/test-proxy.c: - * tests/test-server.c: - * tests/test-browsing.c: - * tests/test-introspection.c: - * examples/light-client.c: - * examples/light-server.c: - Don't pass arbitrary strings to printf() for security (thanks Sven Neumann) - -2008-11-14 Ross Burton - - * libgupnp/gupnp-context.c: - Handle fscanf failing in get_default_host_ip (thanks Sven Neumann). - -2008-11-14 Ross Burton - - * libgupnp/gupnp-service-proxy.c: - Fix typos (thanks Sven Neumann) - -2008-11-12 Jussi Kukkonen - - * doc/glossary.xml: - * doc/overview.xml: - - Add DIDL-Lite and SSDP to glossary, mention upnp and dlna specs. - -2008-11-11 Jussi Kukkonen - - * README.release: - - Add release instructions for GUPnP components - -2008-11-06 Zeeshan Ali (Khattak) - - * AUTHORS: - * libgupnp/gupnp-resource-factory-private.h: - * libgupnp/gupnp-resource-factory.c: - * libgupnp/gupnp-resource-factory.h: - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service-introspection.h: - * libgupnp/gupnp-types-private.h: - * libgupnp/gupnp-types.c: - * libgupnp/gupnp-types.h: - * tests/test-introspection.c: - Replace my non-working "@gstreamer.net" email with "@gnome.org" one. - -2008-10-27 Ross Burton - - * configure.ac: - * NEWS: - Version 0.12.3. - -2008-10-27 Ross Burton - - * Makefile.am: - Enable gtk-doc in distcheck. - -2008-10-27 Ross Burton - - * libgupnp/http-headers.c: - Don't use NULL return values from g_get_application_name() (#1176). - -2008-10-22 Jussi Kukkonen - - * tools/gupnp-binding-tool: - - Use inline functions. - Fix generated code indent, remove trailing whitespace. - -2008-10-20 Jussi Kukkonen - - * tools/gupnp-binding-tool: - - Don't include specific glib/gupnp headers, use gupnp.h. - -2008-10-17 Jussi Kukkonen - - * tools/gupnp-binding-tool: - - Add serverside binding generation. - - * doc/client-tutorial.xml - * doc/server-tutorial.xml - * doc/gupnp-binding-tool.xml - - Update documentation for new binding generation. - -2008-10-17 Jussi Kukkonen - - * tools/gupnp-binding-tool: - - gupnp-binding-tool improvements - - add support for all upnp types - - add "--prefix" option - - prettify binding tool output - - make var and function names lower_case, not CamelCase - - generate state variable notification bindings - This change makes gupnp-binding-tool output incompatible with old one - -2008-10-14 Zeeshan Ali (Khattak) - - * libgupnp/gupnp-service-introspection.c: - - Add some missing checks for NULL. - -2008-09-27 Jorn Baayen - - * doc/gupnp-sections.txt: - * libgupnp/gupnp-context-private.h: - * libgupnp/gupnp-context.c (gupnp_context_get_property), - (gupnp_context_class_init), (gupnp_context_get_session): - * libgupnp/gupnp-context.h: - * libgupnp/gupnp-control-point.c (gupnp_control_point_dispose), - (load_description): - * libgupnp/gupnp-root-device.c (download_and_parse): - * libgupnp/gupnp-service-info.c (gupnp_service_info_dispose), - (gupnp_service_info_get_introspection), - (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-proxy.c (gupnp_service_proxy_dispose), - (finish_action_msg), (gupnp_service_proxy_cancel_action), - (subscription_expire), (subscribe), (unsubscribe): - * libgupnp/gupnp-service.c (subscription_data_free), - (notify_got_response), (notify_subscriber): - - Make gupnp_context_get_session() public. - -2008-09-27 Jorn Baayen - - * configure.ac: - - Increase version number. - -2008-09-27 Jorn Baayen - - * libgupnp/gupnp-context.c (gupnp_context_init), - (gupnp_context_constructor), (gupnp_context_class_init), - (gupnp_context_get_server), (host_path_handler): - * libgupnp/gupnp-resource-factory.c - (gupnp_resource_factory_create_device_proxy), - (gupnp_resource_factory_create_device), - (gupnp_resource_factory_create_service): - * libgupnp/gupnp-root-device.c (gupnp_root_device_constructor): - * libgupnp/gupnp-service-proxy.c (gupnp_service_proxy_dispose), - (emit_notifications), (server_handler), (subscription_expire), - (subscribe_got_response), (unsubscribe): - * libgupnp/gupnp-service.c (subscription_data_free), (subscribe), - (resubscribe): - - Use the specified GMainContext for timeouts and plug several leaks. - - Based on a patch from Olivier Crete . - -2008-08-30 Jorn Baayen - - * examples/Makefile.am: - - Link examples to gthread. - -2008-08-27 Jorn Baayen - - * configure.ac: - * tests/Makefile.am: - - Link tests to gthread. - -2008-07-14 Jorn Baayen - - * configure.ac: - - Bump version to 0.12.1.99. - - * libgupnp/gupnp-service.c (finalize_action), - (gupnp_service_action_return), (gupnp_service_action_return_error), - (control_server_handler), (subscription_server_handler), - (gupnp_service_class_init): - - Support returning actions outside of the 'action-invoked' signal - handler. Based on a patch from Zeeshan Ali Khattak - . - -2008-06-30 Jorn Baayen - - * NEWS: - * configure.ac: - - Release 0.12.1. - -2008-06-20 Jorn Baayen - - * libgupnp/http-headers.c (http_request_get_range): - Support Range headers without upper bound. - -2008-06-20 Jorn Baayen - - * libgupnp/gupnp-context.c (host_path_handler): - Remove superfluous free. - -2008-06-16 Jorn Baayen - - * NEWS: - * configure.ac: - Release 0.12. - -2008-06-11 Ross Burton - - * doc/server-tutorial.xml: - Add *correct* comments about when query-variable is called. - -2008-06-11 Ross Burton - - * doc/server-tutorial.xml: - Add comments about when query-variable is called. - -2008-06-10 Ross Burton - - * doc/glossary.xml: - Add links to the cross references. - -2008-06-10 Ross Burton - - * doc/client-tutorial.xml: - * doc/server-tutorial.xml: - Lots of proof reading. - -2008-06-10 Ross Burton - - * examples/BinaryLight1.xml: - Use better friendly and model names. - -2008-06-10 Ross Burton - - * doc/glossary.xml: - Add UDN, fix acronyms. - -2008-06-10 Ross Burton - - * doc/Makefile.am: - * doc/gupnp-docs.sgml: - * doc/gupnp-docs.xml: - Rename the main document to .xml, this isn't 1980 any more. - -2008-06-10 Ross Burton - - * doc/gupnp-binding-tool.xml: - * doc/gupnp-docs.sgml: - Don't use entities to get the version, use XInclude. - -2008-06-10 Ross Burton - - * doc/gupnp-binding-tool.xml: - * doc/gupnp-docs.sgml: - * doc/Makefile.am: - Add a refentry for gupnp-binding-tool and add it to the - documentation. - -2008-06-10 Ross Burton - - * doc/glossary.xml: - Add SCPD and remove baseform attributes. - -2008-06-10 Ross Burton - - * doc/gupnp-docs.sgml: - Merge the overview into the tutorial part. - -2008-06-10 Ross Burton - - * doc/gupnp-docs.sgml: - Add an index. - -2008-06-10 Ross Burton - - * doc/server-tutorial.xml: - Document service description files. - -2008-06-09 Ross Burton - - * doc/server-tutorial.xml: - Talk about the UPnP lightbulb instead of a made up interface, so - we can refer to the example code. - -2008-06-09 Ross Burton - - * examples/: - * Makefile.am: - * configure.ac: - Add some basic but non-trivial examples. - -2008-06-09 Ross Burton - - * doc/gupnp-docs.sgml: - * doc/glossary.xml: - * doc/overview.xml: - * doc/Makefile.am: - Add a basic glossary, and reference the Intel UPnP book. - -2008-06-06 Ross Burton - - * doc/gupnp-docs.sgml: - * doc/overview.xml: - * doc/Makefile.am: - Split the (currently very small) overview out into a separate file. - -2008-06-06 Ross Burton - - * doc/gupnp-docs.sgml: - Add more section IDs. - -2008-06-05 Zeeshan Ali Khattak - - * gupnp/libgupnp/gupnp-service.c: - - Refactor connect_names_to_signal_handlers() function. - -2008-06-05 Jorn Baayen - - * libgupnp/gupnp-marshal.list: - * libgupnp/gupnp-service.c (gupnp_service_class_init): - Revert back to G_TYPE_POINTER for GValue argument type. We do not - want the GValue to be boxed as it is passed as an outward argument. - - * libgupnp/gupnp-service.c (notify_got_response): - Cancel subscription on Precondition Failed. - -2008-06-04 Jorn Baayen - - * libgupnp/gupnp-root-device.c (download_and_parse), - (gupnp_root_device_constructor): - Split out description document downloading code into a separate - function. - -2008-06-04 Jorn Baayen - - * libgupnp/gupnp-context.c (construct_local_path), (append_locale), - (redirect_to_folder), (host_path_handler), (host_path_data_new), - (host_path_data_free), (gupnp_context_host_path): - * libgupnp/gupnp-control-point.c (load_description): - * libgupnp/gupnp-root-device.c (gupnp_root_device_constructor): - * libgupnp/gupnp-service-info.c - (gupnp_service_info_get_introspection), - (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-proxy.c (begin_action_msg): - * libgupnp/gupnp-service.c (gupnp_service_action_get_locales): - * libgupnp/http-headers.c (http_language_from_locale), - (locale_from_http_language), (http_request_get_range), - (http_request_set_accept_language), - (http_request_get_accept_locales), (http_request_set_user_agent), - (http_response_set_content_locale), - (http_response_set_content_type), - (http_response_set_content_range): - * libgupnp/http-headers.h: - Cleanup of hosting logic. - Reprefix message_ functions with http_request_/http_response_. - -2008-06-03 Jorn Baayen - - * libgupnp/gupnp-context.c (host_path_handler): - Don't free path_to_open too early. - -2008-06-03 Jorn Baayen - - * doc/server-tutorial.xml: - Update for new gupnp_root_device_new() API. - -2008-06-03 Jorn Baayen - - * libgupnp/Makefile.am: - Bump ABI version. - - * libgupnp/gupnp-context.c (host_path_handler), - (gupnp_context_host_path): - Fix a couple of bugs regarding Accept-Language handling. - - * libgupnp/gupnp-control-point.c (load_description): - * libgupnp/gupnp-service-proxy.c (begin_action_msg), - (finish_action_msg), (check_action_response), - (gupnp_service_proxy_cancel_action): - * libgupnp/gupnp-service.c (gupnp_service_action_get_locales): - * libgupnp/http-headers.c (message_get_range), - (message_set_accept_language), (message_get_accept_locales): - * libgupnp/http-headers.h: - Add Accept-Language header to more messages. - Some restructuring for clarity. - - * libgupnp/gupnp-root-device.c (gupnp_root_device_finalize), - (gupnp_root_device_init), (gupnp_root_device_constructor), - (gupnp_root_device_new): - * libgupnp/gupnp-root-device.h: - Remove xmlDoc argument from gupnp_root_device_new() for simplicity. - xmlDocs can still be passed to gupnp_root_device_new_full(). - - * tests/test-server.c (main): - Update for API change. - -2008-05-30 Ross Burton - - * doc/server-tutorial.xml: - Add more content. - -2008-05-29 Ross Burton - - * libgupnp/gupnp-service.c: - Add gtk-doc markup to signal names so they are links. - -2008-05-29 Ross Burton - - * doc/client-tutorial.xml: - * doc/gupnp-docs.sgml: - * doc/Makefile.am: - Run the client tutorial through gtk-doc for symbol linking and fix - some tags. - -2008-05-29 Ross Burton - - * doc/server-tutorial.xml: - * doc/gupnp-docs.sgml: - * doc/Makefile.am: - Add rather poor first draft of the server guide. - -2008-05-28 Ross Burton - - * doc/gupnp-sections.txt: - Add a symbol which somehow decided it wanted to be documented. - -2008-05-27 Ross Burton - - * libgupnp/gupnp-service.c: - Fix doc typo. - -2008-05-27 Ross Burton - - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-root-device.c: - * libgupnp/gupnp-context.c: - * libgupnp/gupnp-service-info.c: - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service.c: - * libgupnp/http-headers.c: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-device-info.c: - * libgupnp/gupnp-resource-factory.c: - Documentation cleanups. - -2008-05-23 Ross Burton - - * tools/gupnp-binding-tool: - Add async wrappers too. - -2008-05-23 Jorn Baayen - - * libgupnp/gupnp-marshal.list: - * libgupnp/gupnp-service.c (gupnp_service_action_get_type), - (gupnp_service_class_init): - * libgupnp/gupnp-service.h: - - Use G_TYPE_VALUE and GUPNP_TYPE_SERVICE_ACTION in signal declarations - where appropriate. - -2008-05-22 Ross Burton - - * tools/gupnp-binding-tool: - * tools/Makefile.am: - * configure.ac: - * Makefile.am: - Initial commit of gupnp-binding-tool, to generate convenience C - wrappers for GUPnP service definitions. - -2008-05-22 Jorn Baayen - - * configure.ac: - - Version to 0.10.1.99. - -2008-05-22 Ross Burton - - * libgupnp/gupnp-device-info.[ch]: - * doc/gupnp-sections.txt: - Add gupnp_device_info_get_presentation_url(). - -2008-05-21 Ross Burton - - * libgupnp/gupnp-context.c: - When guessing the host's IP address, try and use the default - route's interface. - -2008-05-19 Jorn Baayen - - * NEWS: - * configure.ac: - * libgupnp/Makefile.am: - - Bump soname, and release 0.10.1. - -2008-05-16 Ross Burton - - * doc/Makefile.am: - * doc/device-description.rnc: - * doc/service-description.rnc: - * doc/gupnp-docs.sgml: - Add RELAX NG schemas for the device and service description files, - and add them to the reference manual. - -2008-05-16 Ross Burton - - * libgupnp/gupnp-types.c: - Last missing bit of documentation, now 100% API coverage. - -2008-05-15 Ross Burton - - * libgupnp/gupnp-context.c: - * libgupnp/gupnp-service-info.c: - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-types.c: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-device-info.c: - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-resource-factory.c: - * libgupnp/gupnp-error.h: - More documentation work, almost at 100% now. - -2008-05-13 Jorn Baayen - - * NEWS: - * configure.ac: - - GUPnP 0.10. - -2008-05-12 Ross Burton - - * libgupnp/gupnp-types.h: - Document the special types. - -2008-05-12 Ross Burton - - * libgupnp/gupnp-service-info.c: - Complete API documentation. - -2008-05-12 Ross Burton - - * doc/gupnp-docs.sgml: - * doc/Makefile.am: - * docs/client-tutorial.xml: - Add *very basic* first draft at a tutorial. - -2008-05-12 Ross Burton - - * libgupnp/gupnp-control-point.c: - Document the search target, and enforce target != NULL. - -2008-05-11 Zeeshan Ali Khattak - - * libgupnp/gupnp-service.c: - - Emit a warning on failure to retreive requested action argument. - -2008-05-11 Zeeshan Ali Khattak - - * libgupnp/gupnp-context.c: - - GContentType is not guaranteed to be a mime-type. - -2008-05-10 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c (server_handler): - - Do not error out if proxy->priv->sid is NIL as the subscription - response may not have been processed yet. - -2008-05-09 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c (emit_notifications), - (server_handler): - - Cosmetic: fit into 80 columns. - -2008-05-09 Ross Burton - - * libgupnp/gupnp-service-proxy.c: - Emit notifications in an idle handler, because some stacks block - when sending the NOTIFY message. - -2008-05-07 Ross Burton - - * libgupnp/gupnp-service.c: - Fix typo, remove unused variable. - -2008-05-07 Jorn Baayen - - * libgupnp/gupnp-service.c (subscription_data_free), - (gupnp_service_dispose), (notify_got_response), - (notify_subscriber): - - Store pending notifications on the SubscriptionData structure. - -2008-05-07 Ross Burton - - * libgupnp/gvalue-util.c: - Fix type marshalling for doubles. - -2008-05-07 Ross Burton - - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-control-point.h: - * libgupnp/gupnp-root-device.c: - * libgupnp/gupnp-context.c: - * libgupnp/gupnp-root-device.h: - * libgupnp/gupnp-context.h: - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service.c: - * libgupnp/gupnp-service-introspection.h: - * libgupnp/gupnp-device.h: - * libgupnp/gupnp-service.h: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-device-proxy.h: - * libgupnp/gupnp-service-proxy.h: - * libgupnp/gupnp-resource-factory.c: - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-resource-factory.h: - More documentation tweaks, up to 76% now. - - * doc/Makefile.am: - * doc/gupnp-sections.txt: - Remove unused sections and ignore private headers. - -2008-05-06 Ross Burton - - * libgupnp/gupnp-context.c: - Add the ability to set GUPNP_DEBUG to spew the HTTP messages to - the console. - -2008-05-06 Ross Burton - - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-service-proxy.h: - Fix small problems which upset gtk-doc. - -2008-05-06 Ross Burton - - * doc/gupnp-sections.txt: - Add missing symbols. - -2008-05-06 Ross Burton - - * doc/gupnp.types: - Add a .types file so the objects get introspected. - -2008-05-06 Ross Burton - - * configure.ac: - Add AC_SYS_LARGEFILE to use 64-bit offsets, thus both fixing - 32-bit compiles and making the world a better place. - -2008-05-06 Ross Burton - - * libgupnp/gupnp-context.c: - Fix some compile warnings. - -2008-04-29 Jorn Baayen - - * libgupnp/gupnp-context.c (hosting_server_handler): - * libgupnp/http-headers.c (range_get): - * libgupnp/http-headers.h: - - Support HTTP Range header. - -2008-04-29 Jorn Baayen - - * libgupnp/gupnp-context.c (hosting_server_handler): - - Use GMappedFile. - -2008-04-15 Jorn Baayen - - * configure.ac: - * libgupnp/Makefile.am: - * libgupnp/gupnp-context.c (hosting_server_handler): - - Use GContentType. - - * libgupnp/xdgmime: - - Removed. - -2008-04-15 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c (subscribe_got_response): - * libgupnp/gupnp-service.c (subscribe), (resubscribe): - - Use g_timeout_add_seconds(). We can because soup 2.4 depends - on glib 2.16. - -2008-04-15 Jorn Baayen - - * libgupnp/gupnp-context.c (hosting_server_handler), - (path_data_new), (path_data_free), (gupnp_context_host_path): - - Correct HTTP GET logic. - -2008-04-15 Jorn Baayen - - * libgupnp/gupnp-service.c (notify_subscriber): - - Set request, not response. - -2008-04-15 Jorn Baayen - Zeeshan Ali Khattak - - * configure.ac: - * gupnp-1.0-uninstalled.pc.in: - * gupnp-1.0.pc.in: - * libgupnp/gupnp-context.c (gupnp_context_init), - (default_server_handler), (gupnp_context_get_server), - (hosting_server_handler), (gupnp_context_host_path): - * libgupnp/gupnp-control-point.c (gupnp_control_point_dispose), - (process_service_list), (process_device_list), - (description_loaded), (got_description_url), (load_description): - * libgupnp/gupnp-device-info.c (gupnp_device_info_class_init), - (gupnp_device_info_get_icon_url): - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c (gupnp_device_proxy_get_device), - (gupnp_device_proxy_get_service): - * libgupnp/gupnp-device.c (gupnp_device_get_device), - (gupnp_device_get_service): - * libgupnp/gupnp-resource-factory-private.h: - * libgupnp/gupnp-resource-factory.c - (gupnp_resource_factory_create_device_proxy), - (gupnp_resource_factory_create_service_proxy), - (gupnp_resource_factory_create_device), - (gupnp_resource_factory_create_service): - * libgupnp/gupnp-root-device.c (gupnp_root_device_constructor): - * libgupnp/gupnp-service-info.c (gupnp_service_info_dispose), - (gupnp_service_info_class_init), - (gupnp_service_info_get_introspection), (got_scpd_url), - (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-proxy.c (gupnp_service_proxy_dispose), - (begin_action_msg), (action_got_response), (finish_action_msg), - (write_in_parameter), (gupnp_service_proxy_begin_action_valist), - (gupnp_service_proxy_begin_action_hash), (check_action_response), - (read_out_parameter), (gupnp_service_proxy_end_action_valist), - (gupnp_service_proxy_end_action_hash), - (gupnp_service_proxy_cancel_action), (server_handler), - (subscription_expire), (subscribe_got_response), (subscribe), - (unsubscribe): - * libgupnp/gupnp-service.c (control_server_handler), - (subscription_response), (subscription_server_handler), - (gupnp_service_constructor), (gupnp_service_dispose), - (notify_got_response), (notify_subscriber): - * libgupnp/http-headers.c (accept_language_get_locales), - (message_set_user_agent): - * libgupnp/xml-util.c (xml_util_get_child_element_content_uri), - (xml_util_get_child_element_content_url): - * libgupnp/xml-util.h: - - Port to libsoup 2.4. - -2008-03-19 Jorn Baayen - - * libgupnp/gupnp-context.c (gupnp_context_init): - - Use SOUP_SESSION_IDLE_TIMEOUT when available. - -2008-03-18 Jorn Baayen - - * configure.ac: - * libgupnp/gupnp-service.c (gupnp_service_signals_autoconnect): - - Release gupnp 0.8. - -2008-03-06 Jorn Baayen - - * libgupnp/gupnp-device-info.c (resource_type_match): - - Interpret strncmp() return value correctly. - -2008-03-05 Jorn Baayen - - * doc/gupnp-sections.txt: - * libgupnp/gupnp-context-private.h: - * libgupnp/gupnp-context.c (gupnp_context_get_property), - (gupnp_context_class_init), (gupnp_context_get_server), - (make_server_url), (gupnp_context_get_port), - (gupnp_context_host_path), (gupnp_context_unhost_path): - * libgupnp/gupnp-context.h: - * libgupnp/gupnp-service-proxy.c (subscribe_got_response), - (subscribe), (unsubscribe): - * libgupnp/gupnp-service.c (gupnp_service_constructor): - - Make gupnp_context_get_server() public. - Fixes #832. - -2008-03-05 Jorn Baayen - - * libgupnp/gupnp-device-info.c (resource_type_match), - (gupnp_device_info_get_device), (gupnp_device_info_get_service): - - Return subresources with version greater or equal than - requested version. - - * libgupnp/gupnp-root-device.c - (add_resource_with_earlier_versions), (fill_resource_group): - - Announce all earlier versions of resources in addition to the - implemented version. - -2008-03-04 Jorn Baayen - - * libgupnp/gupnp-device-info.c (gupnp_device_info_get_device), - (gupnp_device_info_get_service): - - Allow version-agnostic subresource retrieval. - -2008-02-29 Zeeshan Ali Khattak - - * libgupnp/gupnp-service-proxy.c: - - Critical bug fix: Don't free the action in check_action_response(). - -2008-02-26 Jorn Baayen - - * autogen.sh: - - Don't call glib-gettextize. - -2008-02-23 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_action_free), - (gupnp_service_proxy_send_action_valist), - (gupnp_service_proxy_send_action_hash), (begin_action_msg), - (action_got_response), (gupnp_service_proxy_begin_action_valist), - (gupnp_service_proxy_begin_action_hash), - (gupnp_service_proxy_end_action_valist), - (gupnp_service_proxy_end_action_hash), - (gupnp_service_proxy_cancel_action): - * libgupnp/gupnp-service-proxy.h: - - Remove error argument from begin_action() method series. The - error is now saved and returned by end_action(). - -2008-02-23 Jorn Baayen - - * libgupnp/http-headers.c: (message_set_user_agent): - - Add DLNA string. - -2008-02-09 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/accept-language.c: - * libgupnp/accept-language.h: - * libgupnp/gupnp-context.c: - * libgupnp/gupnp-control-point.c: (load_description): - * libgupnp/gupnp-service-info.c: - (gupnp_service_info_get_introspection), - (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-proxy.c: (begin_action_msg), - (gupnp_service_proxy_get_subscribed): - * libgupnp/gupnp-service.c: - * libgupnp/http-headers.c: - * libgupnp/http-headers.h: - - Include "User-Agent" header in requests. - -2008-01-31 Jorn Baayen - - * libgupnp/gupnp-context-private.h: - * libgupnp/gupnp-device-info-private.h: - * libgupnp/gupnp-resource-factory-private.h: - * libgupnp/gupnp-resource-factory.c: - (gupnp_resource_factory_unregister_resource_proxy_type): - * libgupnp/gupnp-service-introspection-private.h: - - Add missing G_GNUC_INTERNALs. - -2008-01-23 Jorn Baayen - - * libgupnp/gupnp-control-point.c: - (gupnp_control_point_set_property): - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property): - - Fix compiler warning. Patch by Zeeshan Ali Khattak. - -2008-01-17 Ross Burton - - * libgupnp/gvalue-util.c: - Fix build on 64-bit systems (#711, thanks Bastien Nocera). - -2008-01-17 Zeeshan Ali Khattak - - * libgupnp/accept-language.h: - * libgupnp/gvalue-util.h: - * libgupnp/xml-util.h: - - Use 'G_GNUC_INTERNAL' macro to declare functions we don't want to - export. - -2008-01-17 Jorn Baayen - - * libgupnp/gupnp-types.c: - * libgupnp/gupnp-types.h: - * libgupnp/gvalue-util.c: (gvalue_util_set_value_from_xml_node): - - Remove ugly and luckily unnecessary XML_NODE and XML_CHUNK types. - -2008-01-14 Jorn Baayen - - * Makefile.am: - * configure.ac: - - Remove unused translation framework. - -2008-01-14 Jorn Baayen - - * libgupnp/gupnp-types.c: - - Recursively copy xmlNodes. - -2008-01-14 Jorn Baayen - - * doc/Makefile.am: - - Update list of ignored header files. - -2008-01-07 Jorn Baayen - - * libgupnp/gvalue-util.c: (gvalue_util_set_value_from_string): - - Use atol() for 64-bit int parsing. - -2007-12-16 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (read_out_parameter), - (server_handler): - * libgupnp/gupnp-service.c: (gupnp_service_action_get_value): - * libgupnp/gvalue-util.c: (gvalue_util_set_value_from_string), - (gvalue_util_set_value_from_xml_node), - (gvalue_util_value_append_to_xml_string): - * libgupnp/gvalue-util.h: - * libgupnp/xml-util.c: (xml_util_get_element): - * libgupnp/xml-util.h: - - Allow use of GUPNP_TYPE_XML_CHUNK and GUPNP_TYPE_XML_NODE to be - mixed through text->xmlDoc->text conversion. (Which is obviously - slow, so use of XML_CHUNK on the sending side, and XML_NODE on - the receiving side is recommended.) - -2007-12-16 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (read_out_parameter): - * libgupnp/gupnp-types.c: (gupnp_xml_node_get_type), - (gupnp_string_type_to_string), (gupnp_string_to_string_type), - (register_string_type), (gupnp_xml_chunk_get_type), - (gupnp_bin_base64_get_type), (gupnp_bin_hex_get_type), - (gupnp_date_get_type), (gupnp_date_time_get_type): - * libgupnp/gupnp-types.h: - - Add an xmlNode data type (can now retrieve arguments as xmlNodes: - avoids excess parsing), and clean up types code. - -2007-12-16 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action), (begin_action_msg), - (action_got_response), (finish_action_msg), - (gupnp_service_proxy_begin_action_valist), - (gupnp_service_proxy_begin_action_hash), - (gupnp_service_proxy_end_action), (check_action_response): - * libgupnp/gupnp-service.c: (gupnp_service_action_set_value), - (gupnp_service_action_return_error), (control_server_handler), - (subscribe): - * libgupnp/gupnp-types.c: (gupnp_string_to_type): - * libgupnp/gupnp-types.h: - * libgupnp/gvalue-util.c: (gvalue_util_set_value_from_string), - (gvalue_util_value_append_to_xml_string): - * libgupnp/gvalue-util.h: - * libgupnp/xml-util.c: (xml_doc_wrapper_new), - (xml_util_get_attribute_contents): - * libgupnp/xml-util.h: - - Don't use libxml for message construction. This allows us to - embed chunks of xml into messages without them being escaped. - -2007-11-26 Jorn Baayen - - * libgupnp/gupnp-context.c: - - Rewrite local IP detection to be IPv6-friendly. - -2007-11-23 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (begin_action_msg): - * libgupnp/gupnp-service.c: (gupnp_service_action_set_value), - (gupnp_service_action_return_error), (control_server_handler), - (notify_subscriber), (create_property_set): - - Tweak XML generation to match spec to the letter. - -2007-11-22 Jorn Baayen - - * libgupnp/gupnp-service.c: (control_server_handler), - (create_property_set): - - Set embedded xml docs to not be standalone. - -2007-11-22 Jorn Baayen - - * configure.ac: - - Set XDG_PREFIX. Avoids symbol collisions with other xdgmimes. - Patch by Ross Burton . - -2007-11-22 Jorn Baayen - - * libgupnp/gupnp-service.c: (strip_camel_case): - - Don't split up 2 letter abbreviations when coverting from camel case. - -2007-11-21 Jorn Baayen - - * libgupnp/xml-util.c: (xml_util_node_get_content_value): - * libgupnp/xml-util.h: - - Remove unused function. - -2007-10-23 Jorn Baayen - - * libgupnp/gena-protocol.h: - * libgupnp/gupnp-context.c: (gupnp_context_class_init): - * libgupnp/gupnp-service.c: (subscription_timeout), - (parse_and_limit_timeout), (subscribe), (resubscribe): - - Add an upper bound of 7 days to subscription timeouts. - -2007-10-09 Zeeshan Ali - Jorn Baayen - - * libgupnp/gupnp-resource-factory.c: - * libgupnp/gupnp-resource-factory.h: - - - Instead of asking the users to subclass resource factory, provide an - API to register GTypes for UPnP types. - - Make the resource and resource proxy creation functions private. - - * libgupnp/gupnp-resource-factory-private.h: - - Make the resource and resource proxy creation functions private. - - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-root-device.c: - - - "resource-factory" prop can only be set at contruction time. - - Make _new() a wrapper around_new_full(). - - Provide getter for resource factory. - - Fix a copy&paste mistake. - - * libgupnp/gupnp-control-point.h: - * libgupnp/gupnp-root-device.h: - - Provide getter for resource factory. - - * libgupnp/gupnp-device.c: - * libgupnp/gupnp-device.h: - * libgupnp/gupnp-device-info.c: - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c: - - Move "resource-factory" prop to DeviceInfo class. - - * libgupnp/Makefile.am: - - Add gupnp-resource-factory-private.h to build. - - * doc/gupnp-sections.txt: - - - Add resource factory getter functions. - - Add type assignment (un)registeration functions. - - Remove the now private resource and resource proxy creation functions. - -2007-10-09 Jorn Baayen - - * libgupnp/gena-protocol.h: - * libgupnp/gupnp-service-proxy.c: (subscribe_got_response): - - Resubscribe 30 seconds before subscription times out. - -2007-10-03 Jorn Baayen - - * configure.ac: - - Version number to 0.6.99. - -2007-10-03 Zeeshan Ali - - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-root-device.c: - - Fix the type check for factory argument of _new_full() functions. - -2007-10-01 Zeeshan Ali - - * libgupnp/gupnp-resource-factory.c: - - Add doc comments. - - * doc/gupnp-docs.sgml: - * doc/gupnp-sections.txt: - - Add ResourceFactory API to the docs. - -2007-10-01 Zeeshan Ali - - * doc/gupnp-sections.txt: - - Add _control_point_new_full() and _root_device_new_full() to docs. - -2007-10-01 Zeeshan Ali - - * libgupnp/gupnp-resource-factory.c: - * libgupnp/gupnp-resource-factory.h: - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-root-device.c: - - Replace _resource_factory_new() with _resource_factory_get_default() - that only returns a pointer to a singleton object rather than creating - a new one. - -2007-10-01 Zeeshan Ali - - * libgupnp/gupnp-resource-factory.c: - * libgupnp/gupnp-resource-factory.h: - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-control-point.h: - * libgupnp/gupnp-device-proxy.c: - * libgupnp/gupnp-device-proxy.h: - * libgupnp/gupnp-device.c: - * libgupnp/gupnp-root-device.c: - * libgupnp/gupnp-root-device.h: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-service.c: - - New resource factory that handles the creation of device, - service and device and service proxy objects. - - * libgupnp/gupnp-service-private.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-device-proxy-private.h: - - Remove unneeded headers. - - * libgupnp/Makefile.am: - - - Add the new resource factory to build. - - Remove unneeded headers from build. - -2007-09-23 Jorn Baayen - - * NEWS: - * configure.ac: - - Release 0.6. - -2007-09-21 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (load_description): - * libgupnp/gupnp-service-info.c: (got_scpd_url), - (gupnp_service_info_get_introspection_async): - - Add pending GET requests to pending_gets before sending off the - message, and remove them again before emitting any callbacks on - response. - -2007-09-21 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_dispose), - (subscription_expire), (subscribe_got_response), (subscribe): - * libgupnp/gupnp-service.c: (gupnp_service_dispose), - (gupnp_service_notify_valist), (notify_got_response), - (notify_subscriber): - - Cancel all pending SoupMessages on dispose. - -2007-09-20 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (unsubscribe): - - subscription_timeout_id can be 0 (when we are resubscribing). - -2007-09-20 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-control-point.c: (gupnp_control_point_dispose), - (gupnp_control_point_finalize), (process_service_list), - (process_device_list), (description_loaded), (got_description_url), - (load_description), (gupnp_control_point_resource_unavailable): - * libgupnp/gupnp-device-info-private.h: - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property), - (gupnp_device_info_dispose), (gupnp_device_info_class_init), - (gupnp_device_info_get_service): - * libgupnp/gupnp-device-proxy-private.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_get_device), - (gupnp_device_proxy_get_service), (_gupnp_device_proxy_new): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_set_property), - (gupnp_service_info_dispose), (gupnp_service_info_class_init): - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: (_gupnp_service_proxy_new): - * libgupnp/xml-util.c: - * libgupnp/xml-util.h: - - Introduce a wrapper object for xmlDocs. Each proxy takes a reference - on the xmlDoc wrapper it uses. - -2007-09-18 Zeeshan Ali - - * libgupnp/gvalue-util.c: - - Accept 'yes' and 'no' as boolean values as well. - -2007-09-17 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - - Specify the reason why notify subscription failed in subscription-lost - signal. - -2007-09-17 Zeeshan Ali - - * libgupnp/gupnp-service.c: - - Specify the reason why notify failed in the error to the notify-failed - signal. - -2007-09-10 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (gupnp_control_point_dispose): - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_dispose), - (finish_action_msg), (server_handler), (subscribe), (unsubscribe), - (gupnp_service_proxy_set_subscribed): - - Always unsubscribe proxy on dispose, but do it asynchronously. - This means that the unsubscribe request may not always be sent on - exit. The UPnP spec, however, does not require this to happen. - - This should fix bug #500 as well. - -2007-09-09 Jorn Baayen - - * libgupnp/gupnp-service-info.h: - * tests/test-introspection.c: (print_state_variables): - - Mark GUPnPServiceIntrospectionCallback() 'error' argument as 'const'. - -2007-09-09 Zeeshan Ali - Jorn Baayen - - * tests/test-introspection.c: - - Correct the order of arguments in a function call, and free - GError in sync code only. - -2007-09-08 Zeeshan Ali - - * libgupnp/gupnp-device-info.c: - - gupnp_device_info_get_model_number() returns model number and not - model description. - -2007-09-08 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (got_description_url): - * libgupnp/gupnp-service-info.c: (got_scpd_url): - * libgupnp/gupnp-service-proxy.c: (action_got_response), - (finish_action_msg): - - Do not double-free message structures on cancel. - -2007-09-05 Zeeshan Ali - - * libgupnp/gupnp-device-info.c: - - BUGFIX: Don't use a NULL pointer. - -2007-09-03 Zeeshan Ali - - * libgupnp/accept-language.c: - * libgupnp/accept-language.h: - * libgupnp/gena-protocol.h: - * libgupnp/gupnp-context-private.h: - * libgupnp/gupnp-context.c: - * libgupnp/gupnp-context.h: - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-control-point.h: - * libgupnp/gupnp-device-info.c: - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy-private.h: - * libgupnp/gupnp-device-proxy.c: - * libgupnp/gupnp-device-proxy.h: - * libgupnp/gupnp-device.c: - * libgupnp/gupnp-device.h: - * libgupnp/gupnp-error-private.h: - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-error.h: - * libgupnp/gupnp-root-device.c: - * libgupnp/gupnp-root-device.h: - * libgupnp/gupnp-service-info.c: - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-introspection-private.h: - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service-introspection.h: - * libgupnp/gupnp-service-private.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-service-proxy.h: - * libgupnp/gupnp-service.h: - * libgupnp/gupnp-types-private.h: - * libgupnp/gupnp-types.c: - * libgupnp/gupnp-types.h: - * libgupnp/gupnp.h: - * libgupnp/gvalue-util.c: - * libgupnp/gvalue-util.h: - * libgupnp/xml-util.c: - * libgupnp/xml-util.h: - * tests/test-browsing.c: - * tests/test-introspection.c: - * tests/test-proxy.c: - - Remove trailing whitespace. - - * tests/test-server.c: - - - Remove trailing whitespace. - - Provide "UpdateID" in response of Browse action. - -2007-09-03 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: - - Use gvalue_util_set_value_from_string() for conversion from - G_TYPE_STRING. - -2007-08-30 Jorn Baayen - - * libgupnp/gupnp-device-info.c: - (gupnp_device_info_list_device_types), - (gupnp_device_info_get_device), - (gupnp_device_info_list_service_types): - - Clarify subresource retrieval in docs. - -2007-08-29 Jorn Baayen - - * configure.in: - - Bump version number to 0.4.99. - -2007-08-28 Zeeshan Ali - Jorn Baayen - - * libgupnp/gupnp-service.c: - * libgupnp/gupnp-service.h: - * doc/gupnp-sections.txt: - - - Add gupnp_service_signals_autoconnect () - - Remove whitespace - - * configure.ac: - * gupnp-1.0.pc.in: - * gupnp-1.0-uninstalled.pc.in: - - Require gmodule. - - * tests/Makefile.am: - * tests/test-server.c: - - Modify the test server to utilize - gupnp_service_signals_autoconnect(). - -2007-08-26 Jorn Baayen - - * gupnp-1.0-uninstalled.pc.in: - * gupnp-1.0.pc.in: - - Move libsoup back into Requires.. we do include it in public - headers after all. - -2007-08-23 Jorn Baayen - - * gupnp-1.0-uninstalled.pc.in: - * gupnp-1.0.pc.in: - - Move libsoup and uuid reqs to Requires.Private, and remove - the shared-mime-data req altogether. - -2007-08-21 Jorn Baayen - - * NEWS: - * configure.ac: - - Release gupnp 0.4. - -2007-08-14 Jorn Baayen - - * libgupnp/gupnp-device.c: (gupnp_device_class_init): - - Remove unused function. - -2007-08-13 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-service-proxy.c: (write_in_parameter), - (read_out_parameter): - * libgupnp/gupnp-service.c: (gupnp_service_action_set_value), - (create_property_set): - * libgupnp/gvalue-util.c: - * libgupnp/gvalue-util.h: - * libgupnp/xml-util.c: (xml_util_node_get_content_value): - - Add more elaborate GValue conversion functions and use them - instead of old conversion code. - -2007-08-09 Jorn Baayen - - * configure.ac: - - Bump version number to 0.3.99. - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_send_action_valist), - (gupnp_service_proxy_send_action_hash), - (gupnp_service_proxy_begin_action), (begin_action_msg), - (action_got_response), (finish_action_msg), (write_in_parameter), - (gupnp_service_proxy_begin_action_valist), - (gupnp_service_proxy_begin_action_hash), - (gupnp_service_proxy_end_action), (check_action_response), - (read_out_parameter), (gupnp_service_proxy_end_action_valist): - * libgupnp/gupnp-service-proxy.h: - - Added a new series of functions for sending actions taking hash - tables of parameter name-GValue pairs. - - * libgupnp/gupnp-service.c: (gupnp_service_action_get_valist), - (gupnp_service_action_set_valist), (gupnp_service_notify_valist): - - Don't fail completely on GValue collection errors. - - * doc/gupnp-sections.txt: - - Added the new _hash() functions. - -2007-08-08 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: (set_variable_type), - (state_variable_search_func), - (gupnp_service_introspection_get_state_variable), - (action_search_func), (gupnp_service_introspection_get_action): - * libgupnp/gupnp-service-introspection.h: - - - Add methods to reteive state variable and action by name. - - Default value of 'step' in state variable info should be '1' for - compatibility with GtkSpinButton API. - -2007-08-07 Zeeshan Ali - - * Makefile.am: - * configure.ac: - * gupnp-1.0-uninstalled.pc.in: - - Enable the users to build/link against uninstalled gupnp. - -2007-08-03 Jorn Baayen - - * libgupnp/gupnp-service.c: (gupnp_service_constructor): - - Only include evented state variables in the initial event message. - -2007-08-02 Jorn Baayen - - * NEWS: - * configure.ac: - - Release 0.3. - -2007-08-01 Jorn Baayen - - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_get_device): - * libgupnp/gupnp-device.c: (gupnp_device_get_device): - - Allow embedded devices to have their own UDNs. - -2007-07-27 Priit Laes - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist): - - Use G_VA_COPY to get things build on some weird architectures. - -2007-07-26 Jorn Baayen - - * configure.ac: - - Bump version number to 0.2. - -2007-07-26 Zeeshan Ali - - * libgupnp/gupnp-service.c: (new_action_response_node): - - A small fix to the last change from jorn to fix the build. - -2007-07-26 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (process_service_list), - (process_device_list), (gupnp_control_point_resource_unavailable): - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property), - (gupnp_device_info_get_property), (gupnp_device_info_finalize), - (gupnp_device_info_class_init), (gupnp_device_info_get_url_base), - (gupnp_device_info_get_udn), (gupnp_device_info_get_device_type), - (gupnp_device_info_get_friendly_name), - (gupnp_device_info_get_manufacturer), - (gupnp_device_info_get_manufacturer_url), - (gupnp_device_info_get_model_description), - (gupnp_device_info_get_model_name), - (gupnp_device_info_get_model_number), - (gupnp_device_info_get_model_url), - (gupnp_device_info_get_serial_number): - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_get_service): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_set_property), - (gupnp_service_info_get_property), (gupnp_service_info_dispose), - (gupnp_service_info_finalize), (gupnp_service_info_class_init), - (gupnp_service_info_get_url_base), (gupnp_service_info_get_udn), - (gupnp_service_info_get_service_type), (gupnp_service_info_get_id), - (gupnp_service_info_get_scpd_url), - (gupnp_service_info_get_control_url): - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist), - (gupnp_service_proxy_get_subscribed), (_gupnp_service_proxy_new): - * libgupnp/gupnp-service.c: (new_action_response_node): - * tests/test-browsing.c: (device_proxy_available_cb): - * tests/test-introspection.c: (service_proxy_unavailable_cb): - - Handle the case where no serviceType (or deviceType) is specified - in the description document: - - ControlPoint saves the discovered types into the proxies, so that - unavailability can be detected even if the description document - is bogus. - - Service and ServiceProxy warn if serviceType is not specified. - - This has the side effect that the return value of - _get_{device,service}_type() now returns a const. - - Also added additional checks. - -2007-07-26 Zeeshan Ali - - * libgupnp/gupnp-device-info.c: - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy-private.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_get_device), - (gupnp_device_proxy_get_service), (_gupnp_device_proxy_new): - * libgupnp/gupnp-device.c: (gupnp_device_get_device), - (gupnp_device_get_service), (_gupnp_device_new): - * libgupnp/gupnp-service-info.c: - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-private.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: (_gupnp_service_proxy_new): - * libgupnp/gupnp-service.c: (_gupnp_service_new): - - Make it clear to the user that return value of - gupnp_{device,service}_info_get_url_base() must not be freed o - modified. - -2007-07-26 Jorn Baayen - - * libgupnp/gupnp-service-proxy.h: - * libgupnp/gupnp-service.h: - - Cosmetic changes. - -2007-07-26 Jorn Baayen - - * doc/gupnp-sections.txt: - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-proxy.h: - - Document callback prototypes. - - * libgupnp/gupnp-service-info.c: (got_scpd_url), - (gupnp_service_info_get_introspection_async): - * tests/test-introspection.c: (print_state_variables): - - Switch the order of the 'error' and 'user-data' arguments in the - async introspection retrieval callback, so that 'user-data' is now - last for consistency. - -2007-07-26 Jorn Baayen - - * gupnp-1.0.pc.in: - - List all dependencies. - -2007-07-26 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_action_arg_info_free), - (gupnp_service_action_info_free), - (gupnp_service_introspection_finalize), (get_actions), - (get_state_variables), (construct_introspection_info), - (collect_action_names), (collect_variable_names), - (gupnp_service_introspection_new), - (gupnp_service_introspection_list_action_names), - (gupnp_service_introspection_list_actions), - (gupnp_service_introspection_list_state_variables), - (gupnp_service_introspection_list_state_variable_names): - - Get rid of the hashtables since the function that needed them have - been removed. - -2007-07-25 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.h: - - Fix struct docs for gtk-doc. - -2007-07-25 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service-introspection.h: - - Add docs for structs and only mention once the extremely dependency on - the availability of SCPD. :) - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-service-introspection.c: - - Added a comment warning people against using introspection in - regular apps. - -2007-07-25 Jorn Baayen - - A doc/gupnp-sections.txt: - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-service-introspection.h: - * libgupnp/gupnp-service.h: - * libgupnp/gupnp-types.c: - - Doc polish. - -2007-07-25 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service-introspection.h: - - Remove unneeded functions. - -2007-07-25 Jorn Baayen - - * README: - - Added text from website. - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-device.c: (gupnp_device_get_device), - (gupnp_device_get_service), (gupnp_device_get_property), - (gupnp_device_dispose), (gupnp_device_init), - (gupnp_device_class_init), (_gupnp_device_find_element_for_udn): - * libgupnp/gupnp-root-device.c: (gupnp_root_device_new): - * libgupnp/gupnp-service-private.h: - * libgupnp/gupnp-service.c: (gupnp_service_action_return_error), - (gupnp_service_constructor), (gupnp_service_set_property), - (gupnp_service_get_property), (gupnp_service_dispose), - (gupnp_service_finalize), (gupnp_service_class_init), - (notify_got_response), (notify_subscriber), (create_property_set), - (flush_notifications), (gupnp_service_notify_value), - (gupnp_service_freeze_notify), (gupnp_service_thaw_notify), - (_gupnp_service_new): - - Devices and Services reference their RootDevice. - On RootDevice unavailability Service purges its subscriptions. - - * tests/test-server.c: (main): - - Unref content_dir. - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (gupnp_control_point_dispose): - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_dispose), - (subscribe_got_response), (gupnp_service_proxy_set_subscribed): - - Unsubscribe proxies automatically only at control point dispose. - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (load_description), - (gupnp_control_point_resource_unavailable): - - Destroy proxy before destroying the associated xmlDoc. - - * libgupnp/gupnp-error.h: - * libgupnp/gupnp-service-info.c: - (gupnp_service_info_get_introspection), - (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist), (subscription_expire), - (subscribe), (unsubscribe): - * libgupnp/gupnp-service.c: (notify_subscriber): - - Better invalid URL error handling. - - * tests/Makefile.am: - R tests/test-client.c: - A tests/test-browsing.c: (device_proxy_unavailable_cb): - A tests/test-proxy.c: - - Split out test-client into test-browsing and test-proxy better - illustrating how to use the API. - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-service.c: (gupnp_service_init), - (gupnp_service_finalize), (notify_got_response): - - Create & destroy notify queue. - - * libgupnp/gupnp-service.h: - - Added 'const' to constant signal arguments. - - * tests/test-client.c: (device_proxy_unavailable_cb), - (service_proxy_available_cb): - - Connect to 'subscription-lost' signal. - - * tests/test-server.c: (browse_cb), (query_cb), (main): - - Connect to 'notify-failed' signal. - Print action locales. - Test gupnp_service_notify(). - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (subscribe_got_response): - - Remove server handler on all subscription errors. - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-marshal.list: - * libgupnp/gupnp-service.c: (gupnp_service_class_init): - - Don't box the to-be-filled GValue. - - * tests/test-client.c: (notify_cb), (service_proxy_available_cb): - * tests/test-server.c: (browse_cb), (main): - - Test event notification. - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (server_handler): - - Remove debug spew. - -2007-07-25 Jorn Baayen - - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-types.c: - - Doc polish. - -2007-07-24 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_state_variable_info_free), - (gupnp_service_action_info_free), - (gupnp_service_introspection_finalize), (set_string_value_limits), - (get_action_arguments), (action_argument_list_free), (get_actions), - (collect_hash_keys), (collect_action_arguments), (collect_actions), - (collect_state_variables): - * libgupnp/gupnp-service-introspection.h: - * libgupnp/gupnp-service.c: (gupnp_service_constructor): - * tests/test-introspection.c: (print_action_arguments), - (print_actions), (print_state_variables): - - Use GList instead of GSList for compatibility with the rest of the - library. - -2007-07-24 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (server_handler): - - Don't allow g_main_context_iteration() to block. - -2007-07-24 Jorn Baayen - - * configure.ac: - - Depend on gssdp 0.3. - - * libgupnp/gupnp-control-point.c: - (gupnp_control_point_resource_unavailable): - - Don't depend on deleted list items in loop. - -2007-07-24 Jorn Baayen - - * NEWS: - - Added news items for 0.2. - -2007-07-23 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (load_description): - * libgupnp/gupnp-service-info.c: - (gupnp_service_info_get_introspection), - (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-proxy.c: (subscription_expire), - (subscribe), (unsubscribe): - * libgupnp/gupnp-service.c: (notify_subscriber): - - Warn on invalid URL (don't crash!). - -2007-07-23 Jorn Baayen - - * libgupnp/gupnp-marshal.list: - * libgupnp/gupnp-service-proxy.c: (server_handler), - (subscription_expire), (subscribe_got_response), (subscribe): - * libgupnp/gupnp-service.c: (parse_timeout), (subscribe), - (subscription_server_handler), (gupnp_service_constructor), - (gupnp_service_finalize), (gupnp_service_class_init), - (gupnp_service_notify), (gupnp_service_notify_valist), - (notify_got_response), (notify_subscriber), (create_property_set), - (flush_notifications), (gupnp_service_notify_value): - * libgupnp/gupnp-service.h: - - Handle multiple callbacks URLs. - Send initial event message. - -2007-07-23 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: - (construct_introspection_info), (collect_hash_keys), - (gupnp_service_introspection_list_action_names), - (gupnp_service_introspection_list_state_variable_names): - * libgupnp/gupnp-service-introspection.h: - - - Add _list_state_variable_names() method. - - a minor optimization. - - * tests/test-introspection.c: (service_proxy_available_cb): - - centralize the error handling. - -2007-07-23 Jorn Baayen - - * libgupnp/gupnp-service-info.c: - (gupnp_service_info_get_introspection), (got_scpd_url): - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_introspection_set_property), - (gupnp_service_introspection_finalize): - - Don't keep xmlDoc around longer than necessary. - -2007-07-23 Zeeshan Ali - Jorn Baayen - - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-error-private.h: - * libgupnp/gupnp-service-proxy.c: - - Add & use server error utility functions. - - * libgupnp/gupnp-service-info.c: - (gupnp_service_info_get_introspection), (scpd_loaded), - (got_scpd_url), (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-info.h: - - Report non-programmer errors using GError. - - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_introspection_set_property), - (construct_introspection_info), (gupnp_service_introspection_new), - (gupnp_service_introspection_get_state_variable): - - Fix some typos and conditions. - - * tests/test-introspection.c: (got_introspection), - (service_proxy_available_cb): - - Update the test app to use the new GError-using API. - -2007-07-11 Jorn Baayen - - * libgupnp/gupnp-error.h: - * libgupnp/gupnp-service-proxy.c: (set_error_literal), - (gupnp_service_proxy_end_action_valist): - - Propagate UPnPError codes. - -2007-07-11 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist): - - Set error if no controlURL is defined. - -2007-07-08 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (got_description_url), - (load_description): - - Fix description doc refcounting bugs. - -2007-07-08 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (description_loaded): - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_set_property): - - Each info object stores its own copy of the URLBase SoupUri. - -2007-07-08 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (process_service_list), - (process_device_list), (load_description), - (gupnp_control_point_resource_unavailable): - * libgupnp/gupnp-service-proxy-private.h: - - Correct constructor argument order. - Plug leak. - Update ref count on cached description doc correctly. - -2007-07-08 Zeeshan Ali - Jorn Baayen - - * libgupnp/gupnp-service-info.c: (get_scpd_url_data_free), - (gupnp_service_info_class_init), - (gupnp_service_info_get_introspection), (scpd_ready), - (got_scpd_url), (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-info.h: - - Use a callback instead of a signal. - - * tests/test-introspection.c: (interrupt_signal_handler), - (got_introspection), (service_proxy_available_cb), (main): - - - Use the new callback API. - - Terminate cleanly on SIGTERM. - - * tests/test-client.c: (interrupt_signal_handler), (main): - * tests/test-server.c: (interrupt_signal_handler), (main): - - Terminate cleanly on SIGTERM. - -2007-07-07 Jorn Baayen - - * doc/gupnp-docs.sgml: - * libgupnp/gupnp-types.h: - - Include gupnp-types in doc TOC. - -2007-07-07 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (gupnp_control_point_dispose): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_dispose): - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_cancel_action): - - Set message status to SOUP_STATUS_CANCELLED before cancelling. - - * libgupnp/gupnp-service-proxy.c: - - Elaborate begin_action() comments. - -2007-07-07 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-types-private.h: - * libgupnp/gupnp-types.c: (gupnp_type_to_string): - * libgupnp/gupnp-types.h: - - Make private gupnp_data_type_to_gtype(). - Add gupnp_value_get_string() macro. - - * libgupnp/xml-util.c: (xml_util_node_get_content_value): - - Smarter value transformation like in ServiceProxy. - -2007-07-07 Jorn Baayen - - * libgupnp/gupnp-control-point.c: - (gupnp_control_point_resource_unavailable): - - Handle resource-unavailable in the same way. - -2007-07-07 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (gupnp_control_point_finalize), - (process_service_list), (process_device_list), - (description_loaded), (got_description_url): - * libgupnp/gupnp-device-proxy-private.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_get_device), - (gupnp_device_proxy_get_service): - * libgupnp/gupnp-device.c: (gupnp_device_get_device), - (gupnp_device_get_service), (_gupnp_device_find_element_for_udn): - * libgupnp/gupnp-service-private.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_get_subscribed): - * libgupnp/gupnp-service.c: (gupnp_service_thaw_notify): - - Create proxies for all, not just one, matching devices and services. - -2007-07-07 Jorn Baayen - - * libgupnp/gupnp-service-info.c: (gupnp_service_info_get_property), - (gupnp_service_info_dispose): - - Rearrange some code. - -2007-07-07 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-service-info.c: - * libgupnp/gupnp-service-introspection-private.h: - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service-introspection.h: - * libgupnp/gupnp.h: - - Make introspection constructor private. - -2007-07-07 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-types.c: - - Handle conversion of strings to GUPnP string-based types. - -2007-07-06 Zeeshan Ali - Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-types.h: - * libgupnp/gupnp-types.c: (gupnp_type_to_string), - (gupnp_bin_base64_get_type), (gupnp_bin_hex_get_type), - (gupnp_date_get_type), (gupnp_date_time_get_type), - (gupnp_date_time_tz_get_type), (gupnp_time_get_type), - (gupnp_time_tz_get_type), (gupnp_uri_get_type), - (gupnp_uuid_get_type), (gupnp_data_type_to_gtype): - - Introduce new types for some UPnP data types that do not have a direct - equivalent in glib. - - * libgupnp/xml-util.c: (xml_util_get_attribute_contents): - * libgupnp/xml-util.h: - - Add helper function for getting the contents of an attribute. - - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_state_variable_info_free), - (gupnp_service_introspection_set_property), - (gupnp_service_introspection_finalize), - (gupnp_service_introspection_class_init), (set_variable_type), - (get_state_variable), (get_action_argument), - (contstruct_introspection_info), (gupnp_service_introspection_new): - * libgupnp/gupnp-service-introspection.h: - - - Use the new GUPnP types instead of string type for some UPnP types. - - Take a pointer to SCPD xml instead of it's url in the constructor and - leave the download of the document to the caller. - - Expect documents to specify 'sendEvents' as an attribute of the - state variable node. - - * libgupnp/gupnp-service-info.c: (gupnp_service_info_init), - (get_scpd_url_data_free), (gupnp_service_info_dispose), - (gupnp_service_info_class_init), (get_scpd), - (gupnp_service_info_get_introspection), (scpd_ready), - (got_scpd_url), (gupnp_service_info_get_introspection_async): - * libgupnp/gupnp-service-info.h: - - - Handle the SCPD GET for and provide introspection's constructor a - pointer to the xml document rather than the SCPD URL. - - Provide an asynchronous way of geting the introspection object. - - * tests/test-introspection.c: (print_state_variables), - (got_introspection), (service_proxy_available_cb), (main): - - Provide a way to specify that the introspection object be - created/requested asynchronously through a command-line argument. - -2007-07-04 Zeeshan Ali - - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_state_variable_info_free), - (gupnp_service_action_info_free), - (gupnp_service_introspection_finalize), (set_variable_limits), - (set_variable_type), (get_action_argument), - (gupnp_service_action_arg_info_free), (collect_action_names), - (collect_action_arguments), (collect_actions), - (collect_state_variables), - (gupnp_service_introspection_list_action_names), - (gupnp_service_introspection_list_action_arguments), - (gupnp_service_introspection_list_actions), - (gupnp_service_introspection_list_state_variables), - (gupnp_service_introspection_get_state_variable): - * libgupnp/gupnp-service-introspection.h: - * tests/test-introspection.c: (print_action_arguments), - (print_actions), (print_state_variables): - - - Return local copies of data to avoid malloc()s and free()s. - - Cache the returned GSLists to avoid allocating the list each time. - - return a 'const' from each function and update doc comments to - make it very clear to the user that the return data can't be - modified or freed. - - Rename 'gtype' field to 'type' for consistancy. - - Introduce an enum type for the direction of the action argument - and use that instead of a string. - - Add a function for getting state variable information by name. - -2007-07-01 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - - Remove unused includes. - -2007-07-01 Jorn Baayen - - * libgupnp/gupnp-device-info.c: - (gupnp_device_info_list_device_types), - (gupnp_device_info_list_service_types): - - Use xml_util_get_child_element_content_glib(). - -2007-07-01 Jorn Baayen - - * doc/gupnp-docs.sgml: - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-device-info.c: (gupnp_device_info_class_init): - * libgupnp/gupnp-device-proxy.c: - * libgupnp/gupnp-device.c: - * libgupnp/gupnp-service-info.c: (gupnp_service_info_class_init): - * libgupnp/gupnp-service-introspection.c: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-service.c: - - Documentation updates. - -2007-07-01 Jorn Baayen - - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_introspection_finalize), - (contstruct_introspection_info): - - Added small optimization + missing NULL checks. - -2007-07-01 Jorn Baayen - - * libgupnp/gupnp-device-info.c: - * libgupnp/gupnp-device-proxy.c: - (_gupnp_device_proxy_new_from_doc): - * libgupnp/gupnp-root-device.c: (gupnp_root_device_constructor): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_finalize), - (gupnp_service_info_get_udn): - * libgupnp/gupnp-service-introspection.c: (set_variable_type), - (get_state_variable), (get_action_argument), (get_actions), - (get_state_variables): - * libgupnp/gupnp-service-proxy.c: - (_gupnp_service_proxy_new_from_doc): - * libgupnp/xml-util.c: (xml_util_get_element): - * libgupnp/xml-util.h: - - Add more shared XML helpers. - -2007-07-01 Jorn Baayen - - * libgupnp/gupnp-device-info.c: (get_property), - (gupnp_device_info_get_friendly_name), - (gupnp_device_info_get_manufacturer), - (gupnp_device_info_get_model_name), - (gupnp_device_info_get_model_number): - - Use get_url_property() for all URL properties. - -2007-07-01 Jorn Baayen - - * libgupnp/gupnp-service.c: (gupnp_service_class_init): - - Use G_TYPE_VALUE for "value" argument on "query-variable" signal. - -2007-07-01 Jorn Baayen - - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property), - (gupnp_device_info_get_property), (gupnp_device_info_finalize), - (gupnp_device_info_class_init), (icon_parse): - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_get_device), - (gupnp_device_proxy_get_service), - (_gupnp_device_proxy_new_from_doc), - (_gupnp_device_proxy_new_from_element): - * libgupnp/gupnp-device.c: (gupnp_device_get_device), - (gupnp_device_get_service), (_gupnp_device_new_from_element): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_set_property), - (gupnp_service_info_get_property), (gupnp_service_info_finalize), - (gupnp_service_info_class_init), (get_url_property): - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-private.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: - (_gupnp_service_proxy_new_from_doc), - (_gupnp_service_proxy_new_from_element): - * libgupnp/gupnp-service.c: (_gupnp_service_new_from_element): - - Store URL base as SoupUri, and use description file location - as URL base if no base is specified explicitly. - - * libgupnp/gupnp-root-device.c: (gupnp_root_device_finalize), - (gupnp_root_device_set_property), (gupnp_root_device_get_property), - (gupnp_root_device_constructor): - * libgupnp/gupnp-root-device.h: - - Remove API for setting URL base as the explicit specification of - a URL base is discouraged. - - Don't autohost description file. - - * tests/test-server.c: (main): - - Updated for changed API. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action): - - Use M-POST when POST fails. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-error.h: - * libgupnp/gupnp-service.c: (gupnp_service_action_return_error): - - Fill in description automatically for known error codes. - - * libgupnp/gupnp-service-proxy.c: (convert_error_code): - - Handle unknown error codes. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-error.h: - * libgupnp/gupnp-service-proxy.c: (set_error_literal), - (convert_error_code), (gupnp_service_proxy_end_action_valist), - (subscription_expire), (subscribe_got_response): - * libgupnp/gupnp-service.c: (notify_got_response): - - More detailed erroring. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-error.h: - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist), (set_error_literal), - (gupnp_service_proxy_end_action_valist), (subscribe_got_response): - * libgupnp/gupnp-service.c: (notify_got_response): - - Don't report GValue errors through GError, and define error codes. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_end_action), - (gupnp_service_proxy_end_action_valist): - - Added set_error_literal() helper function. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_end_action_valist): - - Handle SOAP Faults. - - * libgupnp/gupnp-service.c: (gupnp_service_action_set_value), - (gupnp_service_action_return_error): - - Return SOAP Fault in correct format. - - * tests/test-client.c: (service_proxy_available_cb): - - Return on error. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (subscribe_got_response): - - Remove obsolete comment and correct warning message. - - * libgupnp/gupnp-service.c: (subscription_response), - (subscription_timeout), (parse_timeout), (subscribe), - (resubscribe): - - Return correct timeout to subscriber. - -2007-06-30 Jorn Baayen - - * libgupnp/gupnp-control-point.c: - (gupnp_control_point_resource_unavailable): - - Remove unavailable device from correct list! - -2007-06-29 Jorn Baayen - - * AUTHORS: Added Zeeshan. - -2007-06-29 Zeeshan Ali - - reviewed by: Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp.h: - * libgupnp/gupnp-service-introspection.c: - (gupnp_service_introspection_init), - (gupnp_service_introspection_set_property), - (gupnp_service_introspection_get_property), - (gupnp_service_introspection_dispose), - (gupnp_service_introspection_finalize), - (gupnp_service_introspection_class_init), (get_scpd), - (set_default_value), (set_string_value_limits), - (set_value_limit_by_name), (set_variable_limits), - (set_variable_type), (get_state_variable), (get_action_argument), - (get_action_arguments), (action_argument_list_free), (get_actions), - (get_state_variables), (contstruct_introspection_info), - (collect_action_names), (collect_action_arguments), - (collect_actions), (collect_allowed_values), (copy_state_variable), - (collect_state_variables), (gupnp_service_introspection_new), - (gupnp_service_introspection_list_action_names), - (gupnp_service_introspection_list_action_arguments), - (gupnp_service_introspection_list_actions), - (gupnp_service_action_arg_info_free), - (gupnp_service_action_info_free), - (gupnp_service_introspection_list_state_variables), - (gupnp_service_state_variable_info_free): - * libgupnp/gupnp-service-introspection.h: - - Add service introspection support. - - * libgupnp/gupnp-service-info.c: - (gupnp_service_proxy_request_introspection): - * libgupnp/gupnp-service-info.h: - - - Add service introspection support. - - * tests/Makefile.am: - * tests/test-introspection.c: (print_action_arguments), - (print_actions), (print_state_variables), - (service_proxy_available_cb), (service_proxy_unavailable_cb), - (main): - - Add a test application for the introspection API. - -2007-06-27 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_send_action_valist): - - Only run the main loop if it hasn't been quit before yet. Fixes - a hang. - -2007-06-27 Jorn Baayen - - * libgupnp/gupnp-service.c: (subscription_data_free), (subscribe), - (gupnp_service_constructor), (gupnp_service_finalize), - (gupnp_service_class_init), (gupnp_service_notify_valist), - (notify_got_response), (notify_subscriber), (flush_notifications), - (gupnp_service_notify_value), (gupnp_service_freeze_notify), - (gupnp_service_thaw_notify): - * libgupnp/gupnp-service.h: - - Implement notification. - -2007-06-27 Jorn Baayen - - * configure.ac: - - Depend on uuid. - - * libgupnp/gena-protocol.h: - - Added minimum timeout value. - - * libgupnp/gupnp-context.c: (gupnp_context_class_init): - - Use minimum timeout value. - - * libgupnp/gupnp-service.c: (gupnp_service_action_return_error), - (gupnp_service_init), (query_state_variable), - (control_server_handler), (subscription_response), (generate_sid), - (subscription_timeout), (parse_timeout), (subscribe), - (resubscribe), (unsubscribe), (subscription_server_handler), - (gupnp_service_constructor), (gupnp_service_finalize), - (gupnp_service_class_init), (gupnp_service_notify), - (gupnp_service_notify_valist), (gupnp_service_notify_value), - (gupnp_service_freeze_notify), (gupnp_service_thaw_notify), - (_gupnp_service_new_from_element): - - Implement subscription. - -2007-06-27 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-error.h: - * libgupnp/gupnp-service.c: (gupnp_service_action_return_error), - (query_state_variable), (control_server_handler): - * libgupnp/gupnp-service.h: - * libgupnp/upnp-protocol.h: - - More flexible error handling. - -2007-06-27 Jorn Baayen - - * libgupnp/gupnp-service.c: (gupnp_service_action_get_value), - (gupnp_service_action_set_valist), - (gupnp_service_action_set_value), (gupnp_service_action_return), - (gupnp_service_action_return_error), (gupnp_service_init), - (new_action_response_node), (query_state_variable), - (control_server_handler), (gupnp_service_notify_valist), - (gupnp_service_notify_value), (gupnp_service_freeze_notify), - (gupnp_service_thaw_notify), (_gupnp_service_new_from_element): - * libgupnp/gupnp-service.h: - - Fully implement actioning. - - * libgupnp/Makefile.am: - * libgupnp/gupnp-error.h: - * libgupnp/upnp-protocol.h: - - Added error codes and descriptions. - - * libgupnp/xml-util.c: (xml_util_node_get_content_int): - * libgupnp/xml-util.h: - - Added xml_util_node_get_content_value() for retrieving xmlNode - contents as GValues. - - * libgupnp/gupnp-service-proxy.c: (server_handler): - - Use xml_util_node_get_content_value(). - - * tests/test-server.c: (browse_cb): - - Test actioning. - -2007-06-26 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_end_action_valist): - - Small cleanup. - - * libgupnp/gupnp-service.c: (gupnp_service_action_get_locales), - (gupnp_service_action_get), (gupnp_service_action_get_valist), - (gupnp_service_action_get_value), (gupnp_service_action_set), - (gupnp_service_action_set_valist), - (gupnp_service_action_set_value), (gupnp_service_action_return), - (gupnp_service_action_return_error), (gupnp_service_class_init), - (gupnp_service_notify), (gupnp_service_notify_valist), - (gupnp_service_notify_value), (gupnp_service_freeze_notify), - (gupnp_service_thaw_notify): - - Boilerplate code. - -2007-06-26 Jorn Baayen - - * libgupnp/gupnp-service.c: (query_state_variable), - (control_server_handler): - - Implement QueryStateVariable. - -2007-06-26 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist): - * libgupnp/gupnp-service.c: (gupnp_service_action_get_name), - (gupnp_service_action_get_locales), - (gupnp_service_action_set_value), (gupnp_service_action_return), - (gupnp_service_action_return_error), (gupnp_service_init), - (query_state_variable), (control_server_handler), - (subscription_server_handler), (gupnp_service_constructor), - (gupnp_service_dispose), (gupnp_service_finalize), - (gupnp_service_class_init), (gupnp_service_notify), - (gupnp_service_notify_valist), (gupnp_service_notify_value), - (gupnp_service_freeze_notify), (gupnp_service_thaw_notify), - (_gupnp_service_new_from_element): - * libgupnp/gupnp-service.h: - - Basic server-side actioning. No argument handling yet. - - * tests/test-server.c: (browse_cb), (main): - - Test actioning. - -2007-06-26 Jorn Baayen - - * libgupnp/accept-language.c: (accept_language_get_header): - * libgupnp/accept-language.h: - - Cleanup, additional functions to convert between locale and HTTP - language tag representations. - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist): - - Updated for accept-language function rename. - - * configure.ac: - - Depend on shared-mime-data. - - * libgupnp/Makefile.am: - * libgupnp/xdgmime/Makefile.am: - * libgupnp/xdgmime/xdgmime.c: - * libgupnp/xdgmime/xdgmime.h: - * libgupnp/xdgmime/xdgmimealias.c: - * libgupnp/xdgmime/xdgmimealias.h: - * libgupnp/xdgmime/xdgmimecache.c: - * libgupnp/xdgmime/xdgmimecache.h: - * libgupnp/xdgmime/xdgmimeglob.c: - * libgupnp/xdgmime/xdgmimeglob.h: - * libgupnp/xdgmime/xdgmimeint.c: - * libgupnp/xdgmime/xdgmimeint.h: - * libgupnp/xdgmime/xdgmimemagic.c: - * libgupnp/xdgmime/xdgmimemagic.h: - * libgupnp/xdgmime/xdgmimeparent.c: - * libgupnp/xdgmime/xdgmimeparent.h: - * libgupnp/gupnp-context.c: (hosting_server_handler): - - Use xdgmime to set correct Content-Type HTTP headers. - - * tests/test-server.c: (main): - - Print port number on startup. - -2007-06-22 Jorn Baayen - - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property), - (gupnp_device_info_get_udn): - - Re-use get_property() in one more spot. - - * libgupnp/gupnp-service.h: - - Added G_GNUC_NULL_TERMINATED. - - * libgupnp/gupnp-root-device.c: (server_handler), - (fill_resource_group), (gupnp_root_device_constructor): - * libgupnp/xml-util.c: (xml_util_node_get_content_int): - * libgupnp/xml-util.h: - - Move some XML utils to xml-util.c - -2007-06-22 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/accept-language.c: - * libgupnp/accept-language.h: - * libgupnp/gupnp-context.c: - (gupnp_context_get_subscription_timeout), (hosting_server_handler), - (unregister_hosting_server_handler): - - Proper Accept-Language support. - - * libgupnp/gupnp-device.c: (gupnp_device_get_service): - * libgupnp/gupnp-service-private.h: - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action), - (gupnp_service_proxy_begin_action_valist): - * libgupnp/gupnp-service.c: (gupnp_service_action_get_name), - (gupnp_service_thaw_notify): - * libgupnp/gupnp-service.h: - - Handle service object creation. - -2007-06-19 Jorn Baayen - - * doc/Makefile.am: - * doc/api-design.txt: - - Remove obsolete API design document. - - * libgupnp/gupnp-device.c: - - Small doc correction. - - * libgupnp/Makefile.am: - * libgupnp/gupnp-service.c: - * libgupnp/gupnp-service.h: - - Added Service skels. - - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_class_init): - - Delete obsolete code. - -2007-06-19 Jorn Baayen - - * libgupnp/gupnp-context.c: (_gupnp_context_get_session), - (gupnp_context_get_subscription_timeout): - * libgupnp/gupnp-context.h: - * tests/test-server.c: (main): - - Add regular web server functionality. - -2007-06-19 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (description_loaded): - * libgupnp/gupnp-device-proxy-private.h: - * libgupnp/gupnp-device-proxy.c: - (_gupnp_device_proxy_find_element_for_udn): - * libgupnp/gupnp-device-proxy.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: (find_service_element_for_type): - * libgupnp/gupnp-service-proxy.h: - - Make ServiceProxy and DeviceProxy constructors private. - -2007-06-19 Jorn Baayen - - * libgupnp/gupnp-context.c: (gupnp_context_dispose): - * libgupnp/gupnp-control-point.c: (gupnp_control_point_dispose): - * libgupnp/gupnp-root-device.c: (gupnp_root_device_finalize), - (gupnp_root_device_dispose): - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_dispose): - - Chain up to parent class dispose and finalize methods. - -2007-06-19 Jorn Baayen - - * libgupnp/gupnp-context.c: (gupnp_context_init): - - Remove unnecessary initialisations. - -2007-06-19 Jorn Baayen - - * libgupnp/gupnp-context.c: (gupnp_context_class_init): - * libgupnp/gupnp-device-info.c: (gupnp_device_info_class_init): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_class_init): - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_class_init): - - Added G_PARAM_STATIC_{NAME,NICK,BLURB}. - -2007-06-19 Jorn Baayen - - * tests/test-server.c: (main): - - Use g_object_weak_ref() to destroy the description document when - the root device is finalized. - -2007-06-19 Jorn Baayen - - * libgupnp/gupnp-root-device.c: (fill_resource_group): - - Do not overwrite 'element' with child elements as it is still - needed later. - - * tests/Makefile.am: - * tests/test-server.c: - D tests/test.c: - A tests/test-client.c: - - Added server test case. - -2007-06-18 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-device.c: - * libgupnp/gupnp-root-device.c: - * libgupnp/gupnp-root-device.h: - - Implement Device and RootDevice. - - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property), - (gupnp_device_info_class_init): - - Detect UDN if not explicitly specified. - - * libgupnp/gupnp-control-point.c: (parse_usn): - * libgupnp/gupnp-service.h: - - Fix typos. - - * libgupnp/gupnp-device-proxy.c: - * libgupnp/gupnp-device-proxy.h: - - No need for a private structure any more. - -2007-06-14 Jorn Baayen - - * libgupnp/gupnp-context.c: (get_default_host_ip): - - Set IP to 127.0.0.1 if no non-loopback device could be found. - - * libgupnp/gupnp-device-info.c: (gupnp_device_info_set_property), - (gupnp_device_info_get_property), (gupnp_device_info_dispose), - (gupnp_device_info_finalize), (gupnp_device_info_class_init), - (gupnp_device_info_get_context), (gupnp_device_info_get_location), - (gupnp_device_info_get_url_base), (gupnp_device_info_get_udn), - (get_property), (gupnp_device_info_get_serial_number), - (gupnp_device_info_get_upc), (icon_parse), (icon_free), - (gupnp_device_info_get_icon_url), (gupnp_device_info_list_devices), - (gupnp_device_info_list_device_types), - (gupnp_device_info_get_device), (gupnp_device_info_list_services), - (gupnp_device_info_list_service_types), - (gupnp_device_info_get_service): - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_new): - * libgupnp/gupnp-service-info.c: (gupnp_service_info_set_property), - (gupnp_service_info_get_property), (gupnp_service_info_dispose), - (gupnp_service_info_finalize), (gupnp_service_info_class_init), - (gupnp_service_info_get_context), - (gupnp_service_info_get_location), - (gupnp_service_info_get_url_base), (gupnp_service_info_get_udn), - (get_property), (get_url_property): - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_class_init), - (gupnp_service_proxy_new): - - Add 'context' and 'url-base' properties to info classes. - - * libgupnp/gupnp-service.h: - * libgupnp/gupnp-root-device.h: - - Server side API changes. - -2007-06-11 Jorn Baayen - - * libgupnp/gupnp-root-device.h: - * libgupnp/gupnp-service.h: - - API tweaks. - -2007-06-11 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-device.h: - * libgupnp/gupnp-root-device.h: - * libgupnp/gupnp-service.h: - * libgupnp/gupnp.h: - - Headers for server side. These are not final yet. - -2007-05-30 Jorn Baayen - - * libgupnp/gupnp-control-point.c: - (gupnp_control_point_resource_unavailable): - - Remove unavailable proxies from cache. - -2007-05-29 Jorn Baayen - - * configure.ac: - - Bump version to 0.1.99. - - * libgupnp/gupnp-device-info.c: (gupnp_device_info_get_icon_url): - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_get_url_base), - (gupnp_device_proxy_get_device), (gupnp_device_proxy_get_service), - (gupnp_device_proxy_init), (gupnp_device_proxy_class_init): - * libgupnp/gupnp-device-proxy.h: - - Move device subdevice and service retreival from DeviceProxy to - DeviceInfo. This so that client and server side code can expose - identical info API. - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action), (get_current_language), - (action_got_response), (gupnp_service_proxy_begin_action_valist): - * tests/test.c: (main): - - Set Accept-Language header on action requests. - -2007-05-26 Jorn Baayen - - * libgupnp/gupnp-context.c: - * libgupnp/gupnp-context.h: - * libgupnp/gupnp-control-point.c: - * libgupnp/gupnp-control-point.h: - * libgupnp/gupnp-device-info.c: - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c: - * libgupnp/gupnp-device-proxy.h: - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-service-info.c: - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-proxy.c: - * libgupnp/gupnp-service-proxy.h: - - More gtkdoc-fu. - -2007-05-26 Jorn Baayen - - * configure.ac: - * doc/Makefile.am: - * doc/gupnp-docs.sgml: - - Added doc preamble. - -2007-05-22 Jorn Baayen - - * libgupnp/gupnp-device-proxy.h: - * libgupnp/gupnp-service-proxy.h: - - Doc coverage to 100%. - -2007-05-21 Jorn Baayen - - * libgupnp/Makefile.am: - - Make sure all files get packaged. - - * libgupnp/gupnp-context.c: (gupnp_context_class_init): - * libgupnp/gupnp-context.h: - * libgupnp/gupnp-control-point.c: (gupnp_control_point_class_init): - * libgupnp/gupnp-control-point.h: - * libgupnp/gupnp-device-info.c: (gupnp_device_info_class_init), - (icon_parse), (icon_free): - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-error.c: - * libgupnp/gupnp-service-info.c: (gupnp_service_info_class_init), - (get_url_property), (gupnp_service_info_get_service_type), - (gupnp_service_info_get_id), (gupnp_service_info_get_scpd_url), - (gupnp_service_info_get_control_url): - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_class_init): - - Doc updates. - -2007-05-21 Jorn Baayen - - * doc/Makefile.am: - - Hide private bits. - - * doc/gupnp-docs.sgml: - - Added. - -2007-05-21 Jorn Baayen - - * configure.ac: - - Point to gupnp.org. - - * po/*: - - Added missing files. - -2007-05-10 Jorn Baayen - - * NEWS: - * README: - - Added some text. - - * libgupnp/gupnp-device-info.h: - - Removed device type defines. These belong in any higher level - libs now. - - * tests/test.c: (device_proxy_available_cb), - (service_proxy_available_cb), (service_proxy_unavailable_cb), - (main): - - Added notification test and cleaned up. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (server_handler): - - Parse XML part of NOTIFY messages and call notify callbacks. - - This means that now the client side of GUPnP is feature complete. - Yay! - - * tests/test.c: - - Remove old comments. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_get_element), - (gupnp_service_proxy_get_url_base), (notify_data_free), - (gupnp_service_proxy_init), (gupnp_service_proxy_dispose), - (gupnp_service_proxy_finalize), - (gupnp_service_proxy_end_action_valist), - (gupnp_service_proxy_cancel_action): - * libgupnp/gupnp-service-proxy.h: - - Add notification management. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_end_action_valist): - - Correct error message. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (server_handler), - (subscription_expire), (subscribe_got_response), (subscribe), - (unsubscribe): - - Emit 'subscription-lost' when appropriate. - - Keep track of notify sequence numbers and resubscribe when - we notice dropped notifications. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-context-private.h: - * libgupnp/gupnp-context.c: - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_finalize), - (gupnp_service_proxy_remove_notify), (subscription_expire), - (subscribe_got_response), (subscribe), (unsubscribe): - - Generate a unique path for each proxy on the server, and use - soup_server_add_handler() to capture its requests instead of - using a 'server-message-received' signal from GUPnPContext. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_remove_notify), (subscription_expire), - (subscribe_got_response), (subscribe), (unsubscribe): - - Correct "Callback" URL format is subscription message. - Disable Date header parsing for now as getting a local time - (taking into account daylight saving) out of an RFC 1123 time - is a total pain. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-context-private.h: - * libgupnp/gupnp-context.c: (gupnp_context_class_init), - (_gupnp_context_get_session), (server_handler), - (_gupnp_context_get_server): - - Add hidden 'server-message-received' signal, emitted whenever - the SoupServer receives a message. - -2007-05-09 Jorn Baayen - - * libgupnp/gupnp-context.c: (_gupnp_context_get_session), - (default_server_handler), (_gupnp_context_get_server), - (gupnp_context_get_port), (gupnp_context_set_subscription_timeout): - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_remove_notify), (make_timeout_header), - (subscription_expire), (subscribe_got_response), (subscribe): - - Support infinite timeout locally. - - Add a default server handler returning 501. - -2007-05-08 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_dispose), - (subscribe), (unsubscribe), (gupnp_service_proxy_set_subscribed): - - Send unsubscription message synchronised on dispose. - -2007-05-08 Jorn Baayen - - * libgupnp/gupnp-context.c: (gupnp_context_init), - (gupnp_context_set_property), (gupnp_context_get_property), - (gupnp_context_class_init), (_gupnp_context_get_server_url), - (gupnp_context_new): - * libgupnp/gupnp-context.h: - * libgupnp/gupnp-service-proxy.c: (subscription_expire), - (subscribe_got_response), (subscribe): - - Added subscription-timeout property to Context and use in - ServiceProxy. - -2007-05-08 Jorn Baayen - - * libgupnp/gupnp-service-proxy.c: (subscribe_got_response): - - Support infinite timeouts. - -2007-05-08 Jorn Baayen - - * libgupnp/Makefile.am: - * libgupnp/gupnp-device-proxy.c: - * libgupnp/gupnp-service-proxy.c: (gupnp_service_proxy_dispose), - (gupnp_service_proxy_begin_action), (action_got_response), - (gupnp_service_proxy_end_action_valist), - (gupnp_service_proxy_remove_notify), (subscription_expire), - (subscribe_got_response), (subscribe), (unsubscribe), - (gupnp_service_proxy_set_subscribed): - - Implement subscription. - - * tests/test.c: (service_proxy_available_cb): - - Test subscription. - -2007-05-08 Jorn Baayen - - * libgupnp/gupnp-context-private.h: - * libgupnp/gupnp-context.c: (make_server_id), (get_ip), - (get_default_host_ip), (gupnp_context_init), - (gupnp_context_set_property), (gupnp_context_get_property), - (gupnp_context_dispose), (gupnp_context_finalize), - (gupnp_context_class_init), (_gupnp_context_get_session): - * libgupnp/gupnp-context.h: - - Start a SOAP server on demand, and add internal API for - retrieving a URL to the server itself. - - * tests/test.c: (main): - - Updated to use changed GUPnPContext constructor. - -2007-05-07 Jorn Baayen - - * libgupnp/gupnp-device-info.c: (icon_parse), (icon_free), - (gupnp_device_info_get_icon_url): - * libgupnp/gupnp-device-info.h: - * libgupnp/gupnp-device-proxy.c: (gupnp_device_proxy_finalize), - (gupnp_device_proxy_get_element), - (gupnp_device_proxy_get_url_base), (gupnp_device_proxy_init), - (gupnp_device_proxy_list_devices), (gupnp_device_proxy_get_device), - (gupnp_device_proxy_list_services), - (gupnp_device_proxy_get_service), - (_gupnp_device_proxy_find_element_for_udn), - (gupnp_device_proxy_new), (_gupnp_device_proxy_new_from_element): - * libgupnp/gupnp-service-info.c: (get_property), - (gupnp_service_info_get_service_type), (gupnp_service_info_get_id), - (gupnp_service_info_get_scpd_url), - (gupnp_service_info_get_control_url): - * libgupnp/gupnp-service-info.h: - * libgupnp/gupnp-service-proxy-private.h: - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_action_free), - (gupnp_service_proxy_get_element), - (gupnp_service_proxy_get_property), (gupnp_service_proxy_dispose), - (gupnp_service_proxy_finalize), (gupnp_service_proxy_class_init), - (gupnp_service_proxy_send_action_valist), - (gupnp_service_proxy_begin_action_valist), - (gupnp_service_proxy_end_action), - (gupnp_service_proxy_end_action_valist), - (find_service_element_for_type), (gupnp_service_proxy_new), - (_gupnp_service_proxy_new_from_element): - - Take URLBase into account. - Make sending actions and parsing action responses work correctly. - - * tests/test.c: (service_proxy_available_cb), - (service_proxy_unavailable_cb), (main): - - Add a little control test case for ContentDirectories. - -2007-05-07 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (description_loaded), - (parse_usn): - - Correct USN parsing. - - * libgupnp/gupnp-service-proxy.c: - (gupnp_service_proxy_begin_action_valist): - - Added assertion. - -2007-05-03 Jorn Baayen - - * libgupnp/gupnp-control-point.c: (parse_usn), - (gupnp_control_point_resource_available), - (gupnp_control_point_class_init), - (gupnp_control_point_get_context): - * libgupnp/gupnp-control-point.h: - * tests/test.c: (main): - - GSSDPServiceBrowser -> GSSDPResourceBrowser. - -2007-04-25 Zeeshan Ali - - * libgupnp/gupnp-device-info.h: - * tests/test.c: (device_proxy_available_cb): - - Add some device type defines. - -2007-04-16 Jorn Baayen - - * libgupnp/gupnp-context-private.h: - - Added missing header. Spotted by Priit Laes. - diff --git a/INSTALL b/INSTALL index 56b077d..a1e89e1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,16 +1,25 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== -These are generic installation instructions. + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +32,9 @@ 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 +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +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 @@ -35,30 +44,37 @@ 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'. +`configure' by a program called `autoconf'. You 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: + 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. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. 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. + the package, generally using the just-built uninstalled binaries. 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 + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. 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 @@ -67,65 +83,120 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + 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. + 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 + ./configure CC=c99 CFLAGS=-g 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 + 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 +own directory. To do this, you can use 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 `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer 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. - 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. + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. 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=PREFIX'. + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' 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. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= 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 + 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 @@ -137,14 +208,58 @@ 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. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + 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 + 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: @@ -152,14 +267,15 @@ type, such as `sun4', or a canonical name which has the form: where SYSTEM can have one of these forms: - OS KERNEL-OS + 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 +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -170,9 +286,9 @@ 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'. + 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. @@ -181,7 +297,7 @@ 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 + 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 @@ -190,21 +306,29 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -231,6 +355,16 @@ configuration-related scripts to be executed by `/bin/bash'. Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. diff --git a/Makefile.am b/Makefile.am index e390977..1185e35 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,13 @@ -SUBDIRS = libgupnp tools examples tests doc +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +SUBDIRS = libgupnp tools examples tests doc vala pkgconfig_DATA= gupnp-1.0.pc pkgconfigdir = $(libdir)/pkgconfig EXTRA_DIST = gupnp-1.0.pc.in gupnp-1.0-uninstalled.pc.in -ACLOCAL_AMFLAGS=-I m4 - -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection # Extra clean files so that maintainer-clean removes *everything* MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing config.h.in diff --git a/Makefile.in b/Makefile.in index ff7adfb..10a9163 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,19 +51,21 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/gupnp-1.0-uninstalled.pc.in \ $(srcdir)/gupnp-1.0.pc.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ - install-sh ltmain.sh missing + COPYING ChangeLog INSTALL NEWS build-aux/config.guess \ + build-aux/config.sub build-aux/depcomp build-aux/install-sh \ + build-aux/ltmain.sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -55,11 +74,11 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = gupnp-1.0.pc gupnp-1.0-uninstalled.pc CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = @@ -70,6 +89,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -91,6 +115,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ @@ -105,9 +135,11 @@ 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)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -133,9 +165,11 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_ARCHIVES = $(distdir).tar.xz distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -148,13 +182,14 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ -DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -163,28 +198,34 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ -LIBCONIC_LIBS = @LIBCONIC_LIBS@ LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ LIBOBJS = @LIBOBJS@ @@ -195,6 +236,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -218,12 +260,14 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -USE_CONIC = @USE_CONIC@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -256,7 +300,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -268,16 +311,20 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = libgupnp tools examples tests doc +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} +SUBDIRS = libgupnp tools examples tests doc vala pkgconfig_DATA = gupnp-1.0.pc pkgconfigdir = $(libdir)/pkgconfig EXTRA_DIST = gupnp-1.0.pc.in gupnp-1.0-uninstalled.pc.in -ACLOCAL_AMFLAGS = -I m4 -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection # Extra clean files so that maintainer-clean removes *everything* MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing config.h.in @@ -285,7 +332,7 @@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -321,10 +368,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -351,8 +396,11 @@ distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -366,9 +414,7 @@ uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -539,13 +585,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -577,15 +620,18 @@ dist-gzip: distdir $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) - dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -602,7 +648,7 @@ dist-zip: distdir $(am__remove_distdir) dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -616,6 +662,8 @@ distcheck: dist bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -625,7 +673,7 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -635,6 +683,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -663,8 +712,16 @@ distcheck: dist list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -698,10 +755,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -790,8 +852,8 @@ uninstall-am: uninstall-pkgconfigDATA .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ + dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ + 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 \ diff --git a/NEWS b/NEWS index 57ccf42..7aec806 100644 --- a/NEWS +++ b/NEWS @@ -1,20 +1,385 @@ -0.14.1 +0.20.5 ====== -Changes since 0.14.0: +Changes since 0.20.5: + - Add some missing G_{BEGIN,END}_DECLS guards. + - Fix uninitialized variable use introduced in previous version. + - Add simple network device whitelisting infrastructure. + - Port gupnp-binding-tool so it's usable with python3. + - Minor code fixes. + - Fix crashes in NetworkManager context manager during some async calls. + - Fix a small memory leak in the unix and windows CM. + - Always enable GTest tests. + - Upgrade gtk-doc stuff. + - Fix the service example in documentation. + - Remove the test for inverted arguments in the GUPnPContext tests. -- Add sanity checks to GUPnPServiceProxyAction API. -- Fix handling of accepted locales. -- Handle unavailability of URL base. +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=694454 + - https://bugzilla.gnome.org/show_bug.cgi?id=704094 + - https://bugzilla.gnome.org/show_bug.cgi?id=704383 + - https://bugzilla.gnome.org/show_bug.cgi?id=705712 + - https://bugzilla.gnome.org/show_bug.cgi?id=706326 + +All contributors to this release: + - Jens Georg + - Ludovic Ferrandis + - Olivier Crête + - Bohuslav Kabrda + +0.20.4 +====== + +Changes since 0.20.3: +- Fix warnings in gtk-doc run. +- Some minor improvements to the documentation. +- Make the user-agent ASCII-only to fix issues with discovery when + g_get_application_name () returned a translated string. +- Force HTTP version to be 1.1 in SOAP requests. +- Fix potential crashes in XML parsing. +- Fix potential memory leak in gupnp_service_proxy_send_action_valist. +- Some codestyle fixes. +- Add gupnp_device_info_list_dlna_device_class_identifier () to retrieve the + content of nodes. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=704953 + - https://bugzilla.gnome.org/show_bug.cgi?id=702555 + - https://bugzilla.gnome.org/show_bug.cgi?id=704094 + - https://bugzilla.gnome.org/show_bug.cgi?id=700947 + +All contributors to this release: + Ludovic Ferrandis + Jens Georg + Sébastien Bianti + Bastien Nocera + +0.20.3 +====== + +Changes since 0.20.2: +- Add a gupnp_context_manager_rescan_control_points feature. +- Fix VAPI generation if g-i version is >= 1.36. +- Some internal documentation updates. +- Check SID and return a proper error. +- Fix error code returned on invalid NT and NTS headers. +- Fix SEQ to be a uint32. +- Fall-back to unix static CM if netlink sockets are not availabe on runtime. +- Prevent some C++ name mangling in the examples. +- Fix compiling with -Wall -Wextra. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=697314 + - https://bugzilla.gnome.org/show_bug.cgi?id=696289 + - https://bugzilla.gnome.org/show_bug.cgi?id=698192 + - https://bugzilla.gnome.org/show_bug.cgi?id=698125 + +All contributors to this release: + Jens Georg + Jussi Kukkonen + Sébastien Bianti + +Changes in dependencies: + vapigen >= 0.20 if gobject-introspection is >= 1.36 + +0.20.2 +====== + +Changes since 0.20.1: +- Fix some typos in docs and warning messages. +- Fix argument order issue introduced with the va_list fix in 0.20.1. +- Add some tests for this bug. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=695591 + - https://bugzilla.gnome.org/show_bug.cgi?id=696762 + +All contributors to this release: + Jens Georg + Benjamin Kerensa + +0.20.1 +====== + +Changes since 0.20.0: +- Fix suspicious use of va_list in the code. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=689813 + +All contributors to this release: + Krzesimir Nowak + +0.20.0 +====== + +Changes since 0.19.4: +- Fix Accept-Language header generation. +- Fix some issues with Windows support on mingw64. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=683199 + +All contributors to this release: + Jens Georg + +0.19.4 +====== + +Changes since 0.19.3: +- Shuffle around some test data. +- Fix a GError leak in the linux cm. +- Fix a leak in variable notification. +- Clarify usage of gupnp_service_proxy_remove_notify. + +All contributors to this release: + Jens Georg + Sven Neumann + Marcin Nowakowski + +0.19.3 +====== + +Changes since 0.19.2: +- Work-around missing notification messages. + +All contributors to this release: + Jens Georg + +0.19.2 +====== + +Changes since 0.19.1: + +- Support Windows. +- Fix searching for services in ControlPoint. +- Drop deprecated calls to g_type_init on glib >= 2.35. +- Fix LD_LIBRARY_PATH in make check. +- Explicitly use IPv4 in tests. +- Allow autogen.sh to be run out-of-tree. +- Expose GSSDPResourceGroup of a root device. Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=687320 + - https://bugzilla.gnome.org/show_bug.cgi?id=687621 + - https://bugzilla.gnome.org/show_bug.cgi?id=689028 + - https://bugzilla.gnome.org/show_bug.cgi?id=688411 + - https://bugzilla.gnome.org/show_bug.cgi?id=685643 + - https://bugzilla.gnome.org/show_bug.cgi?id=682580 + - https://bugzilla.gnome.org/show_bug.cgi?id=672830 + +All contributors to this release: + Jens Georg + Theppitak Karoonboonyanan + Stef Walter + Juan A. Suarez Romero + Alban Browaeys + +0.19.1 +====== +Changes since 0.19.0: +- Include m4 macro for finding vapigen. +- Run introspection with make distcheck. +- Lower G-I requirement again. +- Add gupnp_context_manager_get_port. +- Don't stop configure if vapigen can't be found. +- Drop some deprecated stuff from VAPI. -2203 - gupnp-igd does not work on TP-Link TL-R860 due to empty URLBase tag +All contributors to this release: + Jens Georg + +0.19.0 +====== + +Changes since 0.18.4: + +- Add an abstract base class for simple context managers. +- Clean-up pkg-config files to not leak libraries. +- Generate VAPI from GIR file. + +Dependency-related changes: + - Require gssdp >= 0.13.0 All contributors: + Jens Georg + Andreas Henriksson + +0.18.0 +====== + +Changes since 0.17.2: + +- Fix a crash in Linux context manager if the USB cable is unplugged from a + USB network device interface. +All contributors: +Jens Georg + +0.17.2 +====== + +Changes since 0.17.1: + +- Drop main-context property +- Fix a small leak from the default-language property. +- Refactor and clean-up internals of GUPnPContextManager. + +Dependency-related changes: + - Require gssdp >= 0.11.2. + +All contributors: +Jens Georg + +0.17.1 +====== + +Changes since 0.17.1: + +- Drop deprecated conic support. +- A Linux context manager. Unlinke the generic static unix context-manger, + the Linux context-manager can dynamically react to device and address + changes, similar to the NetworkManager-based context-manager, but without + depending on DBus or NetworkManager. +- Fix for a SOAP action parameter validation regression. +- Updates to the build system such as: + - Modernized autotools. + - xz tarballs as default. +- Improved OpenBSD support. +- More stable RootDevice URIs. + +All contributors: + +Jens Georg +Jasper Lievisse Adriaanse +Javier Jardón +Zeeshan Ali (Khattak) + +0.17.0 +====== + +Changes since 0.16.1: + +- Fix several crashes during initial introspection. +- Several fixes regarding SOAP action parameter validation. +- Always append a Content-Language header if the client has an Accept-Language + header. +- Always append an Ext header in SOAP responses. +- Improve introspection support: + * Classes that throw an error during construction implement GInitable. + * Update gobject-introspection autotools integration. + * Many annotation fixes. +- Tutorial improvements. + +Dependency-related changes: + - Require gssdp >= 0.11.0. + +All contributors: + +Jens Georg +Zeeshan Ali (Khattak) +Sven Neumann +Santakivi Topi + +0.16.1 +====== + +Changes since 0.16.0: + +- Port to new (0.9) NetworkManager APIs. +- Correction to 'Content-Type' HTTP header values. +- Satisfy strict compiler checks. + +All contributors: + +Dan Williams +Sven Neumann +Zeeshan Ali (Khattak) + +0.16.0 +====== + +Changes since 0.15.1: + +- Set the thread context before doing GDBus operations. +- Use the default timeout on DBus calls. +- Fix documentation of gupnp_context_manager_new(). +- Remove redundant code. +- Clear the (obsolete) ChangeLog file. +- Add some checks on variants. +- Don't use uninitialized pointer. +- Some coding-style fixes. + +Bugs fixed in this release: + +2224 - GUPnP accesses dbus properties without checking that they exist +2223 - Missing handling of gio-style multi-main-context in GUPnPNetworkManager + +All contributors: + +Olivier Crête +Zeeshan Ali (Khattak) +Sven Neumann +Jens Georg +Ross Burton +Luis de Bethencourt + +0.15.1 +====== + +Changes since 0.15.0: + +- Set 'ESSID' on WiFi contexts. +- Fix a crasher bug. +- Fix some leaks. +- Remove a cyclic-reference +- Fix logic to find service from list and therefore the issue of wrongly + ignoring new services. +- Remove all hosted paths from SoupServer before unrefing it. + +Dependency related changes: + +- Require gssdp >= 0.9.2. + +Bugs fixed in this release: + +2212 - Leak in gupnp_root_device_construct +2215 - gupnp-control-point ignores services at startup +2216 - Leak in gupnp_resource_factory +2217 - gupnp-unix-context-manager leaks contexts if interfaces are not up +2218 - gupnp-context creates new SoupServers on shutdown + +All contributors: + +Zeeshan Ali (Khattak) +Jens Georg + +0.15.0 +====== + +Changes since 0.14.0 not included in 0.14.1: + +- Port from dbus-glib to GDBus. +- Enable gzip compression for large action response bodies. +- Fix gupnp-binding-tool to generate headers usable in C++. + +Dependency related changes: + +- Require glib >= 2.24.0. +- Require libsoup >= 2.28.2. +- Require gio >= 2.26 (new dependency). +- Drop dependency on dbus-glib. + +Bugs fixed in this release: + +2184 - Migrate from dbus-glib to glib's GDBus + +All contributors: + +Ross Burton Sven Neumann +Henry Hoegelow Zeeshan Ali (Khattak) +Fargier Sylvain 0.14.0 ====== diff --git a/aclocal.m4 b/aclocal.m4 index c994bd0..c5649ce 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -13,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -47,7 +48,8 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) @@ -93,7 +95,8 @@ m4_define([_PKG_CONFIG], pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried @@ -141,9 +144,9 @@ if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -156,7 +159,7 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])dnl +_PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) @@ -167,7 +170,7 @@ path to pkg-config. _PKG_TEXT -To get pkg-config, see .])dnl +To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS @@ -177,12 +180,15 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -192,7 +198,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' 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.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -208,19 +214,21 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 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 1 + # 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/../..'. @@ -302,14 +310,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 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 10 +# serial 12 # 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, @@ -349,6 +357,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # 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'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -413,7 +422,7 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -478,10 +487,13 @@ AC_DEFUN([AM_DEP_TRACK], if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -564,18 +576,6 @@ AC_DEFUN([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, @@ -715,12 +715,15 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 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 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -760,8 +763,8 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -781,7 +784,7 @@ AC_DEFUN([AM_MAINTAINER_MODE], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful @@ -892,12 +895,15 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 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 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -920,13 +926,14 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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_MANGLE_OPTION(NAME) # ----------------------- @@ -934,13 +941,13 @@ 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], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -951,6 +958,25 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 2001, 2003, 2005, 2011 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 1 + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 @@ -1016,13 +1042,13 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2011 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 1 +# serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- @@ -1037,18 +1063,50 @@ yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using `$V' instead of `$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 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 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -1071,13 +1129,13 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 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 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -1086,13 +1144,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1114,10 +1172,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # 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]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) @@ -1193,3 +1252,4 @@ m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/vapigen.m4]) diff --git a/config.guess b/build-aux/config.guess similarity index 86% rename from config.guess rename to build-aux/config.guess index e3a2116..d622a44 100755 --- a/config.guess +++ b/build-aux/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2009-06-10' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ timestamp='2009-06-10' # 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. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,16 +25,16 @@ timestamp='2009-06-10' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a 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. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +54,9 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +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." @@ -144,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 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*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -180,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -223,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 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 ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; 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 @@ -295,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -333,6 +335,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -391,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 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} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -477,8 +482,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # 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 ] || \ @@ -491,7 +496,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -548,7 +553,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) 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 @@ -591,52 +596,52 @@ EOF 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" ;; + 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 + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + 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); - } + 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 @@ -727,22 +732,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -766,14 +771,14 @@ EOF 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 ;; + 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}" + 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} @@ -785,13 +790,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -800,19 +804,22 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + *:Interix*:*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -854,6 +861,27 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-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 -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -861,20 +889,40 @@ EOF then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -901,39 +949,18 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 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 -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -942,14 +969,17 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -957,67 +987,18 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*: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 + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #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 @@ -1025,11 +1006,11 @@ EOF 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, + # 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. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1061,7 +1042,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1089,13 +1070,13 @@ EOF 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 i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1130,8 +1111,8 @@ EOF /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; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1174,10 +1155,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1203,11 +1184,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1247,6 +1228,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1262,6 +1253,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1307,13 +1301,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + 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` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1331,6 +1325,9 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1353,11 +1350,11 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff --git a/config.sub b/build-aux/config.sub similarity index 89% rename from config.sub rename to build-aux/config.sub index eb0389a..6205f84 100755 --- a/config.sub +++ b/build-aux/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2009-06-11' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ timestamp='2009-06-11' # 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. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -32,13 +30,16 @@ timestamp='2009-06-11' # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU 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. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # 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. @@ -72,8 +73,9 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +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." @@ -120,13 +122,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -149,12 +156,12 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -170,10 +177,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -218,6 +225,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -242,17 +255,22 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | 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 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -278,27 +296,39 @@ case $basic_machine in | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | 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 \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -308,6 +338,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-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. @@ -322,25 +367,29 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | 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-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -362,24 +411,29 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | 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-* | tile-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ - | v850-* | v850e-* | vax-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -404,7 +458,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -474,11 +528,20 @@ case $basic_machine in basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -510,7 +573,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -668,7 +731,6 @@ case $basic_machine in 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 @@ -726,6 +788,9 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -762,10 +827,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -830,6 +903,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -912,9 +991,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -1008,6 +1088,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1064,20 +1147,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1147,6 +1218,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1244,9 +1318,12 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1268,8 +1345,8 @@ case $os in # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1281,8 +1358,9 @@ case $os in | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1290,7 +1368,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1329,7 +1407,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1378,7 +1456,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1423,6 +1501,8 @@ case $os in -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1445,10 +1525,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1460,8 +1540,20 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1481,14 +1573,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1515,7 +1604,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/depcomp b/build-aux/depcomp similarity index 77% rename from depcomp rename to build-aux/depcomp index df8eea7..25a39e6 100755 --- a/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-03-27.16; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 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 @@ -28,7 +28,7 @@ scriptversion=2009-04-28.21; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,11 +40,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + 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. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +57,12 @@ EOF ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + 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 @@ -90,10 +96,24 @@ if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -148,20 +168,21 @@ gcc) ## 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. +## 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 + tr ' ' "$nl" < "$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. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## 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" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -193,18 +214,15 @@ sgi) # 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 + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -216,10 +234,17 @@ sgi) rm -f "$tmpdepfile" ;; +xlc) + # 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 + ;; + 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 + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -249,12 +274,11 @@ aix) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # 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:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -265,23 +289,26 @@ aix) ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -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: + # 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 \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -290,15 +317,21 @@ icc) 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 \'. + # 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" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -334,7 +367,7 @@ hp2) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -349,9 +382,9 @@ hp2) 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'. + # 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. + # 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= @@ -397,14 +430,59 @@ tru64) 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" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # 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 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -422,7 +500,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,15 +520,14 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # 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. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$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" @@ -503,9 +580,10 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## 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" @@ -525,7 +603,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -594,8 +672,8 @@ msvisualcpp) sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/install-sh b/build-aux/install-sh similarity index 95% rename from install-sh rename to build-aux/install-sh index 6781b98..a9244eb 100755 --- a/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ do case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ do for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/ltmain.sh b/build-aux/ltmain.sh old mode 100755 new mode 100644 similarity index 67% rename from ltmain.sh rename to build-aux/ltmain.sh index 7ed280b..b9205ee --- a/ltmain.sh +++ b/build-aux/ltmain.sh @@ -1,9 +1,9 @@ -# Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6b +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 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. @@ -32,50 +32,57 @@ # # 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 -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message +# --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 +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message # # 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 +# 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. +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 -# automake: $automake_version -# autoconf: $autoconf_version +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.2ubuntu1 +# automake: $automake_version +# autoconf: $autoconf_version # # Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . -PROGRAM=ltmain.sh +PROGRAM=libtool PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.2ubuntu1" TIMESTAMP="" -package_revision=1.3017 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -91,10 +98,15 @@ fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + # NLS nuisances: We save the old values to restore during execute mode. -# 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). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES @@ -107,24 +119,28 @@ do lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL $lt_unset CDPATH +# 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" : ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -144,6 +160,27 @@ IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -158,33 +195,183 @@ basename="s,^.*/,," # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } -# Generated shell functions inserted here. +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done -# 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" + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} # The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac # Make sure we have an absolute path for reexecution: case $progpath in @@ -196,7 +383,7 @@ case $progpath in ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -215,6 +402,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -243,7 +439,7 @@ opt_warning=: # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -258,18 +454,25 @@ func_verbose () : } +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + # func_error arg... # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -326,9 +529,9 @@ func_mkdir_p () case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do @@ -378,7 +581,7 @@ func_mktempdir () func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $ECHO "X$my_tmpdir" | $Xsed + $ECHO "$my_tmpdir" } @@ -392,7 +595,7 @@ func_quote_for_eval () { case $1 in *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac @@ -419,7 +622,7 @@ func_quote_for_expand () { case $1 in *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ + my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; @@ -488,15 +691,39 @@ func_show_eval_locale () fi } - - +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} # func_version # Echo version message to standard output and exit. func_version () { - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ @@ -509,22 +736,28 @@ func_version () # Echo short help message to standard output and exit. func_usage () { - $SED -n '/^# Usage:/,/# -h/ { + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" - $ECHO + echo $ECHO "run \`$progname --help | more' for full usage" exit $? } -# func_help -# Echo long help message to standard output and exit. +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -534,11 +767,18 @@ func_help () s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" - exit $? + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi } # func_missing_arg argname @@ -546,63 +786,106 @@ func_help () # exit_cmd. func_missing_arg () { - func_error "missing argument for $1" + $opt_debug + + func_error "missing argument for $1." exit_cmd=exit } -exit_cmd=: +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: -# 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 </dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. @@ -636,16 +919,16 @@ func_config () # Display the features supported by this script. func_features () { - $ECHO "host: $host" + echo "host: $host" if test "$build_libtool_libs" = yes; then - $ECHO "enable shared libraries" + echo "enable shared libraries" else - $ECHO "disable shared libraries" + echo "disable shared libraries" fi if test "$build_old_libs" = yes; then - $ECHO "enable static libraries" + echo "enable static libraries" else - $ECHO "disable static libraries" + echo "disable static libraries" fi exit $? @@ -692,117 +975,209 @@ func_enable_tag () esac } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () { + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - # Parse non-mode specific arguments: - while test "$#" -gt 0; do +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do opt="$1" shift - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" + --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" - opt_debug='set -x' $opt_debug ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift + --dry-run|--dryrun|-n) + opt_dry_run=: ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" shift ;; - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: + opt_preserve_dup_deps=: ;; - - --verbose| -v) preserve_args="$preserve_args $opt" + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) opt_silent=false +func_append preserve_args " $opt" ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" shift ;; + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) @@ -810,82 +1185,44 @@ func_enable_tag () opt_duplicate_compiler_generated_deps=: ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} + $opt_help || { + # Sanity checks first: + func_check_version_match -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} +## ----------- ## +## Main. ## +## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. @@ -950,12 +1287,9 @@ func_ltwrapper_executable_p () # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -1001,6 +1335,37 @@ func_source () } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # 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. @@ -1013,13 +1378,15 @@ func_infer_tag () if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` 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` "*) ;; + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) @@ -1030,11 +1397,13 @@ func_infer_tag () CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. @@ -1097,6 +1466,486 @@ EOF } } + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $opt_debug + func_convert_core_file_wine_to_w32_result="$1" + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + # func_mode_compile arg... func_mode_compile () { @@ -1137,12 +1986,12 @@ func_mode_compile () ;; -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" + func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + func_append later " $arg" continue ;; @@ -1163,15 +2012,14 @@ func_mode_compile () save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" + func_append base_compile " $lastarg" continue ;; @@ -1187,8 +2035,7 @@ func_mode_compile () esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in @@ -1213,7 +2060,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -1288,7 +2135,7 @@ func_mode_compile () # 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} + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= @@ -1319,17 +2166,16 @@ compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" + func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result @@ -1349,7 +2195,7 @@ compiler." if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ @@ -1396,11 +2242,11 @@ compiler." command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then - command="$command -o $obj" + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' @@ -1445,13 +2291,13 @@ compiler." } $opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1482,10 +2328,11 @@ This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. @@ -1538,7 +2385,7 @@ either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." @@ -1558,6 +2405,8 @@ 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 + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) -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) @@ -1586,6 +2435,11 @@ The following components of LINK-COMMAND are treated specially: -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. @@ -1619,18 +2473,44 @@ Otherwise, only FILE itself is deleted using RM." ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac - $ECHO + echo $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? } - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi # func_mode_execute arg... @@ -1643,13 +2523,16 @@ func_mode_execute () func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" @@ -1671,7 +2554,7 @@ func_mode_execute () dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" @@ -1712,7 +2595,7 @@ func_mode_execute () for file do case $file in - -*) ;; + -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then @@ -1728,8 +2611,7 @@ func_mode_execute () ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then @@ -1754,29 +2636,66 @@ func_mode_execute () # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" + echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug - libdirs="$nonopt" + libs= + libdirs= admincmds= - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1786,7 +2705,7 @@ func_mode_finish () if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done @@ -1795,53 +2714,55 @@ func_mode_finish () # Exit here if they wanted silent mode. $opt_silent && 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\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + 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 " - 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" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... @@ -1852,7 +2773,7 @@ func_mode_install () # 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 + case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -1866,7 +2787,12 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac # We need to accept at least all the BSD install flags. dest= @@ -1876,10 +2802,12 @@ func_mode_install () install_type= isdir=no stripme= + no_mode=: for arg do + arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi @@ -1887,10 +2815,9 @@ func_mode_install () case $arg in -d) isdir=yes ;; -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac + if $install_cp; then :; else + prev=$arg + fi ;; -g | -m | -o) prev=$arg @@ -1904,6 +2831,10 @@ func_mode_install () *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi prev= else dest=$arg @@ -1914,7 +2845,11 @@ func_mode_install () # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -1923,6 +2858,13 @@ func_mode_install () test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" @@ -1977,10 +2919,13 @@ func_mode_install () case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" @@ -1994,23 +2939,23 @@ func_mode_install () if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" - dir="$dir$objdir" + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -2023,9 +2968,9 @@ func_mode_install () if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" @@ -2043,7 +2988,7 @@ func_mode_install () test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in @@ -2083,7 +3028,7 @@ func_mode_install () func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -2183,7 +3128,7 @@ func_mode_install () if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no @@ -2202,7 +3147,7 @@ func_mode_install () file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" @@ -2221,7 +3166,7 @@ func_mode_install () } else # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi @@ -2257,11 +3202,13 @@ func_mode_install () # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -2280,7 +3227,7 @@ func_mode_install () fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2323,6 +3270,22 @@ func_generate_dlsyms () extern \"C\" { #endif +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* External symbol declarations for the compiler. */\ " @@ -2332,10 +3295,11 @@ extern \"C\" { $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2371,7 +3335,7 @@ extern \"C\" { eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -2384,10 +3348,52 @@ extern \"C\" { func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2415,36 +3421,19 @@ extern \"C\" { if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist +extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," @@ -2457,7 +3446,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] = eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; @@ -2484,7 +3473,7 @@ static const void *lt_preloaded_setup() { # 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*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -2500,7 +3489,7 @@ static const void *lt_preloaded_setup() { for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2515,16 +3504,16 @@ static const void *lt_preloaded_setup() { case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; @@ -2538,8 +3527,8 @@ static const void *lt_preloaded_setup() { # 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@%%"` + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } @@ -2549,6 +3538,7 @@ static const void *lt_preloaded_setup() { # 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. +# Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug @@ -2559,9 +3549,11 @@ func_win32_libid () win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ @@ -2590,6 +3582,131 @@ func_win32_libid () $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} # func_extract_an_archive dir oldlib @@ -2598,7 +3715,18 @@ func_extract_an_archive () $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else @@ -2669,7 +3797,7 @@ func_extract_archives () darwin_file= darwin_files= for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ @@ -2684,25 +3812,30 @@ func_extract_archives () func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } - -# func_emit_wrapper_part1 [arg=no] +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. # -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () { - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi + func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL @@ -2718,7 +3851,6 @@ func_emit_wrapper_part1 () # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible @@ -2749,31 +3881,135 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then 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\ + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ " - $ECHO "\ + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + thisdir=\`\$ECHO \"\$file\" | $SED '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'\` + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then @@ -2783,30 +4019,13 @@ else esac fi - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then @@ -2814,7 +4033,7 @@ func_emit_wrapper_part2 () fi # remove .libs from thisdir case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi @@ -2869,6 +4088,18 @@ func_emit_wrapper_part2 () if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ @@ -2877,253 +4108,28 @@ func_emit_wrapper_part2 () # 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/::*\$//'\` + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ 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* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + func_exec_program \${1+\"\$@\"} 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 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout @@ -3141,31 +4147,23 @@ func_emit_cwrapperexe_src () 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* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. */ EOF cat <<"EOF" +#ifdef _MSC_VER +# define _CRT_SECURE_NO_DEPRECATE 1 +#endif #include #include #ifdef _MSC_VER # include # include # include -# define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif # endif #endif #include @@ -3177,6 +4175,44 @@ int setenv (const char *, const char *, int); #include #include +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) @@ -3192,14 +4228,7 @@ int setenv (const char *, const char *, int); # define S_IXGRP 0 #endif -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - +/* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' @@ -3230,10 +4259,6 @@ int setenv (const char *, const char *, int); # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - #ifndef FOPEN_WB # define FOPEN_WB "w" #endif @@ -3246,22 +4271,13 @@ int setenv (const char *, const char *, int); if (stale) { free ((void *) stale); stale = 0; } \ } while (0) -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; #else -# define LTWRAPPER_DEBUGPRINTF(args) +static int lt_debug = 0; #endif -const char *program_name = NULL; +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); @@ -3271,41 +4287,27 @@ char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); } EOF @@ -3560,11 +4523,14 @@ EOF mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; @@ -3586,7 +4552,7 @@ xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) - lt_fatal ("Memory exhausted"); + lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } @@ -3620,8 +4586,8 @@ check_executable (const char *path) { struct stat st; - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3638,8 +4604,8 @@ make_executable (const char *path) int rval = 0; struct stat st; - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3665,8 +4631,8 @@ find_executable (const char *wrapper) int tmp_len; char *concat_name; - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; @@ -3719,7 +4685,8 @@ find_executable (const char *wrapper) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -3744,7 +4711,8 @@ find_executable (const char *wrapper) } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); @@ -3770,8 +4738,9 @@ chase_symlinks (const char *pathspec) int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) @@ -3793,8 +4762,9 @@ chase_symlinks (const char *pathspec) } else { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); @@ -3807,7 +4777,8 @@ chase_symlinks (const char *pathspec) tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { - lt_fatal ("Could not follow symlinks for %s", pathspec); + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif @@ -3833,11 +4804,25 @@ strendzap (char *str, const char *pat) return str; } +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + static void -lt_error_core (int exit_status, const char *mode, +lt_error_core (int exit_status, const char *file, + int line, const char *mode, const char *message, va_list ap) { - fprintf (stderr, "%s: %s: ", program_name, mode); + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); @@ -3846,20 +4831,32 @@ lt_error_core (int exit_status, const char *mode, } void -lt_fatal (const char *message, ...) +lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + void lt_setenv (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ @@ -3904,95 +4901,12 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) return new_value; } -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - void lt_update_exe_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4011,9 +4925,9 @@ lt_update_exe_path (const char *name, const char *value) void lt_update_lib_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4023,11 +4937,158 @@ lt_update_lib_path (const char *name, const char *value) } } +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} EOF } # end: func_emit_cwrapperexe_src +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + # func_mode_link arg... func_mode_link () { @@ -4072,6 +5133,7 @@ func_mode_link () new_inherited_linker_flags= avoid_version=no + bindir= dlfiles= dlprefiles= dlself=no @@ -4164,6 +5226,11 @@ func_mode_link () esac case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. @@ -4195,9 +5262,9 @@ func_mode_link () ;; *) if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" + func_append dlfiles " $arg" else - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $arg" fi prev= continue @@ -4221,7 +5288,7 @@ func_mode_link () *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; @@ -4240,7 +5307,7 @@ func_mode_link () moreargs= for fil in `cat "$save_arg"` do -# moreargs="$moreargs $fil" +# func_append moreargs " $fil" arg=$fil # A libtool-controlled object. @@ -4269,7 +5336,7 @@ func_mode_link () if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4281,7 +5348,7 @@ func_mode_link () # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4351,12 +5418,12 @@ func_mode_link () if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; - *) rpath="$rpath $arg" ;; + *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; + *) func_append xrpath " $arg" ;; esac fi prev= @@ -4368,28 +5435,28 @@ func_mode_link () continue ;; weak) - weak_libs="$weak_libs $arg" + func_append weak_libs " $arg" prev= continue ;; xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) - compiler_flags="$compiler_flags $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -4425,6 +5492,11 @@ func_mode_link () continue ;; + -bindir) + prev=bindir + continue + ;; + -dlopen) prev=dlfiles continue @@ -4475,15 +5547,16 @@ func_mode_link () ;; -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -4495,24 +5568,30 @@ func_mode_link () ;; esac case "$deplibs " in - *" -L$dir "*) ;; + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -4522,7 +5601,7 @@ func_mode_link () -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -4536,7 +5615,7 @@ func_mode_link () ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -4556,7 +5635,7 @@ func_mode_link () ;; esac fi - deplibs="$deplibs $arg" + func_append deplibs " $arg" continue ;; @@ -4568,21 +5647,22 @@ func_mode_link () # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; @@ -4649,13 +5729,17 @@ func_mode_link () # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac continue ;; @@ -4708,8 +5792,8 @@ func_mode_link () for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4724,9 +5808,9 @@ func_mode_link () for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4754,23 +5838,27 @@ func_mode_link () arg="$func_quote_for_eval_result" ;; - # -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*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" continue ;; @@ -4782,7 +5870,7 @@ func_mode_link () *.$objext) # A standard object. - objs="$objs $arg" + func_append objs " $arg" ;; *.lo) @@ -4813,7 +5901,7 @@ func_mode_link () if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4825,7 +5913,7 @@ func_mode_link () # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4870,24 +5958,25 @@ func_mode_link () *.$libext) # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" + func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. + func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - deplibs="$deplibs $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -4925,7 +6014,7 @@ func_mode_link () 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\'\` + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi @@ -4934,6 +6023,8 @@ func_mode_link () func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" @@ -4954,12 +6045,12 @@ func_mode_link () # 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 $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - libs="$libs $deplib" + func_append libs " $deplib" done if test "$linkmode" = lib; then @@ -4972,9 +6063,9 @@ func_mode_link () if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" + func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= @@ -5044,17 +6135,19 @@ func_mode_link () for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= + func_resolve_sysroot "$lib" case $lib in - *.la) func_source "$lib" ;; + *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + func_basename "$deplib" + deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; + *) func_append deplibs " $deplib" ;; esac done done @@ -5070,16 +6163,17 @@ func_mode_link () lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - compiler_flags="$compiler_flags $deplib" + func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5164,7 +6258,7 @@ func_mode_link () if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5177,7 +6271,8 @@ func_mode_link () test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then @@ -5191,7 +6286,8 @@ func_mode_link () finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" @@ -5202,17 +6298,21 @@ func_mode_link () -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" - dir=$func_stripname_result + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; - *.la) lib="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" @@ -5230,7 +6330,7 @@ func_mode_link () match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi @@ -5240,15 +6340,15 @@ func_mode_link () ;; esac if test "$valid_a_lib" != yes; then - $ECHO + 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 use here." + 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 use here." else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" @@ -5275,11 +6375,11 @@ func_mode_link () 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" + func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - newdlfiles="$newdlfiles $deplib" + func_append newdlfiles " $deplib" fi fi continue @@ -5321,20 +6421,20 @@ func_mode_link () # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` 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" + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then @@ -5345,17 +6445,17 @@ func_mode_link () func_fatal_error "cannot find name of link library for \`$lib'" 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" + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" @@ -5366,9 +6466,15 @@ func_mode_link () # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi @@ -5385,9 +6491,9 @@ func_mode_link () # 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" + func_append dlprefiles " $lib $dependency_libs" else - newdlfiles="$newdlfiles $lib" + func_append newdlfiles " $lib" fi continue fi # $pass = dlopen @@ -5409,14 +6515,14 @@ func_mode_link () # 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 + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else - dir="$libdir" - absdir="$libdir" + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else @@ -5424,12 +6530,12 @@ func_mode_link () dir="$ladir" absdir="$abs_ladir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" @@ -5440,20 +6546,46 @@ func_mode_link () if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" 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" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $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 + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac fi # $pass = dlpreopen if test -z "$libdir"; then @@ -5471,7 +6603,7 @@ func_mode_link () if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" + func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no @@ -5484,7 +6616,8 @@ func_mode_link () for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? @@ -5495,12 +6628,12 @@ func_mode_link () # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... @@ -5515,7 +6648,7 @@ func_mode_link () # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; + *) func_append temp_rpath "$absdir:" ;; esac fi @@ -5527,7 +6660,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5536,7 +6669,7 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5561,12 +6694,12 @@ func_mode_link () case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=yes fi ;; @@ -5583,7 +6716,7 @@ func_mode_link () fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO + echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else @@ -5601,7 +6734,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5610,7 +6743,7 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5664,7 +6797,7 @@ func_mode_link () linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then + if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= @@ -5686,9 +6819,9 @@ func_mode_link () if test "X$dlopenmodule" != "X$lib"; 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" + 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 @@ -5715,12 +6848,12 @@ func_mode_link () test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # 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" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5742,7 +6875,7 @@ func_mode_link () if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then @@ -5756,13 +6889,13 @@ func_mode_link () test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi - if test "$linkmode" = prog || test "$mode" = relink; then + if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= @@ -5776,7 +6909,7 @@ func_mode_link () elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then @@ -5793,7 +6926,7 @@ func_mode_link () if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5828,21 +6961,21 @@ func_mode_link () # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $ECHO + echo $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module @@ -5870,27 +7003,33 @@ func_mode_link () temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; + *) func_append xrpath " $temp_xrpath";; esac;; - *) temp_deplibs="$temp_deplibs $libdir";; + *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi - newlib_search_path="$newlib_search_path $absdir" + func_append 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 $opt_duplicate_deps ; then + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then @@ -5900,8 +7039,10 @@ func_mode_link () case $deplib in -L*) path="$deplib" ;; *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; @@ -5928,8 +7069,8 @@ func_mode_link () if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi @@ -5962,7 +7103,7 @@ func_mode_link () compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" @@ -5979,7 +7120,7 @@ func_mode_link () for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; + *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= @@ -6037,10 +7178,10 @@ func_mode_link () -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" @@ -6056,7 +7197,7 @@ func_mode_link () ;; esac if test -n "$i" ; then - tmp_libs="$tmp_libs $i" + func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs @@ -6097,7 +7238,7 @@ func_mode_link () # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" - objs="$objs$old_deplibs" + func_append objs "$old_deplibs" ;; lib) @@ -6130,10 +7271,10 @@ func_mode_link () if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" + func_append libobjs " $objs" fi fi @@ -6192,13 +7333,14 @@ func_mode_link () # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; - freebsd-aout|freebsd-elf|sunos) + freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" @@ -6311,7 +7453,7 @@ func_mode_link () versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -6334,7 +7476,7 @@ func_mode_link () done # Make executables depend on our current version. - verstring="$verstring:${current}.0" + func_append verstring ":${current}.0" ;; qnx) @@ -6402,10 +7544,10 @@ func_mode_link () fi func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" + func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= - if test "$mode" != relink; then + if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -6421,7 +7563,7 @@ func_mode_link () continue fi fi - removelist="$removelist $p" + func_append removelist " $p" ;; *) ;; esac @@ -6432,27 +7574,28 @@ func_mode_link () # 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" + func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "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" + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then @@ -6466,7 +7609,7 @@ func_mode_link () for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; + *) func_append dlfiles " $lib" ;; esac done @@ -6476,19 +7619,19 @@ func_mode_link () for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; + *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -6505,7 +7648,7 @@ func_mode_link () *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" + func_append deplibs " -lc" fi ;; esac @@ -6554,7 +7697,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6565,21 +7708,21 @@ EOF set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + 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." + 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 ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6597,7 +7740,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6608,29 +7751,29 @@ EOF set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + 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." + 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 $ECHO "*** Warning! Library $i is needed by this library but I was not able to" - $ECHO "*** make it link in! You will probably need to install it or some" - $ECHO "*** library that it depends on before this library will be fully" - $ECHO "*** functional. Installing it before continuing would be even better." + echo "*** 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 ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6647,15 +7790,27 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + if test "$want_nocaseglob" = yes; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6672,13 +7827,13 @@ EOF potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6687,12 +7842,12 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** 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 @@ -6703,7 +7858,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6719,7 +7874,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac @@ -6730,9 +7885,9 @@ EOF 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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6741,12 +7896,12 @@ EOF fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** 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 @@ -6757,32 +7912,32 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; 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" | $Xsed -e "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO + case $tmp_deplibs in + *[!\ \ ]*) + echo if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + echo "*** Warning: inter-library dependencies are not supported in this platform." else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." + echo "*** Warning: inter-library dependencies are not known to be supported." fi - $ECHO "*** All declared inter-library dependencies are being dropped." + echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes - fi + ;; + esac ;; esac versuffix=$versuffix_save @@ -6794,23 +7949,23 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" @@ -6820,16 +7975,16 @@ EOF build_libtool_libs=no fi else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module @@ -6846,9 +8001,9 @@ EOF # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -6861,7 +8016,7 @@ EOF *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -6871,10 +8026,10 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" @@ -6886,15 +8041,22 @@ EOF # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac 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" + test "$opt_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 + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else @@ -6903,18 +8065,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -6922,17 +8084,13 @@ EOF 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 + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" 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:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -6940,7 +8098,7 @@ EOF fi shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -6966,18 +8124,18 @@ EOF linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -7008,13 +8166,45 @@ EOF $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd1 in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. @@ -7036,7 +8226,7 @@ EOF if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then @@ -7048,7 +8238,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7058,7 +8248,7 @@ EOF case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done @@ -7078,21 +8268,21 @@ EOF test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= 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" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi @@ -7137,7 +8327,8 @@ EOF save_libobjs=$libobjs fi save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + func_basename "$output" + output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. @@ -7150,13 +8341,16 @@ EOF if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output + echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - $ECHO ')' >> $output - delfiles="$delfiles $output" + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" @@ -7170,10 +8364,12 @@ EOF fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." @@ -7197,17 +8393,19 @@ EOF # 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\" + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext - objlist=$obj + objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result @@ -7217,11 +8415,12 @@ EOF # 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\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= @@ -7255,7 +8454,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7276,7 +8475,7 @@ EOF if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then @@ -7288,7 +8487,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7329,10 +8528,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi @@ -7348,7 +8547,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7360,7 +8559,7 @@ EOF IFS="$save_ifs" # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7441,18 +8640,21 @@ EOF if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + # 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 + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' @@ -7512,8 +8714,8 @@ EOF 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 / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac @@ -7524,14 +8726,14 @@ EOF if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -7545,7 +8747,7 @@ EOF *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7555,17 +8757,17 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7573,7 +8775,7 @@ EOF # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7592,18 +8794,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in @@ -7612,12 +8814,12 @@ EOF case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7643,18 +8845,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done @@ -7668,8 +8870,8 @@ EOF 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` + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" @@ -7681,15 +8883,15 @@ EOF wrappers_required=yes case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no @@ -7698,13 +8900,19 @@ EOF esac if test "$wrappers_required" = no; then # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' @@ -7727,7 +8935,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7735,7 +8943,7 @@ EOF # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7745,11 +8953,18 @@ EOF # 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'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi @@ -7764,7 +8979,7 @@ EOF 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'` + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -7776,13 +8991,19 @@ EOF fi # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -7800,18 +9021,7 @@ EOF 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"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -7891,7 +9101,7 @@ EOF else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" + func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" @@ -7899,10 +9109,10 @@ EOF if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. @@ -7913,10 +9123,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -7932,9 +9142,9 @@ EOF done | sort | sort -uc >/dev/null 2>&1); then : else - $ECHO "copying selected object files to avoid basename conflicts..." + echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -7958,18 +9168,30 @@ EOF esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -8043,7 +9265,7 @@ EOF 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"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -8063,12 +9285,23 @@ EOF *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -8082,9 +9315,9 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" @@ -8101,7 +9334,7 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done @@ -8113,7 +9346,7 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= @@ -8122,15 +9355,33 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; esac $ECHO > $output "\ # $outputname - a libtool library file @@ -8189,7 +9440,7 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} @@ -8209,9 +9460,9 @@ func_mode_uninstall () for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8220,24 +9471,23 @@ func_mode_uninstall () rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then - objdir="$origobjdir" + odir="$objdir" else - objdir="$dir/$origobjdir" + odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + test "$opt_mode" = uninstall && odir="$dir" - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8263,18 +9513,17 @@ func_mode_uninstall () # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case "$opt_mode" in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then @@ -8302,19 +9551,19 @@ func_mode_uninstall () # 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" + func_append 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" + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -8324,7 +9573,7 @@ func_mode_uninstall () noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8333,7 +9582,7 @@ func_mode_uninstall () func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8341,12 +9590,12 @@ func_mode_uninstall () # 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}" + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -8354,7 +9603,6 @@ func_mode_uninstall () esac func_show_eval "$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 @@ -8366,16 +9614,16 @@ func_mode_uninstall () exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} -test -z "$mode" && { +test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" diff --git a/missing b/build-aux/missing similarity index 89% rename from missing rename to build-aux/missing index 28055d2..86a8fc3 100755 --- a/missing +++ b/build-aux/missing @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ Supported PROGRAM values: 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] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ case $1 in # 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. @@ -226,7 +216,7 @@ WARNING: \`$1' $msg. You should only need it if \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ WARNING: \`$1' is $msg. You should only need it if \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ WARNING: \`$1' is $msg. You should only need it if 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. diff --git a/config.h.in b/config.h.in index 5055a4f..a7745b9 100644 --- a/config.h.in +++ b/config.h.in @@ -9,6 +9,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_RTNETLINK_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_WIRELESS_H + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -30,6 +36,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H @@ -70,6 +79,11 @@ /* Version number of package */ #undef VERSION +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff --git a/configure b/configure index b00c8b6..e874272 100755 --- a/configure +++ b/configure @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for gupnp 0.14.1. +# Generated by GNU Autoconf 2.69 for gupnp 0.20.5. # -# Report bugs to . +# Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -91,6 +89,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -135,6 +134,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -168,12 +192,21 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -213,14 +246,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -231,10 +275,11 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: http://www.gupnp.org/ about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." +$0: http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." fi exit 1 fi @@ -323,6 +368,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -444,6 +497,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # 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). @@ -478,16 +535,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -499,28 +556,8 @@ else 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 +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -528,155 +565,68 @@ 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$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_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 <<_LT_EOF -$* -_LT_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 "$lt_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 && - { 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. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' test -n "$DJDIR" || exec 7<&0 &1 @@ -701,12 +651,13 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gupnp' PACKAGE_TARNAME='gupnp' -PACKAGE_VERSION='0.14.1' -PACKAGE_STRING='gupnp 0.14.1' -PACKAGE_BUGREPORT='http://www.gupnp.org/' -PACKAGE_URL='' +PACKAGE_VERSION='0.20.5' +PACKAGE_STRING='gupnp 0.20.5' +PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp' +PACKAGE_URL='http://www.gupnp.org/' ac_unique_file="libgupnp/gupnp.h" +ac_header_list= # Factoring default headers for most tests. ac_includes_default="\ #include @@ -743,7 +694,6 @@ ac_includes_default="\ # include #endif" -ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -758,27 +708,42 @@ GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE +GTKDOC_DEPS_LIBS +GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK +HAVE_VAPIGEN_FALSE +HAVE_VAPIGEN_TRUE +VAPIGEN HAVE_INTROSPECTION_FALSE HAVE_INTROSPECTION_TRUE +INTROSPECTION_MAKEFILE +INTROSPECTION_LIBS +INTROSPECTION_CFLAGS INTROSPECTION_TYPELIBDIR INTROSPECTION_GIRDIR INTROSPECTION_GENERATE INTROSPECTION_COMPILER INTROSPECTION_SCANNER GLIB_GENMARSHAL -DBUS_GLIB_LIBS -DBUS_GLIB_CFLAGS -USE_CONIC -USE_CONIC_FALSE -USE_CONIC_TRUE -LIBCONIC_LIBS -LIBCONIC_CFLAGS +USE_NETLINK +USE_NETLINK_FALSE +USE_NETLINK_TRUE +CONNMAN_LIBS +CONNMAN_CFLAGS +USE_CONNMAN_FALSE +USE_CONNMAN_TRUE +GIO_LIBS +GIO_CFLAGS USE_NETWORK_MANAGER_FALSE USE_NETWORK_MANAGER_TRUE +HAVE_NETLINK +HAVE_NETLINK_FALSE +HAVE_NETLINK_TRUE +OS_WIN32_FALSE +OS_WIN32_TRUE GTHREAD_LIBS GTHREAD_CFLAGS LIBGUPNP_LIBS @@ -791,9 +756,11 @@ OTOOL LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -809,6 +776,7 @@ CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -824,14 +792,8 @@ CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build +AM_DEFAULT_V +AM_V MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE @@ -858,6 +820,18 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build target_alias host_alias build_alias @@ -902,13 +876,14 @@ enable_option_checking enable_maintainer_mode enable_silent_rules enable_dependency_tracking +enable_largefile enable_shared enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock -enable_largefile with_context_manager enable_debug enable_introspection @@ -933,10 +908,12 @@ LIBGUPNP_CFLAGS LIBGUPNP_LIBS GTHREAD_CFLAGS GTHREAD_LIBS -LIBCONIC_CFLAGS -LIBCONIC_LIBS -DBUS_GLIB_CFLAGS -DBUS_GLIB_LIBS' +GIO_CFLAGS +GIO_LIBS +CONNMAN_CFLAGS +CONNMAN_LIBS +GTKDOC_DEPS_CFLAGS +GTKDOC_DEPS_LIBS' # Initialize some variables set by options. @@ -1341,7 +1318,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1392,8 +1369,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_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 @@ -1479,7 +1454,7 @@ 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 gupnp 0.14.1 to adapt to many kinds of systems. +\`configure' configures gupnp 0.20.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1544,12 +1519,13 @@ Program names: System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gupnp 0.14.1:";; + short | recursive ) echo "Configuration of gupnp 0.20.5:";; esac cat <<\_ACEOF @@ -1557,18 +1533,18 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful + --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --disable-largefile omit support for large files --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --disable-largefile omit support for large files --enable-debug enable debugging --enable-introspection=[no/auto/yes] Enable introspection for this build @@ -1579,10 +1555,12 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-context-manager=[network-manager/unix] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + --with-context-manager=[network-manager/connman/unix/linux] Context Manager backend to use --with-html-dir=PATH path to installed docs @@ -1608,19 +1586,22 @@ Some influential environment variables: C compiler flags for GTHREAD, overriding pkg-config GTHREAD_LIBS linker flags for GTHREAD, overriding pkg-config - LIBCONIC_CFLAGS - C compiler flags for LIBCONIC, overriding pkg-config - LIBCONIC_LIBS - linker flags for LIBCONIC, overriding pkg-config - DBUS_GLIB_CFLAGS - C compiler flags for DBUS_GLIB, overriding pkg-config - DBUS_GLIB_LIBS - linker flags for DBUS_GLIB, overriding pkg-config + GIO_CFLAGS C compiler flags for GIO, overriding pkg-config + GIO_LIBS linker flags for GIO, overriding pkg-config + CONNMAN_CFLAGS + C compiler flags for CONNMAN, overriding pkg-config + CONNMAN_LIBS + linker flags for CONNMAN, overriding pkg-config + GTKDOC_DEPS_CFLAGS + C compiler flags for GTKDOC_DEPS, overriding pkg-config + GTKDOC_DEPS_LIBS + linker flags for GTKDOC_DEPS, 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. -Report bugs to . +Report bugs to . +gupnp home page: . _ACEOF ac_status=$? fi @@ -1683,10 +1664,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gupnp configure 0.14.1 -generated by GNU Autoconf 2.67 +gupnp configure 0.20.5 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1730,56 +1711,41 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_try_link +} # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- @@ -1813,7 +1779,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1855,41 +1821,56 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" + 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_c_check_header_compile +} # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- @@ -1899,7 +1880,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1954,15 +1935,15 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func 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 gupnp $as_me 0.14.1, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by gupnp $as_me 0.20.5, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2220,7 +2201,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2312,10 +2293,13 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.11' + +ac_config_headers="$ac_config_headers config.h" + + ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do +for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -2331,7 +2315,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2343,34 +2327,148 @@ 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. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&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]/* | \ + 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 && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&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` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +am__api_version='1.11' + +# 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. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&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/* ) ;; @@ -2380,7 +2478,7 @@ case $as_dir/ in #(( # 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 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2447,11 +2545,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2537,7 +2635,7 @@ if test "$cross_compiling" != no; then set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2549,7 +2647,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2577,7 +2675,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2589,7 +2687,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2630,7 +2728,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2640,7 +2738,7 @@ do 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 + as_fn_executable_p "$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) '* | \ @@ -2681,7 +2779,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2693,7 +2791,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2721,7 +2819,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2779,7 +2877,7 @@ fi # Define the identity of the package. PACKAGE='gupnp' - VERSION='0.14.1' + VERSION='0.20.5' cat >>confdefs.h <<_ACEOF @@ -2809,18 +2907,96 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar plaintar pax cpio none' +_am_tools=${am_cv_prog_tar_ustar-$_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 + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -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 ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac -AMTAR=${AMTAR-"${am_missing_run}tar"} + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir +if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_prog_tar_ustar=$_am_tool +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +$as_echo "$am_cv_prog_tar_ustar" >&6; } -ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 @@ -2829,7 +3005,7 @@ $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else - USE_MAINTAINER_MODE=no + USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 @@ -2845,77 +3021,6 @@ fi MAINT=$MAINTAINER_MODE_TRUE -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&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 && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; -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 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&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` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; -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 - - # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : @@ -2927,71 +3032,37 @@ yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac -AM_BACKSLASH='\' - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_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; + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no 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='#' +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else - AMDEP_TRUE='#' - AMDEP_FALSE= + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi +AM_BACKSLASH='\' +# Check for programs ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3002,7 +3073,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3014,7 +3085,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3042,7 +3113,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3054,7 +3125,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3095,7 +3166,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3107,7 +3178,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3135,7 +3206,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3148,7 +3219,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3194,7 +3265,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3206,7 +3277,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3238,7 +3309,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3250,7 +3321,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3293,7 +3364,7 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3408,7 +3479,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3451,7 +3522,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3510,7 +3581,7 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3521,7 +3592,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3562,7 +3633,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3572,7 +3643,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3609,7 +3680,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3687,7 +3758,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3696,8 +3767,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* 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); @@ -3781,12 +3851,75 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_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='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -3795,6 +3928,7 @@ else # 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'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3854,7 +3988,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -3910,60 +4044,135 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 -$as_echo_n "checking for library containing strerror... " >&6; } -if test "${ac_cv_search_strerror+set}" = set; then : +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # 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 to if __STDC__ is defined, since + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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" +#ifdef __STDC__ +# include +#else +# include #endif -char strerror (); -int -main () -{ -return strerror (); - ; - return 0; -} + Syntax error _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 - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_strerror=$ac_res +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_strerror+set}" = set; then : - break +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext + done -if test "${ac_cv_search_strerror+set}" = set; then : +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$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 to if __STDC__ is defined, since + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : else - ac_cv_search_strerror=no + # Broken: fails on valid input. +continue fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 -$as_echo "$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" +rm -f conftest.err conftest.i conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3971,948 +4180,497 @@ 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&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 + if test -z "$GREP"; then + 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 - 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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$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 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_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 + as_fn_arith $ac_count + 1 && ac_count=$as_val + 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 + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&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 + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + 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 - 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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$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 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_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 + as_fn_arith $ac_count + 1 && ac_count=$as_val + 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 -IFS=$as_save_IFS + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_path_EGREP=$EGREP fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : -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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_stdc=no fi - +rm -f conftest* 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_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 -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#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 +if ac_fn_c_try_run "$LINENO"; then : - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&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" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi + ac_cv_header_stdc=no fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then - test -n "$ac_ct_CC" && break -done +$as_echo "#define STDC_HEADERS 1" >>confdefs.h - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi fi +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi +done -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - ; - return 0; -} + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ +done - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main () -{ - ; - return 0; -} + + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$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 +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : + $as_echo_n "(cached) " >&6 else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include -/* 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; -} +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc -/* 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]; +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. -/* 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]; + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ -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" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -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 + char *data, *data2, *data3; + const char *cdata2; + int i, pagesize; + int fd, fd2; -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : + pagesize = getpagesize (); -fi + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 2; + if (write (fd, data, pagesize) != pagesize) + return 3; + close (fd); -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 + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; -depcc="$CC" am_compiler_list= + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 9; + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 10; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 11; -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 12; + if (read (fd, data3, pagesize) != pagesize) + return 13; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes 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 - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +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 - - # 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. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - 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 - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj 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 $am__obj 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&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 : - $as_echo_n "(cached) " >&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 to if __STDC__ is defined, since - # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$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 to if __STDC__ is defined, since - # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } -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 - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - 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 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_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 - as_fn_arith $ac_count + 1 && ac_count=$as_val - 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 - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - 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 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_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 - as_fn_arith $ac_count + 1 && ac_count=$as_val - 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 - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +$as_echo "#define HAVE_MMAP 1" >>confdefs.h + fi +rm -f conftest.mmap conftest.txt - fi +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +if test "$enable_largefile" != no; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include - +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -4921,108 +4679,252 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no + if ac_fn_c_try_compile "$LINENO"; then : + break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} _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* - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done 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 : - : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 else + while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#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))) +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; 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 -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -else - ac_cv_header_stdc=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + fi -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +# Initialize libtool + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' -fi +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} -macro_version='2.2.6b' -macro_revision='1.3017' +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac @@ -5036,11 +4938,10 @@ macro_revision='1.3017' -ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5060,7 +4961,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5122,7 +5023,7 @@ Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -5139,7 +5040,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5253,7 +5154,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -5293,7 +5194,7 @@ fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -5320,7 +5221,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -5373,14 +5274,17 @@ if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -5392,7 +5296,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5418,13 +5322,13 @@ fi fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -5436,7 +5340,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5473,6 +5377,15 @@ esac fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -5487,18 +5400,18 @@ test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5495: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5498: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5501: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5522,7 +5435,7 @@ fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -5555,6 +5468,11 @@ else lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + 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. @@ -5580,6 +5498,11 @@ else lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + 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 @@ -5606,7 +5529,8 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$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 @@ -5619,8 +5543,8 @@ else # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -5662,8 +5586,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -5712,9 +5636,83 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' @@ -5728,6 +5726,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5750,7 +5753,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -5762,7 +5765,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5790,7 +5793,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -5802,7 +5805,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5849,7 +5852,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -5891,16 +5894,18 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && 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)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -5926,7 +5931,7 @@ freebsd* | dragonfly*) fi ;; -gnu*) +haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5938,11 +5943,11 @@ hpux10.20* | hpux11*) 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_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? 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_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 @@ -5963,8 +5968,8 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -5976,83 +5981,249 @@ netbsd* | netbsdelf*-gnu) 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 - ;; +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=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + 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 + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +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 test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' -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 +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; - pc) - lt_cv_deplibs_check_method=pass_all + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$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 - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -6061,11 +6232,13 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown 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 + for ac_prog in ar + 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6077,8 +6250,8 @@ 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" + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6098,14 +6271,18 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$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 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6117,8 +6294,8 @@ 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" + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6137,6 +6314,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -6148,16 +6329,72 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -6170,7 +6407,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6182,7 +6419,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6210,7 +6447,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -6222,7 +6459,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6269,7 +6506,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6281,7 +6518,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6309,7 +6546,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6321,7 +6558,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6371,15 +6608,27 @@ 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 -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + @@ -6426,7 +6675,7 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -6487,8 +6736,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -6512,6 +6761,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -6524,6 +6774,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -6549,8 +6800,8 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$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 + if { { eval echo "\"\$as_me\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -6565,6 +6816,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -6576,7 +6839,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -6602,8 +6865,8 @@ static const void *lt_preloaded_setup() { _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -6613,8 +6876,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -6651,6 +6914,26 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + @@ -6664,9 +6947,38 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } @@ -6703,7 +7015,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6706 "configure"' > conftest.$ac_ext + echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6754,7 +7066,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" @@ -6797,7 +7116,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -6838,7 +7157,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -6849,7 +7168,20 @@ sparc*-*solaris*) case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -6865,6 +7197,123 @@ esac need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -6873,7 +7322,7 @@ need_locks="$enable_libtool_lock" set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -6885,7 +7334,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6913,7 +7362,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -6925,7 +7374,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6965,7 +7414,7 @@ fi set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -6977,7 +7426,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7005,7 +7454,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -7017,7 +7466,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7057,7 +7506,7 @@ fi set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -7069,7 +7518,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7097,7 +7546,7 @@ if test -z "$ac_cv_prog_LIPO"; then set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -7109,7 +7558,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7149,7 +7598,7 @@ fi set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -7161,7 +7610,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7189,7 +7638,7 @@ if test -z "$ac_cv_prog_OTOOL"; then set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -7201,7 +7650,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7241,7 +7690,7 @@ fi set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -7253,7 +7702,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7281,7 +7730,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -7293,7 +7742,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7356,7 +7805,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -7372,7 +7821,13 @@ else $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7383,9 +7838,10 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no @@ -7415,6 +7871,41 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -7442,7 +7933,7 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -7450,28 +7941,11 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } ;; esac -# 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF @@ -7482,6 +7956,8 @@ done + + # Set options @@ -7557,7 +8033,22 @@ fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -7634,6 +8125,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + test -z "$LN_S" && LN_S="ln -s" @@ -7655,7 +8151,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -7683,19 +8179,6 @@ _ACEOF - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -7708,23 +8191,6 @@ aix3*) ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -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 delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -7753,7 +8219,7 @@ for cc_temp in $compiler""; do *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -7763,7 +8229,7 @@ file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7829,7 +8295,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7962,11 +8428,16 @@ if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -7982,15 +8453,15 @@ else -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:7985: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7989: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $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 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/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 @@ -8019,8 +8490,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -8068,6 +8537,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -8110,6 +8585,15 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -8151,7 +8635,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -8172,7 +8656,13 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -8184,25 +8674,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # 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='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *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' + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' ;; esac ;; @@ -8234,7 +8739,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -8291,13 +8796,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -8305,7 +8814,7 @@ $as_echo "$lt_prog_compiler_pic" >&6; } if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -8321,15 +8830,15 @@ else -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:8324: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8328: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $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 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/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_pic_works=yes @@ -8358,13 +8867,18 @@ fi + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -8377,7 +8891,7 @@ else 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 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -8407,7 +8921,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8426,16 +8940,16 @@ else -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:8429: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8433: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $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 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/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 @@ -8462,7 +8976,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8481,16 +8995,16 @@ else -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:8484: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8488: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $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 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/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 @@ -8556,7 +9070,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -8600,13 +9113,39 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -8640,11 +9179,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, 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. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -8680,10 +9220,12 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' 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/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' 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' @@ -8701,6 +9243,11 @@ _LT_EOF fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -8726,15 +9273,16 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' 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' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$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' + pgf77* | pgf90* | pgf95* | pgfortran*) + # 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -8745,13 +9293,17 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -8767,17 +9319,16 @@ _LT_EOF fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -8791,8 +9342,8 @@ _LT_EOF 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' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8810,8 +9361,8 @@ _LT_EOF _LT_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' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8857,8 +9408,8 @@ _LT_EOF *) 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' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8898,8 +9449,10 @@ _LT_EOF else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". 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' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (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 @@ -8987,7 +9540,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9000,25 +9559,32 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_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 "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${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' @@ -9027,7 +9593,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9040,30 +9612,42 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_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 "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +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' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi 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' @@ -9095,20 +9679,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - 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 "X$deplibs" | $Xsed -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 + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + 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 `func_echo_all "$deplibs" | $SED '\''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' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -9118,7 +9746,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -9126,7 +9759,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all 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}" @@ -9144,10 +9777,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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 @@ -9160,7 +9789,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9169,7 +9798,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -9177,7 +9806,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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 @@ -9192,14 +9821,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; 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' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${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_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -9211,16 +9839,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${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' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -9232,7 +9860,46 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 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' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${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 + ;; esac fi @@ -9260,26 +9927,39 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -9341,17 +10021,17 @@ rm -f core conftest.err conftest.$ac_objext \ 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' + 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -9361,13 +10041,13 @@ rm -f core conftest.err conftest.$ac_objext \ 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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${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='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-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; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_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' @@ -9380,9 +10060,9 @@ rm -f core conftest.err conftest.$ac_objext \ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9570,44 +10250,50 @@ x|xyes) # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + 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\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - 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* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -9765,11 +10451,6 @@ esac - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -9778,16 +10459,23 @@ if test "$GCC" = yes; then 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 + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # 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= @@ -9800,7 +10488,7 @@ if test "$GCC" = yes; then 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 ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -9820,7 +10508,13 @@ BEGIN {RS=" "; FS="/|\n";} { 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` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -9846,7 +10540,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -9855,7 +10549,7 @@ aix3*) ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -9908,7 +10602,7 @@ amigaos*) m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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' ;; esac ;; @@ -9920,7 +10614,7 @@ beos*) ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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' @@ -9939,58 +10633,106 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' + case $GCC,$cc_basename in + yes,*) + # gcc + 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~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + 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="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + 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 + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + 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 + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + # 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~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' + $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # 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 + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10011,7 +10753,7 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -10019,10 +10761,6 @@ dgux*) 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. @@ -10030,7 +10768,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10048,7 +10786,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -10067,13 +10805,16 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no + dynamic_linker="$host_os runtime_loader" 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_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -10119,12 +10860,14 @@ hpux9* | hpux10* | hpux11*) soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -10140,7 +10883,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -10177,9 +10920,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10187,12 +10930,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10205,13 +10953,17 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -10220,7 +10972,7 @@ rm -f core conftest.err conftest.$ac_objext \ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -10264,7 +11016,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10333,7 +11085,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10358,7 +11110,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10382,7 +11134,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10413,7 +11165,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10423,7 +11175,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10535,6 +11287,11 @@ fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= @@ -10607,7 +11364,7 @@ else # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10641,7 +11398,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -10655,12 +11412,12 @@ fi *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10694,16 +11451,16 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10737,12 +11494,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10776,12 +11533,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10815,7 +11572,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -10856,7 +11613,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -10865,7 +11622,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10868 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10906,7 +11663,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10915,7 +11678,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -10952,7 +11719,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; } wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -10961,7 +11728,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10964 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11002,7 +11769,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11011,7 +11784,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -11059,543 +11836,148 @@ $as_echo "$lt_cv_dlopen_self_static" >&6; } 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 - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&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" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&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 - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -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" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - - - - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - -for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_mmap_fixed_mapped=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. + esac +fi - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ -#include -#include -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ -#endif /* no HAVE_GETPAGESIZE */ -int -main () -{ - char *data, *data2, *data3; - const char *cdata2; - int i, pagesize; - int fd, fd2; - pagesize = getpagesize (); - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 2; - if (write (fd, data, pagesize) != pagesize) - return 3; - close (fd); - /* Next, check that the tail of a page is zero-filled. File must have - non-zero length, otherwise we risk SIGBUS for entire page. */ - fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd2 < 0) - return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) - return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); - if (data2 == MAP_FAILED) - return 6; - for (i = 0; i < pagesize; ++i) - if (*(data2 + i)) - return 7; - close (fd2); - if (munmap (data2, pagesize)) - return 8; - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 9; - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 10; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 11; - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 12; - if (read (fd, data3, pagesize) != pagesize) - return 13; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 14; - close (fd); - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_mmap_fixed_mapped=yes + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&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" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then -$as_echo "#define HAVE_MMAP 1" >>confdefs.h -fi -rm -f conftest.mmap conftest.txt -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi -if test "$enable_largefile" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&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 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - 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" + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking operating system" >&5 $as_echo_n "checking operating system... " >&6; } -case "$host_os" in +os_win32=no +case "$target_os" in mingw*|cygwin*) + os_win32=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: Win32" >&5 $as_echo "Win32" >&6; } - UUID=uuid + UUID= ;; darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 @@ -11603,8 +11985,8 @@ $as_echo "Darwin" >&6; } UUID= ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os" >&5 -$as_echo "$host_os" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_os" >&5 +$as_echo "$target_os" >&6; } UUID=uuid ;; esac @@ -11615,13 +11997,14 @@ esac + 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11635,7 +12018,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11664,7 +12047,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in @@ -11678,7 +12061,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11737,30 +12120,31 @@ if test -n "$LIBGUPNP_CFLAGS"; then pkg_cv_LIBGUPNP_CFLAGS="$LIBGUPNP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.18 \\ - gobject-2.0 >= 2.18 \\ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 \\ + gio-2.0 \\ gmodule-2.0 \\ - gssdp-1.0 >= 0.7.1 \\ - libsoup-2.4 >= 2.4.1 \\ + gssdp-1.0 >= 0.13.0 \\ + libsoup-2.4 >= 2.28.2 \\ libxml-2.0 \\ \$UUID\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBGUPNP_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ + pkg_cv_LIBGUPNP_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -11771,30 +12155,31 @@ if test -n "$LIBGUPNP_LIBS"; then pkg_cv_LIBGUPNP_LIBS="$LIBGUPNP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.18 \\ - gobject-2.0 >= 2.18 \\ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 \\ + gio-2.0 \\ gmodule-2.0 \\ - gssdp-1.0 >= 0.7.1 \\ - libsoup-2.4 >= 2.4.1 \\ + gssdp-1.0 >= 0.13.0 \\ + libsoup-2.4 >= 2.28.2 \\ libxml-2.0 \\ \$UUID\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBGUPNP_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ + pkg_cv_LIBGUPNP_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -11814,30 +12199,30 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ + LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID" 2>&1` else - LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ + LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGUPNP_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ + as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID) were not met: @@ -11863,7 +12248,7 @@ and LIBGUPNP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else LIBGUPNP_CFLAGS=$pkg_cv_LIBGUPNP_CFLAGS LIBGUPNP_LIBS=$pkg_cv_LIBGUPNP_LIBS @@ -11872,7 +12257,6 @@ $as_echo "yes" >&6; } fi - pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5 $as_echo_n "checking for GTHREAD... " >&6; } @@ -11887,6 +12271,7 @@ if test -n "$GTHREAD_CFLAGS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -11903,6 +12288,7 @@ if test -n "$GTHREAD_LIBS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTHREAD_LIBS=`$PKG_CONFIG --libs "gthread-2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -11922,9 +12308,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GTHREAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gthread-2.0" 2>&1` + GTHREAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gthread-2.0" 2>&1` else - GTHREAD_PKG_ERRORS=`$PKG_CONFIG --print-errors "gthread-2.0" 2>&1` + GTHREAD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gthread-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTHREAD_PKG_ERRORS" >&5 @@ -11953,7 +12339,7 @@ and GTHREAD_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else GTHREAD_CFLAGS=$pkg_cv_GTHREAD_CFLAGS GTHREAD_LIBS=$pkg_cv_GTHREAD_LIBS @@ -11962,14 +12348,84 @@ $as_echo "yes" >&6; } fi + if test "x$os_win32" = "xyes"; then + OS_WIN32_TRUE= + OS_WIN32_FALSE='#' +else + OS_WIN32_TRUE='#' + OS_WIN32_FALSE= +fi + +if test "x$os_win32" = "xno"; then # Check whether --with-context_manager was given. if test "${with_context_manager+set}" = set; then : withval=$with_context_manager; else - with_context_manager="unix" + with_context_manager="none" +fi + +else + LIBGUPNP_LIBS="$LIBGUPNP_LIBS -lrpcrt4" + with_context_manager="windows" +fi + +if test "x$with_context_manager" = "xnone"; then + case "$target_os" in + linux*) + with_context_manager="linux" + ;; + *) + with_context_manager="unix" + ;; + esac +fi + +for ac_header in sys/socket.h linux/rtnetlink.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " #ifdef HAVE_SYS_SOCKET_H + #include + #endif + +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + HAVE_NETLINK=yes +else + HAVE_NETLINK=no +fi + +done + + if test "x$HAVE_NETLINK" = "xyes"; then + HAVE_NETLINK_TRUE= + HAVE_NETLINK_FALSE='#' +else + HAVE_NETLINK_TRUE='#' + HAVE_NETLINK_FALSE= +fi + + + +for ac_header in linux/wireless.h +do : + ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" " #ifdef HAVE_SYS_SOCKET_H + #include + #endif + +" +if test "x$ac_cv_header_linux_wireless_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_WIRELESS_H 1 +_ACEOF + fi +done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Context Manager backend to use" >&5 $as_echo_n "checking Context Manager backend to use... " >&6; } @@ -11984,40 +12440,40 @@ else USE_NETWORK_MANAGER_FALSE= fi - -USE_CONIC=no -if test "x$with_context_manager" = "xunix"; then +if test "x$with_context_manager" = "xnetwork-manager"; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCONIC" >&5 -$as_echo_n "checking for LIBCONIC... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO" >&5 +$as_echo_n "checking for GIO... " >&6; } -if test -n "$LIBCONIC_CFLAGS"; then - pkg_cv_LIBCONIC_CFLAGS="$LIBCONIC_CFLAGS" +if test -n "$GIO_CFLAGS"; then + pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"conic >= 0.13\""; } >&5 - ($PKG_CONFIG --exists --print-errors "conic >= 0.13") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.26\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.26") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBCONIC_CFLAGS=`$PKG_CONFIG --cflags "conic >= 0.13" 2>/dev/null` + pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi -if test -n "$LIBCONIC_LIBS"; then - pkg_cv_LIBCONIC_LIBS="$LIBCONIC_LIBS" +if test -n "$GIO_LIBS"; then + pkg_cv_GIO_LIBS="$GIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"conic >= 0.13\""; } >&5 - ($PKG_CONFIG --exists --print-errors "conic >= 0.13") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.26\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.26") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBCONIC_LIBS=`$PKG_CONFIG --libs "conic >= 0.13" 2>/dev/null` + pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -12037,81 +12493,90 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBCONIC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "conic >= 0.13" 2>&1` + GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= 2.26" 2>&1` else - LIBCONIC_PKG_ERRORS=`$PKG_CONFIG --print-errors "conic >= 0.13" 2>&1` + GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= 2.26" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$LIBCONIC_PKG_ERRORS" >&5 + echo "$GIO_PKG_ERRORS" >&5 - USE_CONIC=no - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: conic 0.13 or greater not found." >&5 -$as_echo "$as_me: WARNING: conic 0.13 or greater not found." >&2;} + as_fn_error $? "Package requirements (gio-2.0 >= 2.26) were not met: +$GIO_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 GIO_CFLAGS +and GIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - USE_CONIC=no - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: conic 0.13 or greater not found." >&5 -$as_echo "$as_me: WARNING: conic 0.13 or greater not found." >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_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 GIO_CFLAGS +and GIO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } else - LIBCONIC_CFLAGS=$pkg_cv_LIBCONIC_CFLAGS - LIBCONIC_LIBS=$pkg_cv_LIBCONIC_LIBS + GIO_CFLAGS=$pkg_cv_GIO_CFLAGS + GIO_LIBS=$pkg_cv_GIO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - USE_CONIC=yes - - fi fi - if test x$USE_CONIC = xyes; then - USE_CONIC_TRUE= - USE_CONIC_FALSE='#' + if test "x$with_context_manager" = "xconnman"; then + USE_CONNMAN_TRUE= + USE_CONNMAN_FALSE='#' else - USE_CONIC_TRUE='#' - USE_CONIC_FALSE= + USE_CONNMAN_TRUE='#' + USE_CONNMAN_FALSE= fi - -# We need dbus-glib if either NetworkManager or libconic is used -if test "x$with_context_manager" = "xnetwork-manager" -o \ - "x$with_context_manager" = "xunix" -a \ - "x$USE_CONIC" = "xyes"; then +if test "x$with_context_manager" = "xconnman"; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS_GLIB" >&5 -$as_echo_n "checking for DBUS_GLIB... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CONNMAN" >&5 +$as_echo_n "checking for CONNMAN... " >&6; } -if test -n "$DBUS_GLIB_CFLAGS"; then - pkg_cv_DBUS_GLIB_CFLAGS="$DBUS_GLIB_CFLAGS" +if test -n "$CONNMAN_CFLAGS"; then + pkg_cv_CONNMAN_CFLAGS="$CONNMAN_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.76\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.76") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28 connman >= 0.80\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28 connman >= 0.80") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DBUS_GLIB_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.76" 2>/dev/null` + pkg_cv_CONNMAN_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.28 connman >= 0.80" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi -if test -n "$DBUS_GLIB_LIBS"; then - pkg_cv_DBUS_GLIB_LIBS="$DBUS_GLIB_LIBS" +if test -n "$CONNMAN_LIBS"; then + pkg_cv_CONNMAN_LIBS="$CONNMAN_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-glib-1 >= 0.76\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbus-glib-1 >= 0.76") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28 connman >= 0.80\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28 connman >= 0.80") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_DBUS_GLIB_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.76" 2>/dev/null` + pkg_cv_CONNMAN_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.28 connman >= 0.80" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -12131,22 +12596,22 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUS_GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-glib-1 >= 0.76" 2>&1` + CONNMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.28 connman >= 0.80" 2>&1` else - DBUS_GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-glib-1 >= 0.76" 2>&1` + CONNMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.28 connman >= 0.80" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$DBUS_GLIB_PKG_ERRORS" >&5 + echo "$CONNMAN_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (dbus-glib-1 >= 0.76) were not met: + as_fn_error $? "Package requirements (glib-2.0 >= 2.28 connman >= 0.80) were not met: -$DBUS_GLIB_PKG_ERRORS +$CONNMAN_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 DBUS_GLIB_CFLAGS -and DBUS_GLIB_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables CONNMAN_CFLAGS +and CONNMAN_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -12157,21 +12622,42 @@ as_fn_error $? "The pkg-config script could not be found or is too old. Make su 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 DBUS_GLIB_CFLAGS -and DBUS_GLIB_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables CONNMAN_CFLAGS +and CONNMAN_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else - DBUS_GLIB_CFLAGS=$pkg_cv_DBUS_GLIB_CFLAGS - DBUS_GLIB_LIBS=$pkg_cv_DBUS_GLIB_LIBS + CONNMAN_CFLAGS=$pkg_cv_CONNMAN_CFLAGS + CONNMAN_LIBS=$pkg_cv_CONNMAN_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi +USE_NETLINK=no +if test "x$with_context_manager" = "xlinux"; then : + if test "x$HAVE_NETLINK" = "xno"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: No rtnetlink found, falling back to static context manager" >&5 +$as_echo "$as_me: No rtnetlink found, falling back to static context manager" >&6;} +else + USE_NETLINK=yes +fi + +fi + + if test "x$USE_NETLINK" = "xyes"; then + USE_NETLINK_TRUE= + USE_NETLINK_FALSE='#' +else + USE_NETLINK_TRUE='#' + USE_NETLINK_FALSE= +fi + + + # glib-genmarshal GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` @@ -12258,6 +12744,9 @@ $as_echo "$found_introspection" >&6; } INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` + INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi @@ -12265,25 +12754,133 @@ $as_echo "$found_introspection" >&6; } - if test "x$found_introspection" = "xyes"; then - HAVE_INTROSPECTION_TRUE= - HAVE_INTROSPECTION_FALSE='#' + + + + if test "x$found_introspection" = "xyes"; then + HAVE_INTROSPECTION_TRUE= + HAVE_INTROSPECTION_FALSE='#' +else + HAVE_INTROSPECTION_TRUE='#' + HAVE_INTROSPECTION_FALSE= +fi + + + + +# vapigen +have_vapigen=no +if test "x$found_introspection" = "xyes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether G-I is 1.36 or newer" >&5 +$as_echo_n "checking whether G-I is 1.36 or newer... " >&6; } + VAPIGEN_MIN_VERSION=0.14 + if pkg-config --atleast-version=1.36.0 gobject-introspection-1.0; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + VAPIGEN_MIN_VERSION=0.20 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +fi + # Extract the first word of "vapigen", so it can be a program name with args. +set dummy vapigen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_VAPIGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $VAPIGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_VAPIGEN="$VAPIGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_VAPIGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +VAPIGEN=$ac_cv_path_VAPIGEN +if test -n "$VAPIGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VAPIGEN" >&5 +$as_echo "$VAPIGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$VAPIGEN"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No Vala API Generator found. You will not be able to generate .vapi files." >&5 +$as_echo "$as_me: WARNING: No Vala API Generator found. You will not be able to generate .vapi files." >&2;} +else + if test -n "$VAPIGEN_MIN_VERSION"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $VAPIGEN is at least version $VAPIGEN_MIN_VERSION" >&5 +$as_echo_n "checking $VAPIGEN is at least version $VAPIGEN_MIN_VERSION... " >&6; } + am__vapigen_version=`$VAPIGEN --version | sed 's/Vala API Generator *//'` + as_arg_v1=$VAPIGEN_MIN_VERSION +as_arg_v2="$am__vapigen_version" +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 0) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 2) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Vala API Generator $VAPIGEN_MIN_VERSION not found." >&5 +$as_echo "$as_me: WARNING: Vala API Generator $VAPIGEN_MIN_VERSION not found." >&2;} + VAPIGEN="" + ;; #( + *) : + ;; +esac +fi +fi + + + +fi +if test "x$VAPIGEN" != "x"; then : + have_vapigen=yes +fi + if test "x$VAPIGEN" != "x"; then + HAVE_VAPIGEN_TRUE= + HAVE_VAPIGEN_FALSE='#' else - HAVE_INTROSPECTION_TRUE='#' - HAVE_INTROSPECTION_FALSE= + HAVE_VAPIGEN_TRUE='#' + HAVE_VAPIGEN_FALSE= fi - - # Gtk-doc + # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then : +if ${ac_cv_path_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in @@ -12297,7 +12894,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12325,7 +12922,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GTKDOC_REBASE+set}" = set; then : +if ${ac_cv_path_GTKDOC_REBASE+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_REBASE in @@ -12339,7 +12936,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12369,7 +12966,7 @@ test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" set dummy gtkdoc-mkpdf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GTKDOC_MKPDF+set}" = set; then : +if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_MKPDF in @@ -12383,7 +12980,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12427,15 +13024,108 @@ fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.14\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.14") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else - as_fn_error $? "You need to have gtk-doc >= 1.0 installed to build $PACKAGE_NAME" "$LINENO" 5 + as_fn_error $? "You need to have gtk-doc >= 1.14 installed to build $PACKAGE_NAME" "$LINENO" 5 +fi + if test "x$PACKAGE_NAME" != "xglib"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 +$as_echo_n "checking for GTKDOC_DEPS... " >&6; } + +if test -n "$GTKDOC_DEPS_CFLAGS"; then + pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GTKDOC_DEPS_LIBS"; then + pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +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 + GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` + else + GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0) were not met: + +$GTKDOC_DEPS_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 GTKDOC_DEPS_CFLAGS +and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_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 GTKDOC_DEPS_CFLAGS +and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS + GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 @@ -12505,7 +13195,7 @@ fi -ac_config_files="$ac_config_files Makefile libgupnp/Makefile examples/Makefile tools/Makefile tests/Makefile doc/Makefile doc/version.xml gupnp-1.0.pc gupnp-1.0-uninstalled.pc" +ac_config_files="$ac_config_files Makefile libgupnp/Makefile examples/Makefile tools/Makefile tests/Makefile tests/gtest/Makefile doc/Makefile doc/version.xml vala/Makefile gupnp-1.0.pc gupnp-1.0-uninstalled.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -12571,10 +13261,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&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" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -12625,22 +13326,34 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then + as_fn_error $? "conditional \"OS_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_NETLINK_TRUE}" && test -z "${HAVE_NETLINK_FALSE}"; then + as_fn_error $? "conditional \"HAVE_NETLINK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_NETWORK_MANAGER_TRUE}" && test -z "${USE_NETWORK_MANAGER_FALSE}"; then as_fn_error $? "conditional \"USE_NETWORK_MANAGER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${USE_CONIC_TRUE}" && test -z "${USE_CONIC_FALSE}"; then - as_fn_error $? "conditional \"USE_CONIC\" was never defined. +if test -z "${USE_CONNMAN_TRUE}" && test -z "${USE_CONNMAN_FALSE}"; then + as_fn_error $? "conditional \"USE_CONNMAN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_NETLINK_TRUE}" && test -z "${USE_NETLINK_FALSE}"; then + as_fn_error $? "conditional \"USE_NETLINK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_VAPIGEN_TRUE}" && test -z "${HAVE_VAPIGEN_FALSE}"; then + as_fn_error $? "conditional \"HAVE_VAPIGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -12662,7 +13375,7 @@ if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}" Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -12763,6 +13476,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12958,16 +13672,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -13027,28 +13741,16 @@ else 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 + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -13069,8 +13771,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gupnp $as_me 0.14.1, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by gupnp $as_me 0.20.5, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13129,17 +13831,18 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to . +gupnp home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gupnp config.status 0.14.1 -configured by $0, generated by GNU Autoconf 2.67, +gupnp config.status 0.20.5 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13230,7 +13933,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -13264,131 +13967,154 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. -for var in SED \ +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ GREP \ EGREP \ FGREP \ @@ -13401,8 +14127,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -13412,14 +14143,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -13433,9 +14164,7 @@ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -13443,12 +14172,13 @@ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -13470,14 +14200,15 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -13485,12 +14216,6 @@ sys_lib_dlsearch_path_spec; do esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -13527,12 +14252,14 @@ do "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/gtest/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gtest/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/version.xml") CONFIG_FILES="$CONFIG_FILES doc/version.xml" ;; + "vala/Makefile") CONFIG_FILES="$CONFIG_FILES vala/Makefile" ;; "gupnp-1.0.pc") CONFIG_FILES="$CONFIG_FILES gupnp-1.0.pc" ;; "gupnp-1.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES gupnp-1.0-uninstalled.pc" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -13555,9 +14282,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -13565,12 +14293,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -13592,7 +14321,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -13620,7 +14349,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -13668,7 +14397,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -13700,7 +14429,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -13734,7 +14463,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -13746,8 +14475,8 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -13848,7 +14577,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -13867,7 +14596,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_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 `:'. @@ -13876,7 +14605,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -13902,8 +14631,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -14039,21 +14768,22 @@ s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 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"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_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" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -14064,20 +14794,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. @@ -14239,7 +14969,8 @@ $as_echo X"$file" | # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -14287,6 +15018,15 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -14336,9 +15076,11 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -14346,13 +15088,30 @@ OBJDUMP=$lt_OBJDUMP # 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". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -14361,6 +15120,9 @@ RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -14379,14 +15141,14 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -14394,6 +15156,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -14450,6 +15215,9 @@ library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -14489,6 +15257,10 @@ striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -14501,12 +15273,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -14556,10 +15328,6 @@ no_undefined_flag=$lt_no_undefined_flag # 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 @@ -14593,9 +15361,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -14611,6 +15376,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -14643,212 +15411,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -14891,3 +15616,13 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + +echo " + ${PACKAGE} ${VERSION} + --------------------- + + Prefix: ${prefix} + GObject-Introspection: ${found_introspection} + VALA bindings: ${have_vapigen} + Context manager: ${with_context_manager} +" diff --git a/configure.ac b/configure.ac index c19ce5c..0d7e91f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,81 +1,123 @@ -AC_PREREQ(2.53) -AC_INIT(gupnp, 0.14.1, http://www.gupnp.org/) -AM_INIT_AUTOMAKE() -AC_CONFIG_SRCDIR(libgupnp/gupnp.h) -AM_CONFIG_HEADER(config.h) -AM_MAINTAINER_MODE +AC_PREREQ([2.64]) +AC_INIT([gupnp], + [0.20.5], + [http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp], + [gupnp], + [http://www.gupnp.org/]) + +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_SRCDIR([libgupnp/gupnp.h]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([build-aux]) + AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE([1.11 tar-ustar no-dist-gzip dist-xz]) +AM_MAINTAINER_MODE([enable]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AM_SILENT_RULES([yes]) -AC_ISC_POSIX +# Check for programs AC_PROG_CC -AC_STDC_HEADERS -AC_PROG_LIBTOOL -AC_CONFIG_MACRO_DIR([m4]) AC_FUNC_MMAP AC_SYS_LARGEFILE +# Initialize libtool +LT_PREREQ([2.2]) +LT_INIT + + AC_MSG_CHECKING([operating system]) -case "$host_os" in +os_win32=no +case "$target_os" in mingw*|cygwin*) + os_win32=yes AC_MSG_RESULT(Win32) - UUID=uuid + UUID= ;; darwin*) AC_MSG_RESULT(Darwin) UUID= ;; *) - AC_MSG_RESULT($host_os) + AC_MSG_RESULT($target_os) UUID=uuid ;; esac -PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.18 \ - gobject-2.0 >= 2.18 \ +PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.24.0 \ + gio-2.0 \ gmodule-2.0 \ - gssdp-1.0 >= 0.7.1 \ - libsoup-2.4 >= 2.4.1 \ + gssdp-1.0 >= 0.13.0 \ + libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID) - PKG_CHECK_MODULES(GTHREAD, gthread-2.0) -AC_ARG_WITH([context_manager], +AM_CONDITIONAL(OS_WIN32, test "x$os_win32" = "xyes") +if test "x$os_win32" = "xno"; then + AC_ARG_WITH([context_manager], AS_HELP_STRING( - [--with-context-manager=@<:@network-manager/unix@:>@], + [--with-context-manager=@<:@network-manager/connman/unix/linux@:>@], [Context Manager backend to use]),, - [with_context_manager="unix"]) + [with_context_manager="none"]) +else + LIBGUPNP_LIBS="$LIBGUPNP_LIBS -lrpcrt4" + with_context_manager="windows" +fi + +if test "x$with_context_manager" = "xnone"; then + case "$target_os" in + linux*) + with_context_manager="linux" + ;; + *) + with_context_manager="unix" + ;; + esac +fi + +AC_CHECK_HEADERS([sys/socket.h linux/rtnetlink.h], + [ HAVE_NETLINK=yes ], + [ HAVE_NETLINK=no ], + [ #ifdef HAVE_SYS_SOCKET_H + #include + #endif + ]) +AM_CONDITIONAL([HAVE_NETLINK], [test "x$HAVE_NETLINK" = "xyes"]) +AC_SUBST(HAVE_NETLINK) + +AC_CHECK_HEADERS([linux/wireless.h], [], [], + [ #ifdef HAVE_SYS_SOCKET_H + #include + #endif + ]) AC_MSG_CHECKING([Context Manager backend to use]) AC_MSG_RESULT([${with_context_manager}]) AM_CONDITIONAL([USE_NETWORK_MANAGER], [test "x$with_context_manager" = "xnetwork-manager"]) +AS_IF([test "x$with_context_manager" = "xnetwork-manager"], + [PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.26)]) + +AM_CONDITIONAL([USE_CONNMAN], + [test "x$with_context_manager" = "xconnman"]) -USE_CONIC=no -if test "x$with_context_manager" = "xunix"; then - dnl Use libconic if it's available - PKG_CHECK_MODULES(LIBCONIC, conic >= 0.13, - [ USE_CONIC=yes - AC_SUBST(LIBCONIC_CFLAGS) - AC_SUBST(LIBCONIC_LIBS) - ], - [ USE_CONIC=no - AC_MSG_WARN([conic 0.13 or greater not found.]) - ]) +if test "x$with_context_manager" = "xconnman"; then + PKG_CHECK_MODULES(CONNMAN, glib-2.0 >= 2.28 connman >= 0.80) fi -AM_CONDITIONAL(USE_CONIC, test x$USE_CONIC = xyes) -AC_SUBST(USE_CONIC) +USE_NETLINK=no +AS_IF([test "x$with_context_manager" = "xlinux"], + [AS_IF([test "x$HAVE_NETLINK" = "xno"], + [AC_MSG_NOTICE([No rtnetlink found, falling back to static context manager])], + [USE_NETLINK=yes]) + ],[]) -# We need dbus-glib if either NetworkManager or libconic is used -if test "x$with_context_manager" = "xnetwork-manager" -o \ - "x$with_context_manager" = "xunix" -a \ - "x$USE_CONIC" = "xyes"; then - PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.76) -fi +AM_CONDITIONAL(USE_NETLINK, test "x$USE_NETLINK" = "xyes") +AC_SUBST(USE_NETLINK) # glib-genmarshal GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` @@ -83,7 +125,7 @@ AC_SUBST(GLIB_GENMARSHAL) # Debugging AC_ARG_ENABLE(debug, - [ --enable-debug enable debugging],, + AS_HELP_STRING([--enable-debug], [enable debugging]),, enable_debug=no) if test "x$enable_debug" = "xyes"; then CFLAGS="$CFLAGS -g -Wall -Werror" @@ -91,17 +133,49 @@ fi GOBJECT_INTROSPECTION_CHECK([0.6.4]) +# vapigen +have_vapigen=no +AS_IF([test "x$found_introspection" = "xyes"], + [ + dnl output of g-i >= 1.36.0 needs vapigen >= 0.20 to process + AC_MSG_CHECKING([whether G-I is 1.36 or newer]) + VAPIGEN_MIN_VERSION=0.14 + AS_IF([pkg-config --atleast-version=1.36.0 gobject-introspection-1.0], + [ + AC_MSG_RESULT([yes]) + VAPIGEN_MIN_VERSION=0.20 + ],[AC_MSG_RESULT([no])] + ) + GUPNP_PROG_VAPIGEN([$VAPIGEN_MIN_VERSION]) + ] +) +AS_IF([test "x$VAPIGEN" != "x"], [have_vapigen=yes]) +AM_CONDITIONAL([HAVE_VAPIGEN], [test "x$VAPIGEN" != "x"]) + # Gtk-doc -GTK_DOC_CHECK([1.0]) +GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile libgupnp/Makefile examples/Makefile tools/Makefile tests/Makefile +tests/gtest/Makefile doc/Makefile doc/version.xml +vala/Makefile gupnp-1.0.pc gupnp-1.0-uninstalled.pc ]) +AC_OUTPUT + +echo " + ${PACKAGE} ${VERSION} + --------------------- + + Prefix: ${prefix} + GObject-Introspection: ${found_introspection} + VALA bindings: ${have_vapigen} + Context manager: ${with_context_manager} +" diff --git a/doc/Makefile.am b/doc/Makefile.am index af34552..2e92132 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -11,29 +11,37 @@ AUTOMAKE_OPTIONS = 1.6 # The name of the module, e.g. 'glib'. DOC_MODULE=gupnp +# Uncomment for versioned docs and specify the version of the module, e.g. '2'. +#DOC_MODULE_VERSION=2 + + # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml -# The directory containing the source code. Relative to $(srcdir). -# gtk-doc will search all .c & .h files beneath here for inline comments -# documenting the functions and macros. -# e.g. DOC_SOURCE_DIR=../../../gtk +# Directories containing the source code. +# gtk-doc will search all .c and .h files beneath these paths +# for inline comments documenting functions and macros. +# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR=../libgupnp # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS=--deprecated-guards="GUPNP_DISABLE_DEPRECATED" # Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml -MKDB_OPTIONS=--sgml-mode --output-format=xml +# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml +MKDB_OPTIONS=--xml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS= +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS= + # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS= @@ -44,14 +52,19 @@ FIXXREF_OPTIONS= HFILE_GLOB=$(top_srcdir)/libgupnp/*.h CFILE_GLOB=$(top_srcdir)/libgupnp/*.c -# Header files to ignore when scanning. -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h +# Extra header to include when scanning, which are not under DOC_SOURCE_DIR +# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h +EXTRA_HFILES= + +# Header files or dirs to ignore when scanning. Use base file/dir names +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES=gena-protocol.h \ xml-util.h \ gvalue-util.h \ http-headers.h \ gupnp-marshal.h \ gupnp-context-private.h \ + gupnp-linux-context-manager.h \ gupnp-network-manager.h \ gupnp-unix-context-manager.h \ gupnp-device-info-private.h \ @@ -76,9 +89,9 @@ expand_content_files=client-tutorial.xml server-tutorial.xml # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. -# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES=-I$(top_srcdir) $(LIBGUPNP_CFLAGS) +GTKDOC_CFLAGS=-I$(top_srcdir) $(LIBGUPNP_CFLAGS) GTKDOC_LIBS=$(top_builddir)/libgupnp/libgupnp-1.0.la $(LIBGUPNP_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. @@ -87,3 +100,19 @@ include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST += version.xml.in + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks +if ENABLE_GTK_DOC +TESTS_ENVIRONMENT = cd $(srcdir) && \ + DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) +# TESTS = $(GTKDOC_CHECK) +endif + +-include $(top_srcdir)/git.mk diff --git a/doc/Makefile.in b/doc/Makefile.in index aaabef6..65cf76b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -21,6 +21,23 @@ # Everything below here is generic # #################################### VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -39,6 +56,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make subdir = doc @@ -47,21 +65,26 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version.xml CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -74,13 +97,14 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ -DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -89,28 +113,34 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ -LIBCONIC_LIBS = @LIBCONIC_LIBS@ LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ LIBOBJS = @LIBOBJS@ @@ -121,6 +151,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -144,12 +175,14 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -USE_CONIC = @USE_CONIC@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -182,7 +215,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -194,7 +226,11 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -210,29 +246,36 @@ AUTOMAKE_OPTIONS = 1.6 # The name of the module, e.g. 'glib'. DOC_MODULE = gupnp +# Uncomment for versioned docs and specify the version of the module, e.g. '2'. +#DOC_MODULE_VERSION=2 + # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml -# The directory containing the source code. Relative to $(srcdir). -# gtk-doc will search all .c & .h files beneath here for inline comments -# documenting the functions and macros. -# e.g. DOC_SOURCE_DIR=../../../gtk +# Directories containing the source code. +# gtk-doc will search all .c and .h files beneath these paths +# for inline comments documenting functions and macros. +# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk DOC_SOURCE_DIR = ../libgupnp # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS = --deprecated-guards="GUPNP_DISABLE_DEPRECATED" # Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml -MKDB_OPTIONS = --sgml-mode --output-format=xml +# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml +MKDB_OPTIONS = --xml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS = +# Extra options to supply to gtkdoc-mkhtml +MKHTML_OPTIONS = + # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = @@ -243,14 +286,19 @@ FIXXREF_OPTIONS = HFILE_GLOB = $(top_srcdir)/libgupnp/*.h CFILE_GLOB = $(top_srcdir)/libgupnp/*.c -# Header files to ignore when scanning. -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h +# Extra header to include when scanning, which are not under DOC_SOURCE_DIR +# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h +EXTRA_HFILES = + +# Header files or dirs to ignore when scanning. Use base file/dir names +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES = gena-protocol.h \ xml-util.h \ gvalue-util.h \ http-headers.h \ gupnp-marshal.h \ gupnp-context-private.h \ + gupnp-linux-context-manager.h \ gupnp-network-manager.h \ gupnp-unix-context-manager.h \ gupnp-device-info-private.h \ @@ -276,14 +324,14 @@ expand_content_files = client-tutorial.xml server-tutorial.xml # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. -# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES = -I$(top_srcdir) $(LIBGUPNP_CFLAGS) +GTKDOC_CFLAGS = -I$(top_srcdir) $(LIBGUPNP_CFLAGS) GTKDOC_LIBS = $(top_builddir)/libgupnp/libgupnp-1.0.la $(LIBGUPNP_LIBS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute @@ -294,18 +342,21 @@ GTKDOC_LIBS = $(top_builddir)/libgupnp/libgupnp-1.0.la $(LIBGUPNP_LIBS) # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) +SETUP_FILES = \ + $(content_files) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + # This includes the standard gtk-doc make rules, copied by gtkdocize. # Other files to distribute # e.g. EXTRA_DIST += version.xml.in -EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt \ - version.xml.in -DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ - pdf-build.stamp \ - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ - $(srcdir)/pdf.stamp +EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) version.xml.in +DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -324,6 +375,18 @@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp + +# Files not to distribute +# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types +# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt +#DISTCLEANFILES += + +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks +@ENABLE_GTK_DOC_TRUE@TESTS_ENVIRONMENT = cd $(srcdir) && \ +@ENABLE_GTK_DOC_TRUE@ DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ +@ENABLE_GTK_DOC_TRUE@ SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) + all: all-am .SUFFIXES: @@ -348,6 +411,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/gtk-doc.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -419,10 +483,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -526,22 +595,44 @@ docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp +#### setup #### + +setup-build.stamp: + -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + echo ' DOC Preparing build'; \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + test -f $(abs_srcdir)/$$file && \ + cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ + done; \ + fi; \ + fi + @touch setup-build.stamp + #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo 'gtk-doc: Scanning header files' - @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + @echo ' DOC Scanning header files' + @_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + echo " DOC Introspecting gobjects"; \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ + fi; \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ - cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ + test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp @@ -549,30 +640,15 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -#### templates #### - -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - @echo 'gtk-doc: Rebuilding template files' - @-chmod -R u+w $(srcdir) - @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - @touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - #### xml #### -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - @echo 'gtk-doc: Building XML' - @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) + @echo ' DOC Building XML' + @_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + done ; \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @@ -581,58 +657,78 @@ sgml.stamp: sgml-build.stamp #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building HTML' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/html - @mkdir $(srcdir)/html + @echo ' DOC Building HTML' + @rm -rf html + @mkdir html @mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkhtml_options="$$mkhtml_options --verbose"; \ + fi; \ + fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ - mkhtml_options=--path="$(srcdir)"; \ + mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ - cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) - @echo 'gtk-doc: Fixing cross-references' - @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + -@test "x$(HTML_IMAGES)" = "x" || \ + for file in $(HTML_IMAGES) ; do \ + if test -f $(abs_srcdir)/$$file ; then \ + cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + fi; \ + if test -f $(abs_builddir)/$$file ; then \ + cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + fi; \ + done; + @echo ' DOC Fixing cross-references' + @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building PDF' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/$(DOC_MODULE).pdf - @mkpdf_imgdirs=""; \ + @echo ' DOC Building PDF' + @rm -f $(DOC_MODULE).pdf + @mkpdf_options=""; \ + gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkpdf_options="$$mkpdf_options --verbose"; \ + fi; \ + fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ - echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ + echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ - mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ + mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ - cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: - rm -f *~ *.bak - rm -rf .libs + @rm -f *~ *.bak + @rm -rf .libs distclean-local: - cd $(srcdir) && \ - rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ + fi maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html + @rm -rf xml html install-data-local: - @installfiles=`echo $(srcdir)/html/*`; \ - if test "$$installfiles" = '$(srcdir)/html/*'; \ - then echo '-- Nothing to install' ; \ + @installfiles=`echo $(builddir)/html/*`; \ + if test "$$installfiles" = '$(builddir)/html/*'; \ + then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ @@ -641,14 +737,12 @@ install-data-local: fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ + echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - mv -f $${installdir}/$(DOC_MODULE).devhelp \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi @@ -670,17 +764,18 @@ uninstall-local: @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local - mkdir $(distdir)/tmpl - mkdir $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - cp $(srcdir)/html/* $(distdir)/html - -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ - cd $(distdir) && rm -f $(DISTCLEANFILES) - $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + @mkdir $(distdir)/html + @cp ./html/* $(distdir)/html + @-cp ./$(DOC_MODULE).pdf $(distdir)/ + @-cp ./$(DOC_MODULE).types $(distdir)/ + @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ + @cd $(distdir) && rm -f $(DISTCLEANFILES) + @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs +# TESTS = $(GTKDOC_CHECK) + +-include $(top_srcdir)/git.mk # 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 --git a/doc/client-tutorial.xml b/doc/client-tutorial.xml index e764606..0373d68 100644 --- a/doc/client-tutorial.xml +++ b/doc/client-tutorial.xml @@ -47,8 +47,9 @@ main (int argc, char **argv) GUPnPControlPoint *cp; /* Required initialisation */ - g_thread_init (NULL); - g_type_init (); + #if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); + #endif /* Create a new GUPnP Context. By here we are using the default GLib main context, and connecting to the current machine's default IP on an @@ -138,7 +139,7 @@ service_proxy_available_cb (GUPnPControlPoint *cp, It is possible to get change notifications for the service state variables that have attribute sendEvents="yes". We'll demonstrate - this by modifying service_proxy_available_cb() and using + this by modifying service_proxy_available_cb and using gupnp_service_proxy_add_notify() to setup a notification callback: static void diff --git a/doc/glossary.xml b/doc/glossary.xml index f6b60db..7c41f7c 100644 --- a/doc/glossary.xml +++ b/doc/glossary.xml @@ -163,7 +163,7 @@ A common practise is to generate a unique UDN on first boot from a - random seed, or use some unique and persistant property such as the + random seed, or use some unique and persistent property such as the device's MAC address to create the UDN. diff --git a/doc/gupnp-docs.xml b/doc/gupnp-docs.xml index 94c96e3..d7fb919 100644 --- a/doc/gupnp-docs.xml +++ b/doc/gupnp-docs.xml @@ -75,6 +75,7 @@ + diff --git a/doc/gupnp-sections.txt b/doc/gupnp-sections.txt index 4c3eecd..e0cd73c 100644 --- a/doc/gupnp-sections.txt +++ b/doc/gupnp-sections.txt @@ -43,6 +43,7 @@ gupnp_device_info_get_presentation_url gupnp_device_info_get_upc gupnp_device_info_get_icon_url gupnp_device_info_list_dlna_capabilities +gupnp_device_info_list_dlna_device_class_identifier gupnp_device_info_get_description_value gupnp_device_info_list_devices gupnp_device_info_list_device_types @@ -119,6 +120,7 @@ gupnp_service_action_set_values gupnp_service_action_return gupnp_service_action_return_error gupnp_service_action_get_message +gupnp_service_action_get_argument_count gupnp_service_notify gupnp_service_notify_valist gupnp_service_notify_value @@ -135,6 +137,7 @@ GUPNP_SERVICE_CLASS GUPNP_IS_SERVICE_CLASS GUPNP_SERVICE_GET_CLASS GUPNP_TYPE_SERVICE_ACTION +gupnp_service_action_get_type GUPnPServicePrivate @@ -150,6 +153,7 @@ gupnp_root_device_get_available gupnp_root_device_get_relative_location gupnp_root_device_get_description_dir gupnp_root_device_get_description_path +gupnp_root_device_get_ssdp_resource_group GUPnPRootDeviceClass GUPNP_ROOT_DEVICE @@ -174,6 +178,8 @@ gupnp_context_get_server gupnp_context_get_session gupnp_context_set_subscription_timeout gupnp_context_get_subscription_timeout +gupnp_context_get_default_language +gupnp_context_set_default_language gupnp_context_host_path gupnp_context_host_path_for_agent gupnp_context_unhost_path @@ -195,8 +201,12 @@ GUPnPContextPrivate GUPnPContextManager GUPnPContextManager gupnp_context_manager_new +gupnp_context_manager_create +gupnp_context_manager_rescan_control_points gupnp_context_manager_manage_control_point gupnp_context_manager_manage_root_device +gupnp_context_manager_get_port +gupnp_context_manager_get_white_list GUPnPContextManagerClass GUPNP_CONTEXT_MANAGER @@ -381,3 +391,83 @@ gupnp_eventing_error_quark gupnp_control_error_quark gupnp_xml_error_quark + +
+gupnp-connman-manager + +GUPNP_CONNMAN_MANAGER +GUPNP_CONNMAN_MANAGER_CLASS +GUPNP_CONNMAN_MANAGER_GET_CLASS +GUPNP_IS_CONNMAN_MANAGER +GUPNP_IS_CONNMAN_MANAGER_CLASS +GUPNP_TYPE_CONNMAN_MANAGER +GUPnPConnmanManager +GUPnPConnmanManagerClass +GUPnPConnmanManagerPrivate +
+ +
+gupnp-simple-context-manager + +GUPNP_IS_SIMPLE_CONTEXT_MANAGER +GUPNP_IS_SIMPLE_CONTEXT_MANAGER_CLASS +GUPNP_SIMPLE_CONTEXT_MANAGER +GUPNP_SIMPLE_CONTEXT_MANAGER_CLASS +GUPNP_SIMPLE_CONTEXT_MANAGER_GET_CLASS +GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER +GUPnPSimpleContextManager +GUPnPSimpleContextManagerClass +GUPnPSimpleContextManagerPrivate +
+ +
+gupnp-windows-context-manager + +GUPNP_IS_WINDOWS_CONTEXT_MANAGER +GUPNP_IS_WINDOWS_CONTEXT_MANAGER_CLASS +GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER +GUPNP_WINDOWS_CONTEXT_MANAGER +GUPNP_WINDOWS_CONTEXT_MANAGER_CLASS +GUPNP_WINDOWS_CONTEXT_MANAGER_GET_CLASS +GUPnPWindowsContextManager +GUPnPWindowsContextManagerClass +gupnp_windows_context_manager_get_type +
+ +
+gupnp-unix-context-manager +
+ +
+gupnp-linux-context-manager +
+ +
+gupnp-network-manager +
+ +
+gupnp-white-list +GUPnPWhiteList +GUPnPWhiteList +gupnp_white_list_add_entry +gupnp_white_list_check_context +gupnp_white_list_clear +gupnp_white_list_set_enabled +gupnp_white_list_get_entries +gupnp_white_list_is_empty +gupnp_white_list_get_enabled +gupnp_white_list_new +gupnp_white_list_remove_entry + +gupnp_white_list_get_type +GUPNP_IS_WHITE_LIST +GUPNP_IS_WHITE_LIST_CLASS +GUPNP_TYPE_WHITE_LIST +GUPNP_WHITE_LIST +GUPNP_WHITE_LIST_CLASS +GUPNP_WHITE_LIST_GET_CLASS +GUPnPWhiteListClass + +GUPnPWhiteListPrivate +
diff --git a/doc/html/GUPnPContext.html b/doc/html/GUPnPContext.html index 3ae6895..dd20240 100644 --- a/doc/html/GUPnPContext.html +++ b/doc/html/GUPnPContext.html @@ -3,12 +3,12 @@ GUPnPContext - + - + @@ -27,6 +27,8 @@  |  Object Hierarchy  |  + Implemented Interfaces +  |  Properties @@ -41,20 +43,23 @@

Synopsis

-
                    GUPnPContext;
+
struct              GUPnPContext;
 GUPnPContext *      gupnp_context_new                   (GMainContext *main_context,
-                                                         const char *interface,
+                                                         const char *iface,
                                                          guint port,
                                                          GError **error);
 const char *        gupnp_context_get_host_ip           (GUPnPContext *context);
 guint               gupnp_context_get_port              (GUPnPContext *context);
-SoupServer *        gupnp_context_get_server            (GUPnPContext *context);
-SoupSession *       gupnp_context_get_session           (GUPnPContext *context);
+SoupServer *        gupnp_context_get_server            (GUPnPContext *context);
+SoupSession *       gupnp_context_get_session           (GUPnPContext *context);
 void                gupnp_context_set_subscription_timeout
                                                         (GUPnPContext *context,
                                                          guint timeout);
 guint               gupnp_context_get_subscription_timeout
                                                         (GUPnPContext *context);
+const char *        gupnp_context_get_default_language  (GUPnPContext *context);
+void                gupnp_context_set_default_language  (GUPnPContext *context,
+                                                         const char *language);
 void                gupnp_context_host_path             (GUPnPContext *context,
                                                          const char *local_path,
                                                          const char *server_path);
@@ -70,16 +75,23 @@ const char *        

Object Hierarchy

   GObject
-   +----GSSDPClient
+   +----GSSDPClient
          +----GUPnPContext
 
+

Implemented Interfaces

+

+GUPnPContext implements + GInitable.

+
+

Properties

+  "default-language"         gchar*                : Read / Write / Construct
   "port"                     guint                 : Read / Write / Construct Only
-  "server"                   SoupServer*           : Read
-  "session"                  SoupSession*          : Read
+  "server"                   SoupServer*           : Read
+  "session"                  SoupSession*          : Read
   "subscription-timeout"     guint                 : Read / Write / Construct Only
 
@@ -91,53 +103,48 @@ GUPnP classes. It automatically starts a web server on demand.

For debugging, it is possible to see the messages being sent and received by -exporting GUPNP_DEBUG. -

-

+exporting GUPNP_DEBUG.

Details

-

GUPnPContext

-
typedef struct _GUPnPContext GUPnPContext;
+

struct GUPnPContext

+
struct GUPnPContext;

This struct contains private data only, and should be accessed using the functions below.

-

-


gupnp_context_new ()

GUPnPContext *      gupnp_context_new                   (GMainContext *main_context,
-                                                         const char *interface,
+                                                         const char *iface,
                                                          guint port,
                                                          GError **error);

-Create a new GUPnPContext with the specified main_context, interface and +Create a new GUPnPContext with the specified main_context, iface and port.

-

-

- - - + - + @@ -146,8 +153,7 @@ Create a new - +

main_context :

A GMainContext, or NULL to use the default one +Deprecated: 0.17.2: Always set to NULL. If you +want to use a different context, use g_main_context_push_thread_default(). [allow-none]

interface :

The network interface to use, or NULL to auto-detect. +

iface :

The network interface to use, or NULL to +auto-detect. [allow-none]

port :

Port to run on, or 0 if you don't care what port is used. -Port to run on, or 0 if you don't care what port is used.

error :

Returns :

A new GUPnPContext object, or NULL on an error -A new GUPnPContext object, or NULL on an error
@@ -159,14 +165,12 @@ Create a new

Warning

gupnp_context_get_host_ip has been deprecated since version 0.12.7 and should not be used in newly-written code. The "host-ip" property has moved to the base class -GSSDPClient so newer applications should use -gssdp_client_get_host_ip instead.

+GSSDPClient so newer applications should use +gssdp_client_get_host_ip instead.

Get the IP address we advertise ourselves as using.

-

-

@@ -177,9 +181,7 @@ Get the IP address we advertise ourselves as using. - +

Returns :

The IP address. This string should not be freed. - -The IP address. This string should not be freed.
@@ -191,8 +193,6 @@ Get the IP address we advertise ourselves as using.

Get the port that the SOAP server is running on.

-

-

@@ -203,8 +203,7 @@ Get the port that the SOAP server is running on. - +

Returns :

The port the SOAP server is running on. -The port the SOAP server is running on.
@@ -212,11 +211,9 @@ Get the port that the SOAP server is running on.

gupnp_context_get_server ()

-
SoupServer *        gupnp_context_get_server            (GUPnPContext *context);
-

-Get the SoupServer HTTP server that GUPnP is using. -

+
SoupServer *        gupnp_context_get_server            (GUPnPContext *context);

+Get the SoupServer HTTP server that GUPnP is using.

@@ -228,7 +225,7 @@ Get the SoupServer HTTP server that GUPnP is using. - @@ -237,11 +234,9 @@ Get the SoupServer HTTP server that GUPnP is using.

gupnp_context_get_session ()

-
SoupSession *       gupnp_context_get_session           (GUPnPContext *context);
-

-Get the SoupSession object that GUPnP is using. -

+
SoupSession *       gupnp_context_get_session           (GUPnPContext *context);

+Get the SoupSession object that GUPnP is using.

Returns :

The SoupServer used by GUPnP. Do not unref this when finished. +The SoupServer used by GUPnP. Do not unref this when finished. [transfer none]
@@ -253,7 +248,7 @@ Get the SoupSession object that GUPnP is using. - @@ -271,8 +266,6 @@ Sets the event subscription timeout to timeout -

-

Returns :

The SoupSession used by GUPnP. Do not unref +The SoupSession used by GUPnP. Do not unref this when finished. [transfer none]
@@ -283,8 +276,7 @@ will automatically be renewed. - +

timeout :

Event subscription timeout in seconds -Event subscription timeout in seconds
@@ -298,7 +290,27 @@ will automatically be renewed. Get the event subscription timeout (in seconds), or 0 meaning there is no timeout.

+
++ + + + + + + + + + +

context :

A GUPnPContext +

Returns :

The event subscription timeout in seconds.
+
+
+
+

gupnp_context_get_default_language ()

+
const char *        gupnp_context_get_default_language  (GUPnPContext *context);

+Get the default Content-Language header for this context.

@@ -310,9 +322,39 @@ timeout. - + + +

Returns :

The event subscription timeout in seconds. +The default content of the Content-Language +header. [transfer none] +
+
+
+
+

gupnp_context_set_default_language ()

+
void                gupnp_context_set_default_language  (GUPnPContext *context,
+                                                         const char *language);
+

+Set the default language for the Content-Length header to language. +

+

+If the client sends an Accept-Language header the UPnP HTTP server +is required to send a Content-Language header in return. If there are +no files hosted in languages which match the requested ones the +Content-Language header is set to this value. The default value is "en". +

+
++ + + + + + + +

context :

A GUPnPContext

language :

A language tag as defined in RFC 2616 3.10
@@ -327,8 +369,6 @@ Start hosting local_path at local_path.LOCALE (if they exist) will be served up when LOCALE is specified in the request's Accept-Language header.

-

-

@@ -339,13 +379,11 @@ specified in the request's Accept-Language header. - + - +

local_path :

Path to the local file or folder to be hosted -Path to the local file or folder to be hosted

server_path :

Web server path where local_path should be hosted -Web server path where local_path should be hosted
@@ -361,8 +399,6 @@ specified in the request's Accept-Language header. Use this method to serve different local path to specific user-agent(s). The path server_path must already be hosted by context.

-

-

@@ -373,23 +409,20 @@ path server_path must already be hosted - + - + - + - +

local_path :

Path to the local file or folder to be hosted -Path to the local file or folder to be hosted

server_path :

Web server path already being hosted -Web server path already being hosted

user_agent :

The user-agent as a GRegex. -The user-agent as a GRegex.

Returns :

TRUE on success, FALSE otherwise. - +TRUE on success, FALSE otherwise.
@@ -402,8 +435,6 @@ path server_path must already be hosted

Stop hosting the file or folder at server_path.

-

-

@@ -414,8 +445,7 @@ Stop hosting the file or folder at server_path - +

server_path :

Web server path where the file or folder is hosted -Web server path where the file or folder is hosted
@@ -424,33 +454,38 @@ Stop hosting the file or folder at server_path

Property Details

+

The "default-language" property

+
  "default-language"         gchar*                : Read / Write / Construct
+

+The content of the Content-Language header id the client +sends Accept-Language and no language-specific pages to serve +exist. The property defaults to 'en'. +

+

Default value: "en"

+
+
+

The "port" property

  "port"                     guint                 : Read / Write / Construct Only

The port to run on. Set to 0 if you don't care what port to run on.

-

-

Default value: 0


The "server" property

-
  "server"                   SoupServer*           : Read
-

-The SoupServer HTTP server used by GUPnP. -

+
  "server"                   SoupServer*           : Read

+The SoupServer HTTP server used by GUPnP.


The "session" property

-
  "session"                  SoupSession*          : Read
-

-The SoupSession object used by GUPnP. -

+
  "session"                  SoupSession*          : Read

+The SoupSession object used by GUPnP.


@@ -462,8 +497,6 @@ The preferred subscription timeout: the number of seconds after which subscriptions are renewed. Set to '0' if subscriptions are never to time out.

-

-

Allowed values: <= 604800

Default value: 1800

@@ -471,6 +504,6 @@ are never to time out. + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPContextManager.html b/doc/html/GUPnPContextManager.html index 1bbe18d..97b7da3 100644 --- a/doc/html/GUPnPContextManager.html +++ b/doc/html/GUPnPContextManager.html @@ -3,12 +3,12 @@ GUPnPContextManager - + - - + + @@ -18,7 +18,7 @@ Up Home GUPnP Reference Manual -Next +Next Top @@ -43,15 +43,21 @@
@@ -64,16 +70,16 @@

Properties

-  "context-manager"          GUPnPContextManager*  : Write / Construct Only
   "main-context"             gpointer              : Read / Write / Construct Only
   "port"                     guint                 : Read / Write / Construct Only
+  "white-list"               GUPnPWhiteList*       : Read
 
@@ -83,47 +89,71 @@ A Utility class that takes care of creation and destruction of GUPnPContext objects for all available network interfaces as they go up (connect) and down (disconnect), respectively.

-

-

Details

-

GUPnPContextManager

-
typedef struct _GUPnPContextManager GUPnPContextManager;
+

struct GUPnPContextManager

+
struct GUPnPContextManager;

This struct contains private data only, and should be accessed using the functions below.

-

-


gupnp_context_manager_new ()

GUPnPContextManager * gupnp_context_manager_new         (GMainContext *main_context,
                                                          guint port);
+
+

Warning

+

gupnp_context_manager_new has been deprecated since version 0.17.2 and should not be used in newly-written code. Use gupnp_context_manager_create().

+

-Create a new GUPnPContextManager. -

-

+Same as gupnp_context_manager_create().

- - + + + + + +

main_context :

GMainContext to pass to created GUPnPContext objects. +Deprecated: 0.17.2: NULL. If you want to use +a different main context use +g_main_context_push_thread_default() instead. [allow-none]

port :

Port to create contexts for, or 0 if you don't care what port is used. +Port to create contexts for, or 0 if you don't care what port is used.

Returns :

A new GUPnPContextManager object. [transfer full]
+
+
+
+

gupnp_context_manager_create ()

+
GUPnPContextManager * gupnp_context_manager_create      (guint port);
+

+Factory-method to create a new GUPnPContextManager. The final type of the +GUPnPContextManager depends on the compile-time selection or - in case of +NetworkManager - on its availability during runtime. If it is not available, +the implementation falls back to the basic Unix context manager instead. +

+
++ + + + + - @@ -131,6 +161,26 @@ Create a new +

gupnp_context_manager_rescan_control_points ()

+
void                gupnp_context_manager_rescan_control_points
+                                                        (GUPnPContextManager *manager);
+

+This function starts a rescan on every control point managed by manager. +Only the active control points send discovery messages. +This function should be called when servers are suspected to have +disappeared. +

+

port :

Port to create contexts for, or 0 if you don't care what port is used.

Returns :

A new GUPnPContextManager object. +A new GUPnPContextManager object. [transfer full]
++ + + + +

manager :

A GUPnPContextManager +
+
+
+

gupnp_context_manager_manage_control_point ()

void                gupnp_context_manager_manage_control_point
                                                         (GUPnPContextManager *manager,
@@ -142,8 +192,6 @@ You usually want to call this function from
 "context-available" handler after you create a
 GUPnPControlPoint object for the newly available context.
 

-

-

@@ -154,8 +202,7 @@ You usually want to call this function from - +

control_point :

The GUPnPControlPoint to be taken care of -The GUPnPControlPoint to be taken care of
@@ -173,8 +220,6 @@ usually want to call this function from "context-available" handler after you create a GUPnPRootDevice object for the newly available context.

-

-

@@ -185,27 +230,61 @@ usually want to call this function from - +

root_device :

The GUPnPRootDevice to be taken care of -The GUPnPRootDevice to be taken care of
-
-
-

Property Details

+
-

The "context-manager" property

-
  "context-manager"          GUPnPContextManager*  : Write / Construct Only
+

gupnp_context_manager_get_port ()

+
guint               gupnp_context_manager_get_port      (GUPnPContextManager *manager);

-The actual GUPnPContextManager implementation used. This is an -internal property and therefore Application developer should just -ignore it. +Get the network port associated with this context manager.

+
++ + + + + + + + + + +

manager :

A GUPnPContextManager +

Returns :

The network port asssociated with this context manager.
+
+
+
+

gupnp_context_manager_get_white_list ()

+
GUPnPWhiteList *    gupnp_context_manager_get_white_list
+                                                        (GUPnPContextManager *manager);

+Get the GUPnPWhiteList associated with manager.

+
++ + + + + + + + + + +

manager :

A GUPnPContextManager +

Returns :

The GUPnPWhiteList asssociated with this +context manager. [transfer none] +
-
+
+
+

Property Details

The "main-context" property

  "main-context"             gpointer              : Read / Write / Construct Only
@@ -216,12 +295,18 @@ ignore it.

The "port" property

  "port"                     guint                 : Read / Write / Construct Only

-port: Port to create contexts for, or 0 if you don't care what +Port the contexts listen on, or 0 if you don't care what port is used by GUPnPContext objects created by this object.

+

Default value: 0

+
+
+
+

The "white-list" property

+
  "white-list"               GUPnPWhiteList*       : Read

+The white list to use.

-

Default value: 0

@@ -230,19 +315,16 @@ port is used by

The "context-available" signal

void                user_function                      (GUPnPContextManager *context_manager,
                                                         GUPnPContext        *context,
-                                                        gpointer             user_data)            : Run Last
+ gpointer user_data) : Run First

Signals the availability of new GUPnPContext.

-

-

- + @@ -261,19 +343,16 @@ Signals the availability of new

The "context-unavailable" signal

void                user_function                      (GUPnPContextManager *context_manager,
                                                         GUPnPContext        *context,
-                                                        gpointer             user_data)            : Run Last
+ gpointer user_data) : Run First

Signals the unavailability of a GUPnPContext.

-

-

context_manager :

The GUPnPContextManager that received the signal -The GUPnPContextManager that received the signal

context :

- + @@ -291,6 +370,6 @@ Signals the unavailability of a
- Generated by GTK-Doc V1.15.1 + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPControlPoint.html b/doc/html/GUPnPControlPoint.html index f5e63fb..ee7e7d6 100644 --- a/doc/html/GUPnPControlPoint.html +++ b/doc/html/GUPnPControlPoint.html @@ -3,12 +3,12 @@ GUPnPControlPoint - + - + @@ -43,7 +43,7 @@

context_manager :

The GUPnPContextManager that received the signal -The GUPnPContextManager that received the signal

context :

Synopsis

-
                    GUPnPControlPoint;
+
struct              GUPnPControlPoint;
 GUPnPControlPoint * gupnp_control_point_new             (GUPnPContext *context,
                                                          const char *target);
 GUPnPControlPoint * gupnp_control_point_new_full        (GUPnPContext *context,
@@ -62,7 +62,7 @@ const 

Object Hierarchy

   GObject
-   +----GSSDPResourceBrowser
+   +----GSSDPResourceBrowser
          +----GUPnPControlPoint
 
@@ -85,26 +85,22 @@ const

Description

GUPnPControlPoint handles device and service discovery. After creating -a control point and activating it using gssdp_resource_browser_set_active(), +a control point and activating it using gssdp_resource_browser_set_active(), the ::device-proxy-available, ::service-proxy-available, ::device-proxy-unavailable and ::service-proxy-unavailable signals will be emitted whenever the availability of a device or service matching the specified discovery target changes.

-

-

Details

-

GUPnPControlPoint

-
typedef struct _GUPnPControlPoint GUPnPControlPoint;
+

struct GUPnPControlPoint

+
struct GUPnPControlPoint;

This struct contains private data only, and should be accessed using the functions below.

-

-


@@ -119,8 +115,6 @@ Create a new urn:schemas-upnp-org:service:WANIPConnection:1 or urn:schemas-upnp-org:device:MediaRenderer:1.

-

-

@@ -131,13 +125,11 @@ Create a new target :

-
+ - +
The search target -The search target

Returns :

A new GUPnPControlPoint object. -A new GUPnPControlPoint object.
@@ -157,8 +149,6 @@ Create a new urn:schemas-upnp-org:service:WANIPConnection:1 or urn:schemas-upnp-org:device:MediaRenderer:1.

-

-

@@ -174,13 +164,11 @@ Create a new target :

-
+ - +
The search target -The search target

Returns :

A new GUPnPControlPoint object. -A new GUPnPControlPoint object.
@@ -193,8 +181,6 @@ Create a new GUPnPResourceFactory used by the control_point.

-

-

@@ -205,7 +191,7 @@ Get the Returns :

-
@@ -218,8 +204,6 @@ Get the GUPnPControlPoint associated with control_point.

-

-

A GUPnPResourceFactory. +A GUPnPResourceFactory. [transfer none]
@@ -230,7 +214,7 @@ Get the - @@ -245,8 +229,6 @@ Get the Get the GList of discovered GUPnPDeviceProxy objects. Do not free the list nor its elements.

-

-

Returns :

The GUPnPContext. +The GUPnPContext. [transfer none]
@@ -257,7 +239,7 @@ nor its elements. - @@ -273,8 +255,6 @@ nor its elements. Get the GList of discovered GUPnPServiceProxy objects. Do not free the list nor its elements.

-

-

Returns :

a GList of +a GList of GUPnPDeviceProxy objects. [element-type GUPnP.DeviceProxy][transfer none]
@@ -285,8 +265,8 @@ list nor its elements. - @@ -301,8 +281,6 @@ of The resource factory to use. Set to NULL for default factory.

-

-

@@ -316,15 +294,12 @@ The resource factory to use. Set to NULL for default factory. The ::device-proxy-available signal is emitted whenever a new device has become available.

-

-

Returns :

a GList -of GUPnPServiceProxy objects. [element-type][transfer none] +a GList +of GUPnPServiceProxy objects. [element-type GUPnP.ServiceProxy][transfer none]
- + @@ -348,15 +323,12 @@ device has become available. The ::device-proxy-unavailable signal is emitted whenever a device is not available any more.

-

-

control_point :

The GUPnPControlPoint that received the signal -The GUPnPControlPoint that received the signal

proxy :

- + @@ -380,15 +352,12 @@ device is not available any more. The ::service-proxy-available signal is emitted whenever a new service has become available.

-

-

control_point :

The GUPnPControlPoint that received the signal -The GUPnPControlPoint that received the signal

proxy :

- + @@ -412,15 +381,12 @@ service has become available. The ::service-proxy-unavailable signal is emitted whenever a service is not available any more.

-

-

control_point :

The GUPnPControlPoint that received the signal -The GUPnPControlPoint that received the signal

proxy :

- + @@ -438,6 +404,6 @@ service is not available any more. + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPDevice.html b/doc/html/GUPnPDevice.html index fc50966..8c7b8fc 100644 --- a/doc/html/GUPnPDevice.html +++ b/doc/html/GUPnPDevice.html @@ -3,12 +3,12 @@ GUPnPDevice - + - + @@ -41,7 +41,7 @@

control_point :

The GUPnPControlPoint that received the signal -The GUPnPControlPoint that received the signal

proxy :

Synopsis

-
                    GUPnPDevice;
+
struct              GUPnPDevice;
 
@@ -66,20 +66,16 @@ and services. GUPnPDevice implements the GUPnPDeviceInfo interface.

-

-

Details

-

GUPnPDevice

-
typedef struct _GUPnPDevice GUPnPDevice;
+

struct GUPnPDevice

+
struct GUPnPDevice;

This struct contains private data only, and should be accessed using the functions below.

-

-

@@ -91,13 +87,11 @@ functions below. The containing GUPnPRootDevice, or NULL if this is the root device.

-

-

+ Generated by GTK-Doc V1.18
\ No newline at end of file diff --git a/doc/html/GUPnPDeviceInfo.html b/doc/html/GUPnPDeviceInfo.html index 01c49f6..92bb465 100644 --- a/doc/html/GUPnPDeviceInfo.html +++ b/doc/html/GUPnPDeviceInfo.html @@ -3,12 +3,12 @@ GUPnPDeviceInfo - + - + @@ -41,12 +41,12 @@

Synopsis

-
                    GUPnPDeviceInfo;
+
struct              GUPnPDeviceInfo;
 GUPnPResourceFactory * gupnp_device_info_get_resource_factory
                                                         (GUPnPDeviceInfo *device_info);
 GUPnPContext *      gupnp_device_info_get_context       (GUPnPDeviceInfo *info);
 const char *        gupnp_device_info_get_location      (GUPnPDeviceInfo *info);
-const SoupURI *     gupnp_device_info_get_url_base      (GUPnPDeviceInfo *info);
+const SoupURI *     gupnp_device_info_get_url_base      (GUPnPDeviceInfo *info);
 const char *        gupnp_device_info_get_udn           (GUPnPDeviceInfo *info);
 const char *        gupnp_device_info_get_device_type   (GUPnPDeviceInfo *info);
 char *              gupnp_device_info_get_friendly_name (GUPnPDeviceInfo *info);
@@ -74,6 +74,8 @@ const char *        int *height);
 GList *             gupnp_device_info_list_dlna_capabilities
                                                         (GUPnPDeviceInfo *info);
+GList *             gupnp_device_info_list_dlna_device_class_identifier
+                                                        (GUPnPDeviceInfo *info);
 char *              gupnp_device_info_get_description_value
                                                         (GUPnPDeviceInfo *info,
                                                          const char *element);
@@ -107,7 +109,7 @@ const char *        location"                 gchar*                : Read / Write / Construct Only
   "resource-factory"         GUPnPResourceFactory*  : Read / Write / Construct Only
   "udn"                      gchar*                : Read / Write / Construct Only
-  "url-base"                 gpointer              : Read / Write / Construct Only
+  "url-base"                 SoupURI*              : Read / Write / Construct Only
 
@@ -116,20 +118,16 @@ const char * GUPnPDeviceInfo base abstract class provides methods for querying device information.

-

-

Details

-

GUPnPDeviceInfo

-
typedef struct _GUPnPDeviceInfo GUPnPDeviceInfo;
+

struct GUPnPDeviceInfo

+
struct GUPnPDeviceInfo;

This struct contains private data only, and should be accessed using the functions below.

-

-


@@ -139,8 +137,6 @@ functions below.

Get the GUPnPResourceFactory used by the device_info.

-

-

@@ -210,12 +201,10 @@ Get the location of the device description file.

gupnp_device_info_get_url_base ()

-
const SoupURI *     gupnp_device_info_get_url_base      (GUPnPDeviceInfo *info);
+
const SoupURI *     gupnp_device_info_get_url_base      (GUPnPDeviceInfo *info);

Get the URL base of this device.

-

-

@@ -226,8 +215,7 @@ Get the URL base of this device. - +

Returns :

A SoupURI. -A SoupURI.
@@ -239,8 +227,6 @@ Get the URL base of this device.

Get the Unique Device Name of the device.

-

-

@@ -251,8 +237,7 @@ Get the Unique Device Name of the device. - +

Returns :

A constant string. -A constant string.
@@ -264,8 +249,6 @@ Get the Unique Device Name of the device.

Get the UPnP device type.

-

-

@@ -276,8 +259,7 @@ Get the UPnP device type. - +

Returns :

A constant string, or NULL. -A constant string, or NULL.
@@ -289,8 +271,6 @@ Get the UPnP device type.

Get the friendly name of the device.

-

-

@@ -301,8 +281,7 @@ Get the friendly name of the device. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -314,8 +293,6 @@ Get the friendly name of the device.

Get the manufacturer of the device.

-

-

@@ -326,8 +303,7 @@ Get the manufacturer of the device. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -340,8 +316,6 @@ Get the manufacturer of the device.

Get a URL pointing to the manufacturer's website.

-

-

@@ -352,8 +326,7 @@ Get a URL pointing to the manufacturer's website. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -366,8 +339,6 @@ Get a URL pointing to the manufacturer's website.

Get the description of the device model.

-

-

@@ -378,8 +349,7 @@ Get the description of the device model. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -391,8 +361,6 @@ Get the description of the device model.

Get the model name of the device.

-

-

@@ -403,8 +371,7 @@ Get the model name of the device. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -416,8 +383,6 @@ Get the model name of the device.

Get the model number of the device.

-

-

@@ -428,8 +393,7 @@ Get the model number of the device. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -441,8 +405,6 @@ Get the model number of the device.

Get a URL pointing to the device model's website.

-

-

@@ -453,8 +415,7 @@ Get a URL pointing to the device model's website. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -466,8 +427,6 @@ Get a URL pointing to the device model's website.

Get the serial number of the device.

-

-

@@ -478,8 +437,7 @@ Get the serial number of the device. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -493,8 +451,6 @@ Get the serial number of the device. Get a URL pointing to the device's presentation page, for web-based administration.

-

-

@@ -505,8 +461,7 @@ administration. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -518,8 +473,6 @@ administration.

Get the Universal Product Code of the device.

-

-

@@ -530,8 +483,7 @@ Get the Universal Product Code of the device. - +

Returns :

A string, or NULL. g_free() after use. -A string, or NULL. g_free() after use.
@@ -558,8 +510,6 @@ this or lower depth will be returned. If requested_w returned, unless prefer_bigger is set, in which case the next biggest icon will be returned. The returned strings should be freed.

-

-

@@ -570,35 +520,31 @@ will be returned. The returned strings should be freed. - - + - + - + +returned if no exact match could be found - @@ -623,7 +569,7 @@ returned icon, or Returns :

-
@@ -635,10 +581,36 @@ returned icon, or GList * gupnp_device_info_list_dlna_capabilities (GUPnPDeviceInfo *info);

-Get a GList of strings that represent the device capabilities as announced +Get a GList of strings that represent the device capabilities as announced in the device description file using the <dlna:X_DLNACAP> element.

+

requested_mime_type :

The requested file +The requested file format, or NULL for any. [allow-none][transfer none]

requested_depth :

The requested color depth, or -1 for any -The requested color depth, or -1 for any

requested_width :

The requested width, or -1 for any -The requested width, or -1 for any

requested_height :

The requested height, or -1 for any -The requested height, or -1 for any

prefer_bigger :

TRUE if a bigger, rather than a smaller icon should be -returned if no exact match could be found -

mime_type :

The location where to store the the format +The location where to store the the format of the returned icon, or NULL. The returned string should be freed after use. [out][allow-none] a string, or NULL. g_free() after use. [transfer full] +a string, or NULL. g_free() after use. [transfer full]
++ + + + + + + + + + +

info :

A GUPnPDeviceInfo +

Returns :

a GList of newly allocated strings or +NULL if the device description doesn't contain the <dlna:X_DLNACAP> +element. [transfer full][element-type utf8] +
+
+
+
+

gupnp_device_info_list_dlna_device_class_identifier ()

+
GList *             gupnp_device_info_list_dlna_device_class_identifier
+                                                        (GUPnPDeviceInfo *info);

+Get a GList of strings that represent the device class and version as +announced in the device description file using the <dlna:X_DLNADOC> +element.

@@ -650,9 +622,9 @@ in the device description file using the <dlna:X_DLNACAP> element. - @@ -668,8 +640,6 @@ element. [

Returns :

a GList of newly allocated strings or -NULL if the device description doesn't contain the <dlna:X_DLNACAP> -element. [element-type utf8] +a GList of newly allocated strings or +NULL if the device description doesn't contain the <dlna:X_DLNADOC> +element. [transfer full][element-type utf8]
@@ -680,13 +650,12 @@ in the device description file. - + - @@ -699,7 +668,7 @@ in the device description file.

Get a GList of new objects implementing GUPnPDeviceInfo representing the devices directly contained in info. The returned list -should be g_list_free()'d and the elements should be g_object_unref()'d. +should be g_list_free()'d and the elements should be g_object_unref()'d.

Note that devices are not cached internally, so that every time you @@ -707,8 +676,6 @@ call this function new objects are created. The application must cache any used devices if it wishes to keep them around and re-use them.

-

-

element :

Name of the description element to retrieve -Name of the description element to retrieve

Returns :

a newly allocated string or NULL if the device - description doesn't contain the given element +a newly allocated string or NULL if the device +description doesn't contain the given element
@@ -719,7 +686,7 @@ them. - @@ -734,8 +701,6 @@ new GList of strings representing the types of the devices directly contained in info.

-

-

Returns :

a GList of +a GList of new GUPnPDeviceInfo objects. [element-type GUPnP.DeviceInfo][transfer full]
@@ -746,7 +711,7 @@ directly contained in info. - @@ -768,8 +733,6 @@ Note that devices are not cached internally, so that every time you call this function a new object is created. The application must cache any used devices if it wishes to keep them around and re-use them.

-

-

Returns :

A GList of strings. The +A GList of strings. The elements should be g_free()'d and the list should be g_list_free()'d. [element-type utf8][transfer full]
@@ -780,12 +743,11 @@ devices if it wishes to keep them around and re-use them. - + - @@ -798,15 +760,13 @@ devices if it wishes to keep them around and re-use them.

Get a GList of new objects implementing GUPnPServiceInfo representing the services directly contained in info. The returned list should be -g_list_free()'d and the elements should be g_object_unref()'d. +g_list_free()'d and the elements should be g_object_unref()'d.

Note that services are not cached internally, so that every time you call function new objects are created. The application must cache any used services if it wishes to keep them around and re-use them.

-

-

type :

The type of the device to be retrieved. -The type of the device to be retrieved.

Returns :

A new GUPnPDeviceInfo. +A new GUPnPDeviceInfo. [transfer full][allow-none]
@@ -817,9 +777,8 @@ services if it wishes to keep them around and re-use them. - +

Returns :

(element-type GUPnP.ServiceInfo) (transfer full) : A GList of -new GUPnPServiceInfo objects. -(element-type GUPnP.ServiceInfo) (transfer full) : A GList of +new GUPnPServiceInfo objects.
@@ -833,8 +792,6 @@ new GList of strings representing the types of the services directly contained in info.

-

-

@@ -845,7 +802,7 @@ directly contained in info. - @@ -867,8 +824,6 @@ Note that services are not cached internally, so that every time you call this function a new object is created. The application must cache any used services if it wishes to keep them around and re-use them.

-

-

Returns :

A GList of strings. The +A GList of strings. The elements should be g_free()'d and the list should be g_list_free()'d. [element-type utf8][transfer full]
@@ -879,12 +834,11 @@ services if it wishes to keep them around and re-use them. - + - @@ -899,8 +853,6 @@ services if it wishes to keep them around and re-use them.

The GUPnPContext to use.

-

-


@@ -909,8 +861,6 @@ The Stability Level: Private


@@ -931,8 +879,6 @@ Private property.

Private property.

-

-

Stability Level: Private


@@ -942,8 +888,6 @@ Private property.

The location of the device description file.

-

-

Default value: NULL


@@ -953,8 +897,6 @@ The location of the device description file.

The resource factory to use. Set to NULL for default factory.

-

-


@@ -963,24 +905,20 @@ The resource factory to use. Set to NULL for default factory.

The UDN of this device.

-

-

Default value: NULL


The "url-base" property

-
  "url-base"                 gpointer              : Read / Write / Construct Only
-

-The URL base (SoupURI). -

+
  "url-base"                 SoupURI*              : Read / Write / Construct Only

+The URL base (SoupURI).

+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPDeviceProxy.html b/doc/html/GUPnPDeviceProxy.html index 4cc3b58..f862d98 100644 --- a/doc/html/GUPnPDeviceProxy.html +++ b/doc/html/GUPnPDeviceProxy.html @@ -3,12 +3,12 @@ GUPnPDeviceProxy - + - + @@ -39,7 +39,7 @@

type :

The type of the service to be retrieved. -The type of the service to be retrieved.

Returns :

A GUPnPServiceInfo. +A GUPnPServiceInfo. [transfer full]

Synopsis

-
                    GUPnPDeviceProxy;
+
struct              GUPnPDeviceProxy;
 
@@ -56,25 +56,21 @@ GUPnPDeviceProxy allows for retrieving proxies for a device's subdevices and services. GUPnPDeviceProxy implements the GUPnPDeviceInfo interface.

-

-

Details

-

GUPnPDeviceProxy

-
typedef struct _GUPnPDeviceProxy GUPnPDeviceProxy;
+

struct GUPnPDeviceProxy

+
struct GUPnPDeviceProxy;

This struct contains private data only, and should be accessed using the functions below.

-

-

+ Generated by GTK-Doc V1.18
\ No newline at end of file diff --git a/doc/html/GUPnPResourceFactory.html b/doc/html/GUPnPResourceFactory.html index d709940..353a404 100644 --- a/doc/html/GUPnPResourceFactory.html +++ b/doc/html/GUPnPResourceFactory.html @@ -3,18 +3,18 @@ GUPnPResourceFactory - + - + - + - + @@ -39,7 +39,7 @@

Synopsis

-
                    GUPnPResourceFactory;
+
struct              GUPnPResourceFactory;
 GUPnPResourceFactory * gupnp_resource_factory_new       (void);
 GUPnPResourceFactory * gupnp_resource_factory_get_default
                                                         (void);
@@ -77,20 +77,16 @@ of the specified UPnP type is requested. The GUPnPDeviceProxy).
 

-

-

Details

-

GUPnPResourceFactory

-
typedef struct _GUPnPResourceFactory GUPnPResourceFactory;
+

struct GUPnPResourceFactory

+
struct GUPnPResourceFactory;

This struct contains private data only, and should be accessed using the functions below.

-

-


@@ -99,14 +95,11 @@ functions below.

Create a new GUPnPResourceFactory object.

-

-

- +

Returns :

A GUPnPResourceFactory object. -A GUPnPResourceFactory object.
@@ -118,13 +111,11 @@ Create a new GUPnPResourceFactory object.

-

-

-

Returns :

A GUPnPResourceFactory object. +A GUPnPResourceFactory object. [transfer none]
@@ -145,25 +136,20 @@ it is asked to create a resource object for UPnP type type must be a derived type of GUPNP_TYPE_DEVICE if resource is a device or GUPNP_TYPE_SERVICE if its a service.

-

-

- + - + - +

factory :

A GUPnPResourceFactory. -A GUPnPResourceFactory.

upnp_type :

The UPnP type name of the resource. -The UPnP type name of the resource.

type :

The requested GType assignment for the resource. -The requested GType assignment for the resource.
@@ -177,26 +163,22 @@ a device or GUPNP_TYPE_SERVICE if its a service.

Unregisters the GType assignment for the resource of UPnP type upnp_type.

-

-

- + - + - +

factory :

A GUPnPResourceFactory. -A GUPnPResourceFactory.

upnp_type :

The UPnP type name of the resource. -The UPnP type name of the resource.

Returns :

TRUE if GType assignment was removed successfully, FALSE -otherwise. - +TRUE if GType assignment was removed successfully, FALSE +otherwise.
@@ -217,25 +199,20 @@ time it is asked to create a resource proxy object for UPnP type type must be a derived type of GUPNP_TYPE_DEVICE_PROXY if resource is a device or GUPNP_TYPE_SERVICE_PROXY if its a service.

-

-

- + - + - +

factory :

A GUPnPResourceFactory. -A GUPnPResourceFactory.

upnp_type :

The UPnP type name of the resource. -The UPnP type name of the resource.

type :

The requested GType assignment for the resource proxy. -The requested GType assignment for the resource proxy.
@@ -250,26 +227,22 @@ resource is a device or GUPNP_TYPE_SERVICE_PROXY if it Unregisters the GType assignment for the proxy of resource of UPnP type upnp_type.

-

-

- + - + - +

factory :

A GUPnPResourceFactory. -A GUPnPResourceFactory.

upnp_type :

The UPnP type name of the resource. -The UPnP type name of the resource.

Returns :

TRUE if GType assignment was removed successfully, FALSE -otherwise. - +TRUE if GType assignment was removed successfully, FALSE +otherwise.
@@ -278,6 +251,6 @@ otherwise.
+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPRootDevice.html b/doc/html/GUPnPRootDevice.html index 1a400ca..309ba7e 100644 --- a/doc/html/GUPnPRootDevice.html +++ b/doc/html/GUPnPRootDevice.html @@ -3,12 +3,12 @@ GUPnPRootDevice - + - + @@ -41,7 +41,7 @@

Synopsis

-
                    GUPnPRootDevice;
+
struct              GUPnPRootDevice;
 GUPnPRootDevice *   gupnp_root_device_new               (GUPnPContext *context,
                                                          const char *description_path,
                                                          const char *description_dir);
@@ -59,6 +59,8 @@ const char *        GUPnPRootDevice *root_device);
 const char *        gupnp_root_device_get_description_path
                                                         (GUPnPRootDevice *root_device);
+GSSDPResourceGroup * gupnp_root_device_get_ssdp_resource_group
+                                                        (GUPnPRootDevice *root_device);
 
@@ -84,20 +86,16 @@ const char * GUPnPRootDevice allows for implementing root devices.

-

-

Details

-

GUPnPRootDevice

-
typedef struct _GUPnPRootDevice GUPnPRootDevice;
+

struct GUPnPRootDevice

+
struct GUPnPRootDevice;

This struct contains private data only, and should be accessed using the functions below.

-

-


@@ -109,8 +107,6 @@ functions below. Create a new GUPnPRootDevice object, automatically loading and parsing device description document from description_path.

-

-

@@ -122,18 +118,15 @@ device description document from description_path +be an absolute path or path relative to description_dir. - + - +

description_path :

Path to device description document. This could either -be an absolute path or path relative to description_dir. -

description_dir :

Path to directory where description documents are provided. -Path to directory where description documents are provided.

Returns :

A new GUPnPRootDevice object. -A new GUPnPRootDevice object.
@@ -151,8 +144,6 @@ Create a new description_path if description_doc is NULL.

-

-

@@ -174,18 +165,15 @@ device description document from description_path +be an absolute path or path relative to description_dir. - + - +

description_path :

Path to device description document. This could either -be an absolute path or path relative to description_dir. -

description_dir :

Path to directory where description documents are provided. -Path to directory where description documents are provided.

Returns :

A new GUPnPRootDevice object. -A new GUPnPRootDevice object.
@@ -199,8 +187,6 @@ be an absolute path or path relative to description_ Controls whether or not root_device is available (announcing its presence).

-

-

@@ -212,8 +198,7 @@ its presence). +TRUE if root_device should be available

available :

-TRUE if root_device should be available -
@@ -225,8 +210,6 @@ its presence).

Get whether or not root_device is available (announcing its presence).

-

-

@@ -237,8 +220,8 @@ Get whether or not root_device is availa - +

Returns :

TRUE if root_device is available, FALSE otherwise. - +TRUE if root_device is available, FALSE otherwise.
@@ -251,8 +234,6 @@ Get whether or not root_device is availa

Get the relative location of root_device.

-

-

@@ -263,8 +244,7 @@ Get the relative location of root_device - +

Returns :

The relative location of root_device. -The relative location of root_device.
@@ -278,8 +258,6 @@ Get the relative location of root_device Get the path to the directory containing description documents related to root_device.

-

-

@@ -290,8 +268,7 @@ Get the path to the directory containing description documents related to - +

Returns :

The path to description document directory of root_device. -The path to description document directory of root_device.
@@ -304,7 +281,28 @@ Get the path to the directory containing description documents related to

Get the path to the device description document of root_device.

+
++ + + + + + + + + + +

root_device :

A GUPnPRootDevice +

Returns :

The path to device description document of root_device.
+
+
+
+

gupnp_root_device_get_ssdp_resource_group ()

+
GSSDPResourceGroup * gupnp_root_device_get_ssdp_resource_group
+                                                        (GUPnPRootDevice *root_device);

+Get the GSSDPResourceGroup used by root_device.

@@ -316,7 +314,7 @@ Get the path to the device description document of r - @@ -331,8 +329,6 @@ Get the path to the device description document of r

TRUE if this device is available.

-

-

Default value: FALSE


@@ -342,8 +338,6 @@ TRUE if this device is available.

The path to directory where description documents are provided.

-

-

Default value: NULL


@@ -353,8 +347,6 @@ The path to directory where description documents are provided.

Device description document. Constructor property.

-

-


@@ -364,14 +356,12 @@ Device description document. Constructor property. The path to device description document. This could either be an absolute path or path relative to GUPnPRootDevice:description-dir.

-

-

Default value: NULL

+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPService.html b/doc/html/GUPnPService.html index 3a5a455..922db9d 100644 --- a/doc/html/GUPnPService.html +++ b/doc/html/GUPnPService.html @@ -3,12 +3,12 @@ GUPnPService - + - + @@ -43,38 +43,40 @@

Returns :

The path to device description document of root_device. +The GSSDPResourceGroup of root_device. [transfer none]

Synopsis

-
                    GUPnPService;
-                    GUPnPServiceAction;
-const char *        gupnp_service_action_get_name       (GUPnPServiceAction *action);
-GList *             gupnp_service_action_get_locales    (GUPnPServiceAction *action);
-void                gupnp_service_action_get            (GUPnPServiceAction *action,
+
struct              GUPnPService;
+                    GUPnPServiceAction;
+const char *        gupnp_service_action_get_name       (GUPnPServiceAction *action);
+GList *             gupnp_service_action_get_locales    (GUPnPServiceAction *action);
+void                gupnp_service_action_get            (GUPnPServiceAction *action,
                                                          ...);
-void                gupnp_service_action_get_valist     (GUPnPServiceAction *action,
+void                gupnp_service_action_get_valist     (GUPnPServiceAction *action,
                                                          va_list var_args);
-void                gupnp_service_action_get_value      (GUPnPServiceAction *action,
+void                gupnp_service_action_get_value      (GUPnPServiceAction *action,
                                                          const char *argument,
                                                          GValue *value);
-GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
+GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
                                                          const char *argument,
                                                          GType type);
-GList *             gupnp_service_action_get_values     (GUPnPServiceAction *action,
+GList *             gupnp_service_action_get_values     (GUPnPServiceAction *action,
                                                          GList *arg_names,
                                                          GList *arg_types);
-void                gupnp_service_action_set            (GUPnPServiceAction *action,
+void                gupnp_service_action_set            (GUPnPServiceAction *action,
                                                          ...);
-void                gupnp_service_action_set_valist     (GUPnPServiceAction *action,
+void                gupnp_service_action_set_valist     (GUPnPServiceAction *action,
                                                          va_list var_args);
-void                gupnp_service_action_set_value      (GUPnPServiceAction *action,
+void                gupnp_service_action_set_value      (GUPnPServiceAction *action,
                                                          const char *argument,
                                                          const GValue *value);
-void                gupnp_service_action_set_values     (GUPnPServiceAction *action,
+void                gupnp_service_action_set_values     (GUPnPServiceAction *action,
                                                          GList *arg_names,
                                                          GList *arg_values);
-void                gupnp_service_action_return         (GUPnPServiceAction *action);
-void                gupnp_service_action_return_error   (GUPnPServiceAction *action,
+void                gupnp_service_action_return         (GUPnPServiceAction *action);
+void                gupnp_service_action_return_error   (GUPnPServiceAction *action,
                                                          guint error_code,
                                                          const char *error_description);
-SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);
+SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);
+guint               gupnp_service_action_get_argument_count
+                                                        (GUPnPServiceAction *action);
 void                gupnp_service_notify                (GUPnPService *service,
                                                          ...);
 void                gupnp_service_notify_valist         (GUPnPService *service,
@@ -96,6 +98,10 @@ const char *        GUPnPServiceInfo
          +----GUPnPService
 
+
+  GBoxed
+   +----GUPnPServiceAction
+

Properties

@@ -117,51 +123,43 @@ const char * GUPnPService allows for handling incoming actions and state variable notification. GUPnPService implements the GUPnPServiceInfo interface.

-

-

Details

-

GUPnPService

-
typedef struct _GUPnPService GUPnPService;
+

struct GUPnPService

+
struct GUPnPService;

This struct contains private data only, and should be accessed using the functions below.

-

-


-

GUPnPServiceAction

+

GUPnPServiceAction

typedef struct _GUPnPServiceAction GUPnPServiceAction;

Opaque structure for holding in-progress action data.

-

-


gupnp_service_action_get_name ()

-
const char *        gupnp_service_action_get_name       (GUPnPServiceAction *action);
+
const char *        gupnp_service_action_get_name       (GUPnPServiceAction *action);

Get the name of action.

-

-

- - @@ -170,24 +168,22 @@ Get the name of action.

gupnp_service_action_get_locales ()

-
GList *             gupnp_service_action_get_locales    (GUPnPServiceAction *action);
+
GList *             gupnp_service_action_get_locales    (GUPnPServiceAction *action);

Get an ordered (preferred first) GList of locales preferred by the client. Free list and elements after use.

-

-

action :

A GUPnPServiceAction +A GUPnPServiceAction

Returns :

The name of action +The name of action
- - @@ -197,26 +193,23 @@ locale names. [

gupnp_service_action_get ()

-
void                gupnp_service_action_get            (GUPnPServiceAction *action,
+
void                gupnp_service_action_get            (GUPnPServiceAction *action,
                                                          ...);

Retrieves the specified action arguments.

-

-

action :

A GUPnPServiceAction +A GUPnPServiceAction

Returns :

A GList of char* +A GList of char* locale names. [element-type utf8][transfer full]
- +location, terminated with NULL.

action :

A GUPnPServiceAction +A GUPnPServiceAction

... :

tuples of argument name, argument type, and argument value -location, terminated with NULL. -
@@ -224,27 +217,24 @@ location, terminated with

gupnp_service_action_get_valist ()

-
void                gupnp_service_action_get_valist     (GUPnPServiceAction *action,
+
void                gupnp_service_action_get_valist     (GUPnPServiceAction *action,
                                                          va_list var_args);

See gupnp_service_action_get(); this version takes a va_list for use by language bindings.

-

-

- +value location.

action :

A GUPnPServiceAction +A GUPnPServiceAction

var_args :

va_list of tuples of argument name, argument type, and argument -value location. -
@@ -252,31 +242,28 @@ value location.

gupnp_service_action_get_value ()

-
void                gupnp_service_action_get_value      (GUPnPServiceAction *action,
+
void                gupnp_service_action_get_value      (GUPnPServiceAction *action,
                                                          const char *argument,
                                                          GValue *value);

Retrieves the value of argument into value.

-

-

- - + @@ -285,39 +272,35 @@ to the correct type.

gupnp_service_action_get_gvalue ()

-
GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
+
GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
                                                          const char *argument,
                                                          GType type);

-Rename To: gupnp_service_action_get_value Retrieves the value of argument into a GValue of type type and returns it. The method exists only and only to satify PyGI, please use gupnp_service_action_get_value and ignore this if possible.

-

-

action :

A GUPnPServiceAction +A GUPnPServiceAction

argument :

The name of the argument to retrieve -The name of the argument to retrieve

value :

The GValue to store the value of the argument, initialized -to the correct type. +to the correct type. [inout]
- - + - + - @@ -326,35 +309,32 @@ The method exists only and only to satify PyGI, please use

gupnp_service_action_get_values ()

-
GList *             gupnp_service_action_get_values     (GUPnPServiceAction *action,
+
GList *             gupnp_service_action_get_values     (GUPnPServiceAction *action,
                                                          GList *arg_names,
                                                          GList *arg_types);

A variant of gupnp_service_action_get that uses GList instead of varargs.

-

-

action :

A GUPnPServiceAction +A GUPnPServiceAction

argument :

The name of the argument to retrieve -The name of the argument to retrieve

type :

The type of argument to retrieve -The type of argument to retrieve

Returns :

Value as GValue associated with action. -g_value_unset and g_slice_free it after usage. [transfer full] +Value as GValue associated with action. +g_value_unset and g_slice_free it after usage. +Rename To: gupnp_service_action_get_value. [transfer full]
- - + - - @@ -365,26 +345,23 @@ each element. [

gupnp_service_action_set ()

-
void                gupnp_service_action_set            (GUPnPServiceAction *action,
+
void                gupnp_service_action_set            (GUPnPServiceAction *action,
                                                          ...);

Sets the specified action return values.

-

-

action :

A GUPnPServiceAction +A GUPnPServiceAction

arg_names :

(element-type utf8) : A GList of argument names as string -(element-type utf8) : A GList of argument names as string

arg_types :

A GList of argument types as GType. [element-type GType] +A GList of argument types as GType. [element-type GType]

Returns :

The values as GList of +The values as GList of GValue. g_list_free the returned list and g_value_unset and g_slice_free each element. [element-type GValue][transfer full]
- +actual return value, terminated with NULL.

action :

A GUPnPServiceAction +A GUPnPServiceAction

... :

tuples of return value name, return value type, and -actual return value, terminated with NULL. -
@@ -392,27 +369,24 @@ actual return value, terminated with

gupnp_service_action_set_valist ()

-
void                gupnp_service_action_set_valist     (GUPnPServiceAction *action,
+
void                gupnp_service_action_set_valist     (GUPnPServiceAction *action,
                                                          va_list var_args);

See gupnp_service_action_set(); this version takes a va_list for use by language bindings.

-

-

- +actual return value.

action :

A GUPnPServiceAction +A GUPnPServiceAction

var_args :

va_list of tuples of return value name, return value type, and -actual return value. -
@@ -420,31 +394,27 @@ actual return value.

gupnp_service_action_set_value ()

-
void                gupnp_service_action_set_value      (GUPnPServiceAction *action,
+
void                gupnp_service_action_set_value      (GUPnPServiceAction *action,
                                                          const char *argument,
                                                          const GValue *value);

Sets the value of argument to value.

-

-

- - + - +

action :

A GUPnPServiceAction +A GUPnPServiceAction

argument :

The name of the return value to retrieve -The name of the return value to retrieve

value :

The GValue to store the return value -The GValue to store the return value
@@ -452,31 +422,29 @@ Sets the value of argument to

gupnp_service_action_set_values ()

-
void                gupnp_service_action_set_values     (GUPnPServiceAction *action,
+
void                gupnp_service_action_set_values     (GUPnPServiceAction *action,
                                                          GList *arg_names,
                                                          GList *arg_values);

Sets the specified action return values.

-

-

- - - @@ -485,17 +453,15 @@ Sets the specified action return values.

gupnp_service_action_return ()

-
void                gupnp_service_action_return         (GUPnPServiceAction *action);
+
void                gupnp_service_action_return         (GUPnPServiceAction *action);

Return succesfully.

-

-

action :

A GUPnPServiceAction +A GUPnPServiceAction

arg_names :

A GList of argument names. [element-type utf8][transfer-none] +A GList of argument names. [element-type utf8][transfer none]

arg_values :

The GList of values (as -GValues) that line up with arg_names. [element-type GValue][transfer-none] +The GList of values (as +GValues) that line up with arg_names. [element-type GValue][transfer none]
-

action :

A GUPnPServiceAction +A GUPnPServiceAction
@@ -503,26 +469,23 @@ Return succesfully.

gupnp_service_action_return_error ()

-
void                gupnp_service_action_return_error   (GUPnPServiceAction *action,
+
void                gupnp_service_action_return_error   (GUPnPServiceAction *action,
                                                          guint error_code,
                                                          const char *error_description);

Return error_code.

-

-

- - + @@ -530,8 +493,7 @@ Return error_code. one of GUPNP_CONTROL_ERROR_INVALID_ACTION, GUPNP_CONTROL_ERROR_INVALID_ARGS, GUPNP_CONTROL_ERROR_OUT_OF_SYNC or GUPNP_CONTROL_ERROR_ACTION_FAILED, in which case a description is -provided automatically. - +provided automatically.

action :

A GUPnPServiceAction +A GUPnPServiceAction

error_code :

The error code -The error code

error_description :

@@ -539,24 +501,23 @@ provided automatically.

gupnp_service_action_get_message ()

-
SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);
+
SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);

-Get the SoupMessage associated with action. Mainly intended for +Get the SoupMessage associated with action. Mainly intended for applications to be able to read HTTP headers received from clients.

-

-

- - @@ -565,6 +526,29 @@ after using it. [ +

gupnp_service_action_get_argument_count ()

+
guint               gupnp_service_action_get_argument_count
+                                                        (GUPnPServiceAction *action);
+

+Get the number of IN arguments from the action and return it. +

+

action :

A GUPnPServiceAction +A GUPnPServiceAction

Returns :

SoupMessage associated with action. Unref + +SoupMessage associated with action. Unref after using it. [transfer full]
++ + + + + + + + + + +

action :

A GUPnPServiceAction +

Returns :

The number of IN arguments from the action.
+
+
+

gupnp_service_notify ()

void                gupnp_service_notify                (GUPnPService *service,
                                                          ...);
@@ -572,8 +556,6 @@ after using it. [Varargs
have changed to the specified values.

-

-

@@ -585,8 +567,7 @@ have changed to the specified values. +terminated with NULL.

... :

Tuples of variable name, variable type, and variable value, -terminated with NULL. -
@@ -600,8 +581,6 @@ terminated with gupnp_service_notify(); this version takes a va_list for use by language bindings.

-

-

@@ -613,8 +592,7 @@ use by language bindings. +value, terminated with NULL.

var_args :

A va_list of tuples of variable name, variable type, and variable -value, terminated with NULL. -
@@ -628,8 +606,6 @@ value, terminated with variable has changed to value.

-

-

@@ -640,13 +616,11 @@ Notifies listening clients that variable - + - +

variable :

The name of the variable to notify -The name of the variable to notify

value :

The value of the variable -The value of the variable
@@ -659,8 +633,6 @@ Notifies listening clients that variable Causes new notifications to be queued up until
gupnp_service_thaw_notify() is called.

-

-

@@ -677,8 +649,6 @@ is called.

Sends out any pending notifications, and stops queuing of new ones.

-

-

@@ -698,8 +668,8 @@ Sends out any pending notifications, and stops queuing of new ones. A convenience function that attempts to connect all possible "action-invoked" and "query-variable" signals to appropriate callbacks for the service service. It uses service introspection -and GModule's introspective features. It is very simillar to -glade_xml_signal_autoconnect() except that it attempts to guess the names of +and GModule's introspective features. It is very simillar to +gtk_builder_connect_signals() except that it attempts to guess the names of the signal handlers on its own.

@@ -708,20 +678,25 @@ functions for "query-variable" signals, except that "query_" should be prepended to the variable name. For example, callback function for -"GetSystemUpdateID" action should be either named as +GetSystemUpdateID action should be either named as "get_system_update_id_cb" or "on_get_system_update_id" and callback function for the query of "SystemUpdateID" state variable should be named -"query_system_update_id_cb" or "on_query_system_update_id". +query_system_update_id_cb or +on_query_system_update_id.

-Note that this function will not work correctly if GModule is not supported -on the platform or introspection is not available for service service. +

+
+

Note

This function will not work correctly if GModule is not supported +on the platform or introspection is not available for service.
+

-WARNING: This function can not and therefore does not guarantee that the -resulting signal connections will be correct as it depends heavily on a -particular naming schemes described above.

+
+

Warning

This function can not and therefore does not guarantee that the +resulting signal connections will be correct as it depends heavily on a +particular naming schemes described above.

@@ -734,8 +709,7 @@ particular naming schemes described above. - + @@ -754,8 +728,6 @@ particular naming schemes described above.

The containing GUPnPRootDevice.

-

-

@@ -763,26 +735,23 @@ The containing

The "action-invoked" signal

void                user_function                      (GUPnPService       *service,
-                                                        GUPnPServiceAction *action,
+                                                        GUPnPServiceAction *action,
                                                         gpointer            user_data)      : Has Details

Emitted whenever an action is invoked. Handler should process action and must call either gupnp_service_action_return() or gupnp_service_action_return_error().

-

-

user_data :

the data to pass to each of the callbacks -the data to pass to each of the callbacks

error :

- + - @@ -802,24 +771,21 @@ Emitted whenever an action is invoked. Handler should process

Emitted whenever notification of a client fails.

-

-

service :

The GUPnPService that received the signal -The GUPnPService that received the signal

action :

The invoked GUPnPAction +The invoked GUPnPServiceAction
- + - - @@ -840,24 +806,20 @@ Emitted whenever notification of a client fails. Emitted whenever service needs to know the value of variable. Handler should fill value with the value of variable.

-

-

service :

The GUPnPService that received the signal -The GUPnPService that received the signal

callback_url :

The callback URL +A GList of callback URLs. [type GList][element-type SoupURI]

reason :

A pointer to a GError describing why the notify failed +A pointer to a GError describing why the notify failed. [type GError]
- + - + - @@ -871,6 +833,6 @@ Handler should fill value with the value + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPServiceInfo.html b/doc/html/GUPnPServiceInfo.html index 0a78444..c58f52a 100644 --- a/doc/html/GUPnPServiceInfo.html +++ b/doc/html/GUPnPServiceInfo.html @@ -3,12 +3,12 @@ GUPnPServiceInfo - + - + @@ -41,7 +41,7 @@

service :

The GUPnPService that received the signal -The GUPnPService that received the signal

variable :

The variable that is being queried -The variable that is being queried

value :

The location of the GValue of the variable +The location of the GValue of the variable. [type GValue][inout]

Synopsis

-
                    GUPnPServiceInfo;
+
struct              GUPnPServiceInfo;
 void                (*GUPnPServiceIntrospectionCallback)
                                                         (GUPnPServiceInfo *info,
                                                          GUPnPServiceIntrospection *introspection,
@@ -49,7 +49,7 @@
                                                          gpointer user_data);
 GUPnPContext *      gupnp_service_info_get_context      (GUPnPServiceInfo *info);
 const char *        gupnp_service_info_get_location     (GUPnPServiceInfo *info);
-const SoupURI *     gupnp_service_info_get_url_base     (GUPnPServiceInfo *info);
+const SoupURI *     gupnp_service_info_get_url_base     (GUPnPServiceInfo *info);
 const char *        gupnp_service_info_get_udn          (GUPnPServiceInfo *info);
 const char *        gupnp_service_info_get_service_type (GUPnPServiceInfo *info);
 char *              gupnp_service_info_get_id           (GUPnPServiceInfo *info);
@@ -84,7 +84,7 @@ const char *        location"                 gchar*                : Read / Write / Construct Only
   "service-type"             gchar*                : Read / Write / Construct Only
   "udn"                      gchar*                : Read / Write / Construct Only
-  "url-base"                 gpointer              : Read / Write / Construct Only
+  "url-base"                 SoupURI*              : Read / Write / Construct Only
 
@@ -93,20 +93,16 @@ const char * GUPnPDeviceInfo base abstract class provides methods for querying service information.

-

-

Details

-

GUPnPServiceInfo

-
typedef struct _GUPnPServiceInfo GUPnPServiceInfo;
+

struct GUPnPServiceInfo

+
struct GUPnPServiceInfo;

This struct contains private data only, and should be accessed using the functions below.

-

-


@@ -119,30 +115,24 @@ functions below.

Callback notifying that introspection for info has been obtained.

-

-

- + - + - + - +

info :

The GUPnPServiceInfo introspection was requested for -The GUPnPServiceInfo introspection was requested for

introspection :

The new GUPnPServiceIntrospection object, or NULL -The new GUPnPServiceIntrospection object, or NULL

error :

The GError that occurred, or NULL -The GError that occurred, or NULL

user_data :

User data -User data
@@ -154,8 +144,6 @@ Callback notifying that introspection fo

Get the GUPnPContext associated with info.

-

-

@@ -200,12 +185,10 @@ Get the location of the device description file.

gupnp_service_info_get_url_base ()

-
const SoupURI *     gupnp_service_info_get_url_base     (GUPnPServiceInfo *info);
+
const SoupURI *     gupnp_service_info_get_url_base     (GUPnPServiceInfo *info);

Get the URL base of this service.

-

-

@@ -216,8 +199,7 @@ Get the URL base of this service. - +

Returns :

A constant SoupURI. -A constant SoupURI.
@@ -229,8 +211,6 @@ Get the URL base of this service.

Get the Unique Device Name of the containing device.

-

-

@@ -241,8 +221,7 @@ Get the Unique Device Name of the containing device. - +

Returns :

A constant string. -A constant string.
@@ -254,8 +233,6 @@ Get the Unique Device Name of the containing device.

Get the UPnP service type, or NULL.

-

-

@@ -266,8 +243,7 @@ Get the UPnP service type, or Returns :

-
+
A constant string. -A constant string.
@@ -279,8 +255,6 @@ Get the UPnP service type, or NULL if there is no ID.

-

-

@@ -291,8 +265,7 @@ Get the ID of this service, or Returns :

-
+
A string. This string should be freed with g_free() after use. -A string. This string should be freed with g_free() after use.
@@ -304,8 +277,6 @@ Get the ID of this service, or NULL if there is no SCPD.

-

-

@@ -316,8 +287,7 @@ Get the SCPD URL for this service, or Returns :

-
+
A string. This string should be freed with g_free() after use. -A string. This string should be freed with g_free() after use.
@@ -329,8 +299,6 @@ Get the SCPD URL for this service, or NULL..

-

-

@@ -341,8 +309,7 @@ Get the control URL for this service, or Returns :

-
+
A string. This string should be freed with g_free() after use. -A string. This string should be freed with g_free() after use.
@@ -355,8 +322,6 @@ Get the control URL for this service, or NULL.

-

-

@@ -367,8 +332,7 @@ Get the event subscription URL for this service, or Returns :

-
+
A string. This string should be freed with g_free() after use. -A string. This string should be freed with g_free() after use.
@@ -388,8 +352,6 @@ if the service does not provide an SCPD. Warning: You should use gupnp_service_info_get_introspection_async() instead, this function re-enter the GMainloop before returning.

-

-

@@ -405,7 +367,7 @@ instead, this function re-enter the GMainloop before returning. - @@ -424,8 +386,6 @@ Note that introspection object is created from the information in service description document (SCPD) provided by the service so it can not be created if the service does not provide an SCPD.

-

-

Returns :

A new GUPnPServiceIntrospection for this +A new GUPnPServiceIntrospection for this service or NULL. Unref after use. [transfer full]
@@ -436,13 +396,11 @@ if the service does not provide an SCPD. - + - +

callback :

(scope async) : callback to be called when introspection object is ready. -(scope async) : callback to be called when introspection object is ready.

user_data :

user_data to be passed to the callback. -user_data to be passed to the callback.
@@ -456,8 +414,6 @@ if the service does not provide an SCPD.

The GUPnPContext to use.

-

-


@@ -466,8 +422,6 @@ The Stability Level: Private


@@ -477,8 +431,6 @@ Private property.

Private property.

-

-

Stability Level: Private


@@ -488,8 +440,6 @@ Private property.

The location of the device description file.

-

-

Default value: NULL


@@ -499,8 +449,6 @@ The location of the device description file.

The service type.

-

-

Default value: NULL


@@ -510,24 +458,20 @@ The service type.

The UDN of the containing device.

-

-

Default value: NULL


The "url-base" property

-
  "url-base"                 gpointer              : Read / Write / Construct Only
-

-The URL base (SoupURI). -

+
  "url-base"                 SoupURI*              : Read / Write / Construct Only

+The URL base (SoupURI).

+ Generated by GTK-Doc V1.18
\ No newline at end of file diff --git a/doc/html/GUPnPServiceProxy.html b/doc/html/GUPnPServiceProxy.html index 553641e..9faf882 100644 --- a/doc/html/GUPnPServiceProxy.html +++ b/doc/html/GUPnPServiceProxy.html @@ -3,12 +3,12 @@ GUPnPServiceProxy - + - + @@ -43,7 +43,7 @@

Synopsis

-
                    GUPnPServiceProxy;
+
struct              GUPnPServiceProxy;
                     GUPnPServiceProxyAction;
 void                (*GUPnPServiceProxyActionCallback)  (GUPnPServiceProxy *proxy,
                                                          GUPnPServiceProxyAction *action,
@@ -163,20 +163,16 @@
 incoming event notifications. GUPnPServiceProxy implements the
 GUPnPServiceInfo interface.
 

-

-

Details

-

GUPnPServiceProxy

-
typedef struct _GUPnPServiceProxy GUPnPServiceProxy;
+

struct GUPnPServiceProxy

+
struct GUPnPServiceProxy;

This struct contains private data only, and should be accessed using the functions below.

-

-


@@ -185,8 +181,6 @@ functions below.

Opaque structure for holding in-progress action data.

-

-


@@ -198,25 +192,20 @@ Opaque structure for holding in-progress action data. Callback notifying that action on proxy has returned and gupnp_service_proxy_end_action() etc can be called.

-

-

- + - + - +

proxy :

The GUPnPServiceProxy action is called from -The GUPnPServiceProxy action is called from

action :

The GUPnPServiceProxyAction in progress -The GUPnPServiceProxyAction in progress

user_data :

User data -User data
@@ -232,30 +221,24 @@ Callback notifying that action on variable on proxy has changed to value.

-

-

- + - + - + - +

proxy :

The GUPnPServiceProxy the notification originates from -The GUPnPServiceProxy the notification originates from

variable :

The name of the variable being notified -The name of the variable being notified

value :

The GValue of the variable being notified -The GValue of the variable being notified

user_data :

User data -User data
@@ -272,8 +255,6 @@ Sends action action with parameters proxy synchronously. If an error occurred, error will be set. In case of a UPnPError the error code will be the same in error.

-

-

@@ -284,8 +265,7 @@ a UPnPError the error code will be the same in error - + @@ -301,8 +281,8 @@ out parameter type, and out parameter value location, terminated with Returns :

-
+

action :

An action -An action

error :

TRUE if sending the action was succesful. - +TRUE if sending the action was succesful.
@@ -316,10 +296,7 @@ out parameter type, and out parameter value location, terminated with GError **error, va_list var_args);

-See gupnp_service_proxy_send_action(); this version takes a va_list for -use by language bindings. -

-

+See gupnp_service_proxy_send_action().

@@ -331,8 +308,7 @@ use by language bindings. - + @@ -343,13 +319,12 @@ use by language bindings. +out parameter type, and out parameter value location - +

action :

An action -An action

error :

var_args :

va_list of tuples of in parameter name, in parameter type, and in parameter value, followed by NULL, and then tuples of out parameter name, -out parameter type, and out parameter value location -

Returns :

TRUE if sending the action was succesful. - +TRUE if sending the action was succesful.
@@ -367,8 +342,6 @@ out parameter type, and out parameter value location See gupnp_service_proxy_send_action(); this version takes a pair of GHashTables for runtime determined parameter lists.

-

-

@@ -379,8 +352,7 @@ See action :

-
+ @@ -389,20 +361,20 @@ See in_hash :

-
- - +
An action -An action

error :

A GHashTable of in +A GHashTable of in parameter name and GValue pairs. [element-type utf8 GValue][transfer none]

out_hash :

A GHashTable +A GHashTable of out parameter name and initialized GValue pairs. [inout][element-type utf8 GValue][transfer full]

Returns :

TRUE if sending the action was succesful. - +TRUE if sending the action was succesful.
@@ -423,8 +395,6 @@ of out parameter name and initialized gupnp_service_proxy_begin_action_list and gupnp_service_proxy_end_action_list.

-

-

@@ -435,8 +405,7 @@ The synchronous variant of action :

-
+ @@ -445,38 +414,43 @@ The synchronous variant of in_names :

-
- - - - - +
An action -An action

error :

GList of 'in' parameter + +GList of 'in' parameter names (as strings). [element-type utf8][transfer none]

in_values :

GList of values (as + +GList of values (as GValue) that line up with in_names. [element-type GValue][transfer none]

out_names :

GList of 'out' parameter + +GList of 'out' parameter names (as strings). [element-type utf8][transfer none]

out_types :

GList of types (as GType) + +GList of types (as GType) that line up with out_names. [element-type GType][transfer none]

out_values :

GList of values + +GList of values (as GValue) that line up with out_names and out_types. [element-type GValue][transfer full][out]

Returns :

TRUE if sending the action was succesful. - +TRUE if sending the action was succesful.
@@ -496,8 +470,6 @@ Sends action action with parameters gupnp_service_proxy_end_action() to check for errors, to retrieve return values, and to free the GUPnPServiceProxyAction.

-

-

@@ -508,12 +480,11 @@ values, and to free the action :

-
+ - @@ -530,9 +501,9 @@ value, terminated with Returns :

-
@@ -548,10 +519,7 @@ value, terminated with gpointer user_data, va_list var_args);

-See gupnp_service_proxy_begin_action(); this version takes a va_list for -use by language bindings. -

-

+See gupnp_service_proxy_begin_action().

An action -An action

callback :

The callback to call when sending the action has succeeded +The callback to call when sending the action has succeeded or failed. [scope async]
A GUPnPServiceProxyAction handle. This will be freed when +A GUPnPServiceProxyAction handle. This will be freed when gupnp_service_proxy_cancel_action() or -gupnp_service_proxy_end_action_valist(). +gupnp_service_proxy_end_action_valist(). [transfer none]
@@ -563,14 +531,12 @@ use by language bindings. - + +or failed @@ -580,14 +546,13 @@ or failed +in parameter value - @@ -606,8 +571,6 @@ be freed when calling gupnp_service_proxy_begin_action(); this version takes a GHashTable for runtime generated parameter lists.

-

-

action :

An action -An action

callback :

(scope async) : The callback to call when sending the action has succeeded -or failed -

user_data :

var_args :

A va_list of tuples of in parameter name, in parameter type, and -in parameter value -

Returns :

A GUPnPServiceProxyAction handle. This will +A GUPnPServiceProxyAction handle. This will be freed when calling gupnp_service_proxy_cancel_action() or -gupnp_service_proxy_end_action_valist(). +gupnp_service_proxy_end_action_valist(). [transfer none]
@@ -618,12 +581,11 @@ for runtime generated parameter lists. - + - @@ -634,12 +596,12 @@ or failed. [hash :

- - @@ -661,38 +623,36 @@ be freed when calling gupnp_service_proxy_begin_action that takes lists of in-parameter names, types and values.

-

-

action :

An action -An action

callback :

The callback to call when sending the action has succeeded +The callback to call when sending the action has succeeded or failed. [scope async]
A GHashTable of in parameter name and GValue pairs +A GHashTable of in parameter name and GValue pairs. [element-type utf8 GValue]

Returns :

A GUPnPServiceProxyAction handle. This will +A GUPnPServiceProxyAction handle. This will be freed when calling gupnp_service_proxy_cancel_action() or gupnp_service_proxy_end_action_hash(). [transfer none]
- - + - - +failed @@ -701,7 +661,7 @@ failed - @@ -721,8 +681,6 @@ Retrieves the result of action. The out filled in, and if an error occurred, error will be set. In case of a UPnPError the error code will be the same in error.

-

-

proxy :

A GUPnPServiceProxy. [transfer none] +A GUPnPServiceProxy. [transfer none]

action :

An action -An action

in_names :

GList of 'in' parameter + +GList of 'in' parameter names (as strings). [element-type utf8][transfer none]

in_values :

GList of values (as + +GList of values (as GValue) that line up with in_names. [element-type GValue][transfer none]

callback :

(scope async) : The callback to call when sending the action has succeeded or -failed -

user_data :

Returns :

A GUPnPServiceProxyAction handle. This will +A GUPnPServiceProxyAction handle. This will be freed when calling gupnp_service_proxy_cancel_action or gupnp_service_proxy_end_action_list. [transfer none]
@@ -733,8 +691,7 @@ a UPnPError the error code will be the same in error - + @@ -745,13 +702,12 @@ a UPnPError the error code will be the same in error +freed after use - +

action :

A GUPnPServiceProxyAction handle -A GUPnPServiceProxyAction handle

error :

... :

tuples of out parameter name, out parameter type, and out parameter value location, terminated with NULL. The out parameter values should be -freed after use -

Returns :

TRUE on success. - +TRUE on success.
@@ -765,10 +721,7 @@ freed after use GError **error, va_list var_args);

-See gupnp_service_proxy_end_action(); this version takes a va_list for -use by language bindings. -

-

+See gupnp_service_proxy_end_action().

@@ -780,8 +733,7 @@ use by language bindings. - + @@ -792,13 +744,12 @@ use by language bindings. +freed after use - +

action :

A GUPnPServiceProxyAction handle -A GUPnPServiceProxyAction handle

error :

var_args :

A va_list of tuples of out parameter name, out parameter type, and out parameter value location. The out parameter values should be -freed after use -

Returns :

TRUE on success. - +TRUE on success.
@@ -814,8 +765,6 @@ freed after use See gupnp_service_proxy_end_action(); this version takes a GHashTable for runtime generated parameter lists.

-

-

@@ -826,8 +775,7 @@ runtime generated parameter lists. - + @@ -836,14 +784,14 @@ runtime generated parameter lists. - - +

action :

A GUPnPServiceProxyAction handle -A GUPnPServiceProxyAction handle

error :

hash :

A GHashTable of +A GHashTable of out parameter name and initialised GValue pairs. [element-type utf8 GValue][inout][transfer none]

Returns :

TRUE on success. - +TRUE on success.
@@ -863,11 +811,6 @@ out-parameter names, types and place-holders for values. The returned list in out_values must be freed using g_list_free and each element in it using g_value_unset and g_slice_free.

-

-Return value : TRUE on success. -

-

-

@@ -878,8 +821,7 @@ Return value : action :

-
+ @@ -888,26 +830,29 @@ Return value : out_names :

-
- - +TRUE on success.
A GUPnPServiceProxyAction handle -A GUPnPServiceProxyAction handle

error :

GList of 'out' parameter + +GList of 'out' parameter names (as strings). [element-type utf8][transfer none]

out_types :

GList of types (as GType) + +GList of types (as GType) that line up with out_names. [element-type GType][transfer none]

out_values :

GList of values + +GList of values (as GValue) that line up with out_names and out_types. [element-type GValue][transfer full][out]

Returns :

-
@@ -920,8 +865,6 @@ that line up with out_names. Cancels action, freeing the action handle.

-

-

@@ -932,8 +875,7 @@ Cancels action, freeing the action :

-
+
A GUPnPServiceProxyAction handle -A GUPnPServiceProxyAction handle
@@ -950,8 +892,6 @@ Cancels action, freeing the callback to be called whenever a change notification for variable is recieved.

-

-

@@ -962,17 +902,15 @@ Sets up callback to be called whenever a - + - + - @@ -982,8 +920,8 @@ Sets up callback to be called whenever a - +

variable :

The variable to add notification for -The variable to add notification for

type :

The type of the variable -The type of the variable

callback :

The callback to call when variable changes. [scope async] +The callback to call when variable changes. [scope async]

Returns :

TRUE on success. - +TRUE on success.
@@ -999,6 +937,9 @@ Sets up callback to be called whenever a Cancels the variable change notification for callback and user_data.

+This function must not be called directly or indirectly from a +GUPnPServiceProxyNotifyCallback associated with this service proxy, even +if it is for another variable.

@@ -1010,12 +951,11 @@ Cancels the variable change notification for callbac - + - @@ -1025,8 +965,8 @@ Cancels the variable change notification for callbac - +

variable :

The variable to add notification for -The variable to add notification for

callback :

The callback to call when variable changes +The callback to call when variable changes. [scope call]

Returns :

TRUE on success. - +TRUE on success.
@@ -1045,8 +985,6 @@ If you want to unsubcribe from this service because the application is quitting, rely on automatic synchronised unsubscription on object destruction instead.

-

-

@@ -1058,8 +996,7 @@ destruction instead. +TRUE to subscribe to this service

subscribed :

-TRUE to subscribe to this service -
@@ -1071,8 +1008,6 @@ destruction instead.

Returns if we are subscribed to this service.

-

-

@@ -1083,8 +1018,8 @@ Returns if we are subscribed to this service. - +

Returns :

TRUE if we are subscribed to this service, otherwise FALSE. - +TRUE if we are subscribed to this service, otherwise FALSE.
@@ -1098,8 +1033,6 @@ Returns if we are subscribed to this service.

Whether we are subscribed to this service.

-

-

Default value: FALSE

@@ -1114,20 +1047,17 @@ Whether we are subscribed to this service. Emitted whenever the subscription to this service has been lost due to an error condition.

-

-

- + @@ -1141,6 +1071,6 @@ been lost + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/GUPnPWhiteList.html b/doc/html/GUPnPWhiteList.html new file mode 100644 index 0000000..9b9bd67 --- /dev/null +++ b/doc/html/GUPnPWhiteList.html @@ -0,0 +1,311 @@ + + + + +GUPnPWhiteList + + + + + + + + + +

proxy :

The GUPnPServiceProxy that received the signal -The GUPnPServiceProxy that received the signal

error :

A pointer to a GError describing why the subscription has -been lost +been lost. [type GError]
+ + + + + + + + + +
+
+
+ + +
+

GUPnPWhiteList

+

GUPnPWhiteList — Class for network filtering.

+
+ +
+

Object Hierarchy

+
+  GObject
+   +----GUPnPWhiteList
+
+
+
+

Description

+

+GUPnPWhiteList handles network filtering. It provides API to manage a list +of entries that will be used to filter networks. +The GUPnPWhiteList could be enabled or not. If it's enabled but the entries +list is empty, it behaves as disabled. +

+
+
+

Details

+
+

struct GUPnPWhiteList

+
struct GUPnPWhiteList;
+

+This struct contains private data only, and should be accessed using the +functions below. +

+
+
+
+

gupnp_white_list_add_entry ()

+
gboolean            gupnp_white_list_add_entry          (GUPnPWhiteList *white_list,
+                                                         gchar *entry);
+

+Add entry in the list of valid criteria used by white_list to +filter networks. +if entry already exists, it won't be added a second time. +

+
++ + + + + + + + + + + + + + +

white_list :

A GUPnPWhiteList +

entry :

A value used to filter network

Returns :

+TRUE if entry is added, FALSE otherwise.
+
+
+
+

gupnp_white_list_check_context ()

+
gboolean            gupnp_white_list_check_context      (GUPnPWhiteList *white_list,
+                                                         GUPnPContext *context);
+

+It will check if the context is allowed or not. The white_list will check +all its entries againt GUPnPContext interface, host ip and network fields +information. This function doesn't take into account the white_list status +(enabled or not). +

+
++ + + + + + + + + + + + + + +

white_list :

A GUPnPWhiteList +

context :

A GUPnPContext to test.

Returns :

+TRUE if context is matching the white_list criterias, +FALSE otherwise.
+
+
+
+

gupnp_white_list_clear ()

+
void                gupnp_white_list_clear              (GUPnPWhiteList *white_list);
+

+Remove all entries from GList that compose the white list. +The list is now empty. Even if GUPnPWhiteList is enabled, it will have the +same behavior as if it was disabled. +

+
++ + + + +

white_list :

A GUPnPWhiteList +
+
+
+
+

gupnp_white_list_set_enabled ()

+
void                gupnp_white_list_set_enabled        (GUPnPWhiteList *white_list,
+                                                         gboolean enable);
+

+Enable or disable the GUPnPWhiteList to perform the network filtering. +

+
++ + + + + + + + + + +

white_list :

A GUPnPWhiteList +

enable :

+TRUE to enable white_list, FALSE otherwise
+
+
+
+

gupnp_white_list_get_entries ()

+
GList *             gupnp_white_list_get_entries        (GUPnPWhiteList *white_list);
+

+Get the GList of entries that compose the white list. Do not free +

+
++ + + + + + + + + + +

white_list :

A GUPnPWhiteList +

Returns :

a GList of entries +used to filter networks, interfaces,... or NULL. +Do not modify or free the list nor its elements. [element-type utf8][transfer none] +
+
+
+
+

gupnp_white_list_is_empty ()

+
gboolean            gupnp_white_list_is_empty           (GUPnPWhiteList *white_list);
+

+Return the state of the entries list of GUPnPWhiteList +

+
++ + + + + + + + + + +

white_list :

A GUPnPWhiteList +

Returns :

+TRUE if white_list is empty, FALSE otherwise.
+
+
+
+

gupnp_white_list_get_enabled ()

+
gboolean            gupnp_white_list_get_enabled        (GUPnPWhiteList *white_list);
+

+Return the status of the GUPnPWhiteList +

+
++ + + + + + + + + + +

white_list :

A GUPnPWhiteList +

Returns :

+TRUE if white_list is enabled, FALSE otherwise.
+
+
+
+

gupnp_white_list_new ()

+
GUPnPWhiteList *    gupnp_white_list_new                (void);
+

+Create a new GUPnPWhiteList. +The white list is disabled by default. +

+
++ + + + +

Returns :

A new GUPnPWhiteList object. [transfer full] +
+
+
+
+

gupnp_white_list_remove_entry ()

+
gboolean            gupnp_white_list_remove_entry       (GUPnPWhiteList *white_list,
+                                                         gchar *entry);
+

+Remove entry in the list of valid criteria used by white_list to +filter networks. +

+
++ + + + + + + + + + + + + + +

white_list :

A GUPnPWhiteList +

entry :

A value to remove from the filter list.

Returns :

+TRUE if entry is removed, FALSE otherwise.
+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/GUPnPXMLDoc.html b/doc/html/GUPnPXMLDoc.html index 3e2df2d..dc011ab 100644 --- a/doc/html/GUPnPXMLDoc.html +++ b/doc/html/GUPnPXMLDoc.html @@ -3,12 +3,12 @@ GUPnPXMLDoc - + - + @@ -39,7 +39,7 @@

Synopsis

-
                    GUPnPXMLDoc;
+
struct              GUPnPXMLDoc;
 GUPnPXMLDoc *       gupnp_xml_doc_new                   (xmlDoc *xml_doc);
 GUPnPXMLDoc *       gupnp_xml_doc_new_from_path         (const char *path,
                                                          GError **error);
@@ -58,19 +58,25 @@
 GObject wrapper for xmlDoc, so that we can use refcounting and weak
 references.
 

-

-

Details

-

GUPnPXMLDoc

-
typedef struct {
+

struct GUPnPXMLDoc

+
struct GUPnPXMLDoc {
         xmlDoc *doc;
-} GUPnPXMLDoc;
+};
 

+Reference-counting wrapper for libxml's xmlDoc

+
++ + + + +

xmlDoc *doc;

Pointer to the document.

@@ -79,20 +85,16 @@ references.

Create a new GUPnPXMLDoc for xml_doc.

-

-

- + - +

xml_doc :

Pointer to xmlDoc to wrap under this object -Pointer to xmlDoc to wrap under this object

Returns :

A new GUPnPXMLDoc, or NULL on an error -A new GUPnPXMLDoc, or NULL on an error
@@ -105,25 +107,20 @@ Create a new Create a new GUPnPXMLDoc for the XML document at path.

-

-

- + - + - +

path :

Path to xml document -Path to xml document

error :

Location to put the error into -Location to put the error into

Returns :

A new GUPnPXMLDoc, or NULL on an error -A new GUPnPXMLDoc, or NULL on an error
@@ -132,6 +129,6 @@ Create a new + Generated by GTK-Doc V1.18
\ No newline at end of file diff --git a/doc/html/annotation-glossary.html b/doc/html/annotation-glossary.html index ef7a699..e128a1a 100644 --- a/doc/html/annotation-glossary.html +++ b/doc/html/annotation-glossary.html @@ -3,12 +3,12 @@ Annotation Glossary - + - + @@ -29,8 +29,12 @@  |  I  |  + T +  |  E  |  + S +  |  T @@ -53,20 +57,28 @@
inout

Parameter for input and for returning results. Default is transfer full.

+

T

+
+transfer none
+

Don't free data after the code is done.

E

element-type

Generics and defining elements of containers and arrays.

+

S

+
+scope call
+

The callback is valid only during the call to the method.

T

transfer full

Free data after the code is done.

-transfer none
-

Don't free data after the code is done.

+type +

Override the parsed C type with given type

+ Generated by GTK-Doc V1.18
\ No newline at end of file diff --git a/doc/html/api-device-control.html b/doc/html/api-device-control.html index 3b8ad15..029ded6 100644 --- a/doc/html/api-device-control.html +++ b/doc/html/api-device-control.html @@ -3,12 +3,12 @@ Device Control - + - + @@ -36,6 +36,6 @@
+ Generated by GTK-Doc V1.18
\ No newline at end of file diff --git a/doc/html/api-device-impl.html b/doc/html/api-device-impl.html index f4c3aec..ba34c56 100644 --- a/doc/html/api-device-impl.html +++ b/doc/html/api-device-impl.html @@ -3,12 +3,12 @@ Device Implementation - + - + @@ -36,6 +36,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/api-device-info.html b/doc/html/api-device-info.html index abd0502..f85ec54 100644 --- a/doc/html/api-device-info.html +++ b/doc/html/api-device-info.html @@ -3,12 +3,12 @@ Device Information - + - + @@ -36,6 +36,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/api-tools.html b/doc/html/api-tools.html index dafb0d4..ab0b716 100644 --- a/doc/html/api-tools.html +++ b/doc/html/api-tools.html @@ -3,12 +3,12 @@ Tools - + - + @@ -28,6 +28,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/api-utility.html b/doc/html/api-utility.html index 3eb3adf..8c6af5a 100644 --- a/doc/html/api-utility.html +++ b/doc/html/api-utility.html @@ -3,12 +3,12 @@ Utility Functions - + - + @@ -30,6 +30,9 @@ GUPnPContextManager — Manages GUPnPContext objects.
+GUPnPWhiteList — Class for network filtering. +
+
GUPnPResourceFactory — Class for resource and resource proxy object creation.
@@ -45,6 +48,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/api.html b/doc/html/api.html index 99702ba..2222802 100644 --- a/doc/html/api.html +++ b/doc/html/api.html @@ -3,12 +3,12 @@ Part II. Reference - + - + @@ -70,6 +70,9 @@ GUPnPContextManager — Manages GUPnPContext objects.
+GUPnPWhiteList — Class for network filtering. +
+
GUPnPResourceFactory — Class for resource and resource proxy object creation.
@@ -91,6 +94,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/client-tutorial.html b/doc/html/client-tutorial.html index 37b1edd..395ddcd 100644 --- a/doc/html/client-tutorial.html +++ b/doc/html/client-tutorial.html @@ -3,12 +3,12 @@ Writing a UPnP Client - + - + @@ -24,7 +24,7 @@ Writing a UPnP Client

-Introduction

+Introduction

This chapter explains how to write an application which fetches the external IP address from an UPnP-compliant modem. To do this a @@ -41,7 +41,7 @@

-Finding Services

+Finding Services

First, we initialize GUPnP and create a control point targeting the service type. Then we connect a signal handler so that we are notified @@ -66,8 +66,9 @@ main (int argc, char **argv) GUPnPControlPoint *cp; /* Required initialisation */ - g_thread_init (NULL); - g_type_init (); + #if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); + #endif /* Create a new GUPnP Context. By here we are using the default GLib main context, and connecting to the current machine's default IP on an @@ -103,7 +104,7 @@ main (int argc, char **argv)

-Invoking Actions

+Invoking Actions

Now we have an application which searches for the service we specified and calls service_proxy_available_cb for each one it @@ -153,11 +154,11 @@ service_proxy_available_cb (GUPnPControlPoint *cp,

-Subscribing to state variable change notifications

+Subscribing to state variable change notifications

It is possible to get change notifications for the service state variables that have attribute sendEvents="yes". We'll demonstrate - this by modifying service_proxy_available_cb() and using + this by modifying service_proxy_available_cb and using gupnp_service_proxy_add_notify() to setup a notification callback:

static void
@@ -188,7 +189,7 @@ service_proxy_available_cb (GUPnPControlPoint *cp,
 
 

-Generating Wrappers

+Generating Wrappers

Using gupnp_service_proxy_send_action() and gupnp_service_proxy_add_notify () can become tedious, because of the requirement to specify the types and deal @@ -228,6 +229,6 @@ service_proxy_available_cb (GUPnPControlPoint *cp,

+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/glossary.html b/doc/html/glossary.html index 88e32fb..bea7da0 100644 --- a/doc/html/glossary.html +++ b/doc/html/glossary.html @@ -3,12 +3,12 @@ Glossary - + - + @@ -145,7 +145,7 @@

A common practise is to generate a unique UDN on first boot from a - random seed, or use some unique and persistant property such as the + random seed, or use some unique and persistent property such as the device's MAC address to create the UDN.

See Also Device.

@@ -154,6 +154,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/gupnp-Error-codes.html b/doc/html/gupnp-Error-codes.html index bd948cd..e03eb82 100644 --- a/doc/html/gupnp-Error-codes.html +++ b/doc/html/gupnp-Error-codes.html @@ -3,12 +3,12 @@ Error codes - + - + @@ -49,8 +49,6 @@ enum

Description

-

-

Details

@@ -61,14 +59,11 @@ enum The GQuark uniquely used by GUPnP's server errors.

-

-

- +

Returns :

a GQuark uniquely used by GUPnP's server errors. -a GQuark uniquely used by GUPnP's server errors.
@@ -88,8 +83,6 @@ The GError codes used for errors in the GUPNP_SERVER_ERROR domain, when there is communication with another server.

-

-

@@ -134,14 +127,11 @@ is communication with another server.

The GQuark uniquely used by GUPnP's eventing errors.

-

-

- +

Returns :

a GQuark uniquely used by GUPnP's eventing errors. -a GQuark uniquely used by GUPnP's eventing errors.
@@ -158,8 +148,6 @@ The GError codes used for errors in the GUPNP_EVENTING_ERROR domain, during eventing of state variables.

-

-

@@ -189,14 +177,11 @@ eventing of state variables.

The GQuark uniquely used by GUPnP's control errors.

-

-

- +

Returns :

a GQuark uniquely used by GUPnP's control errors. -a GQuark uniquely used by GUPnP's control errors.
@@ -214,8 +199,6 @@ The GError codes used for errors in the GUPNP_CONTROL_ERROR domain, during invocation of service actions.

-

-

@@ -250,14 +233,11 @@ invocation of service actions.

The GQuark uniquely used by GUPnP XML processing errors.

-

-

- +

Returns :

a GQuark uniquely used by GUPnP XML processing errors. -a GQuark uniquely used by GUPnP XML processing errors.
@@ -268,6 +248,7 @@ The GError codes used for errors in the GUPNP_XML_ERROR domain, during processing of XML data.

-

-

@@ -296,6 +275,11 @@ processing of XML data. + + + + @@ -307,6 +291,6 @@ processing of XML data. + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/gupnp-Special-UPnP-types.html b/doc/html/gupnp-Special-UPnP-types.html index 50855aa..72858a9 100644 --- a/doc/html/gupnp-Special-UPnP-types.html +++ b/doc/html/gupnp-Special-UPnP-types.html @@ -3,12 +3,12 @@ Special UPnP types - + - + @@ -54,8 +54,6 @@ These GTypes are used to marshal to and from string data to particular UPnP types when invoking actions on a GUPnPServiceProxy.

-

-

Details

@@ -65,8 +63,6 @@ types when invoking actions on a A string type containing Base-64 encoded binary data.

-

-









+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/gupnp-binding-tool.html b/doc/html/gupnp-binding-tool.html index 85c105e..9b96911 100644 --- a/doc/html/gupnp-binding-tool.html +++ b/doc/html/gupnp-binding-tool.html @@ -3,12 +3,12 @@ gupnp-binding-tool - + - + @@ -33,7 +33,7 @@

gupnp-binding-tool [--prefix {PREFIX}] [--mode {client|server}] {SCPD file}

-

Description

+

Description

gupnp-binding-tool takes a SCPD file and generates convenience C functions which call the actual GUPnP functions. The client-side bindings can be seen @@ -49,7 +49,7 @@

-

Client side bindings

+

Client side bindings

As an example, this action:

@@ -138,7 +138,7 @@ igd_external_ip_address_add_notify (GUPnPServiceProxy *proxy,

-

Server side bindings

+

Server side bindings

The corresponding server bindings for the same UPnP action (DeletePortMapping) look like this: @@ -183,6 +183,6 @@ igd_external_ip_address_variable_notify (GUPnPService *service,

+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/gupnp-gupnp-service-introspection.html b/doc/html/gupnp-gupnp-service-introspection.html index 013ddda..a623a71 100644 --- a/doc/html/gupnp-gupnp-service-introspection.html +++ b/doc/html/gupnp-gupnp-service-introspection.html @@ -3,12 +3,12 @@ GUPnPServiceIntrospection - + - + @@ -45,7 +45,7 @@ GUPnPServiceActionArgInfo; GUPnPServiceActionInfo; GUPnPServiceStateVariableInfo; - GUPnPServiceIntrospection; +struct GUPnPServiceIntrospection; const GList * gupnp_service_introspection_list_action_names (GUPnPServiceIntrospection *introspection); const GList * gupnp_service_introspection_list_actions @@ -96,15 +96,12 @@ document does not provide any or all of the introspection information. This class exposes internals of the UPnP protocol and should not need to be used for regular device or control point development.

-

-

Details

enum GUPnPServiceActionArgDirection

-
typedef enum
-{
+
typedef enum {
         GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN,
         GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT
 } GUPnPServiceActionArgDirection;
@@ -112,8 +109,6 @@ to be used for regular device or control point development.
 

Represents the direction of a service state variable.

-

-

GUPNP_XML_ERROR_INVALID_ATTRIBUTE

An XML node has an unknown attribute. +

GUPNP_XML_ERROR_OTHER

Unknown/unhandled XML related errors.
@@ -143,31 +138,25 @@ Represents the direction of a service state variable.

This structure contains information about the argument of service action.

-

-

- + - + +argument. - +

char *name;

The name of the action argument. -The name of the action argument.

GUPnPServiceActionArgDirection direction;

The direction of the action argument. -The direction of the action argument.

char *related_state_variable;

The name of the state variable associated with this -argument. -

gboolean retval;

Whether this argument is the return value of the action. -Whether this argument is the return value of the action.
@@ -183,20 +172,17 @@ argument.

This structure contains information about a service action.

-

-

- + @@ -220,60 +206,50 @@ This structure contains information about a service action.

This structure contains information about service state variable.

-

-

char *name;

The name of the action argument. -The name of the action argument.

GList *arguments;

A GList of all the arguments -(of type GUPnPServiceActionArgInfo) of this action. +(of type GUPnPServiceActionArgInfo) of this action. [type GList][element-type GUPnP.ServiceActionArgInfo]
- + - + +float). - + - + +data types. +data types. +data types. @@ -281,14 +257,12 @@ contains a list of (char *) strings rather than GValues.
-

GUPnPServiceIntrospection

-
typedef struct _GUPnPServiceIntrospection GUPnPServiceIntrospection;
+

struct GUPnPServiceIntrospection

+
struct GUPnPServiceIntrospection;

This struct contains private data only, and should be accessed using the functions below.

-

-


@@ -298,8 +272,6 @@ functions below.

Returns a GList of names of all the actions in this service.

-

-

char *name;

The name of the state variable. -The name of the state variable.

gboolean send_events;

Whether this state variable can source events. -Whether this state variable can source events.

gboolean is_numeric;

Wether this state variable is a numeric type (integer and -float). -

GType type;

The GType of this state variable. -The GType of this state variable.

GValue default_value;

The default value of this state variable. -The default value of this state variable.

GValue minimum;

The minimum value of this state variable. Only applies to numeric -data types. -

GValue maximum;

The maximum value of this state variable. Only applies to numeric -data types. -

GValue step;

The step value of this state variable. Only applies to numeric -data types. -

GList *allowed_values;

The allowed values of this state variable. Only applies to string data types. Unlike the other fields in this structure, this field -contains a list of (char *) strings rather than GValues. +contains a list of (char *) strings rather than GValues. [element-type utf8]
@@ -310,9 +282,8 @@ Returns a GList of names of all the actions in this service. - +

Returns :

(transfer none) (element-type utf8) : A GList of names of all -the actions or NULL. Do not modify or free it or its contents. -(transfer none) (element-type utf8) : A GList of names of all +the actions or NULL. Do not modify or free it or its contents.
@@ -326,8 +297,6 @@ the actions or GList of all the actions (of type GUPnPServiceActionInfo) in this service.

-

-

@@ -338,9 +307,9 @@ this service. - @@ -355,8 +324,6 @@ contents. [action_name in this service.

-

-

Returns :

A +A GList of all the actions or NULL. Do not modify or free it or its -contents. [element-type GUPnP.ServiceActionInfo*][transfer none] +contents. [element-type GUPnP.ServiceActionInfo][transfer none]
@@ -367,12 +334,11 @@ Returns the action by the name action_name - + - @@ -387,8 +353,6 @@ it. [GList of names of all the state variables in this service.

-

-

action_name :

The name of the action to retreive -The name of the action to retrieve

Returns :

the action or NULL. Do not modify or free +the action or NULL. Do not modify or free it. [transfer none]
@@ -399,7 +363,7 @@ Returns a Returns :

-
@@ -415,8 +379,6 @@ the state variables or GUPnPServiceStateVariableInfo) in this service.

-

-

A GList of names of all +A GList of names of all the state variables or NULL. Do not modify or free it or its contents. [element-type utf8][transfer none]
@@ -427,8 +389,7 @@ Returns a GList of all the state variables (of type - @@ -444,8 +405,6 @@ its contents. [variable_name in this service.

-

-

Returns :

-A GList of all the state variables or NULL. Do not modify or free it or +A GList of all the state variables or NULL. Do not modify or free it or its contents. [element-type GUPnP.ServiceStateVariableInfo][transfer none]
@@ -456,12 +415,12 @@ Returns the state variable by the name variable_name - + - @@ -476,13 +435,11 @@ Returns the state variable by the name variable_name

The scpd of the device description file.

-

-

+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/gupnp.devhelp b/doc/html/gupnp.devhelp deleted file mode 100644 index deaa7b6..0000000 --- a/doc/html/gupnp.devhelp +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/html/gupnp.devhelp2 b/doc/html/gupnp.devhelp2 index b068770..b79f7af 100644 --- a/doc/html/gupnp.devhelp2 +++ b/doc/html/gupnp.devhelp2 @@ -26,6 +26,7 @@ + @@ -44,7 +45,7 @@ - + @@ -63,6 +64,7 @@ + @@ -78,7 +80,7 @@ - + @@ -102,7 +104,7 @@ - + @@ -110,7 +112,7 @@ - + @@ -122,8 +124,8 @@ - - + + @@ -146,9 +148,9 @@ - + - + @@ -156,12 +158,13 @@ + - - + + @@ -176,6 +179,7 @@ + @@ -186,7 +190,7 @@ - + @@ -194,30 +198,47 @@ + + + - - + + + + - + + + - + + + + + + + + + + + - + @@ -255,6 +276,7 @@ + diff --git a/doc/html/home.png b/doc/html/home.png index 17003611d9df2b066afc682cbde962f3a575002d..fb60b552ed4965b293039b2f814a71afca95e90c 100644 GIT binary patch literal 578 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAeF*RgaRt)<2Mz#jXJKLC;Nall z;SmuLk&uv3P*6}&QPI%Q(9zK`Ffg#Nu&}YQad2?(_xBG72#Ai3j*pK|NJz-Z$*Hcc zZfI!e?(SZ^c=7u6>-X>9fB5j>l-IX+&z`?}`|kaRPoKYh z`~LIypTGZ3G@p47sO!3?i(^Q|t+nT)!&fY+K7It<8`5*2;fuxNO3aRMvTDwK$8R_2G`Mj{ z^E<0ac3!wQQzE%;MdAv<`$uXnv9`S09_8~rhEee)yK`rlo5QUMbwDpNc)I$ztaD0e F0s!lvLUI5A delta 640 zcmV-`0)PF&1daue8Gi-<007{3J@^0s00v@9M??Vs0RI60puMM)00009a7bBm000XT z000XT0n*)m`~Uy|2XskIMF-Ld9|bW7_1a5z0006TNklb;M~4nwI^3X>e}aQU$A1bfD2O<;;E)V~9@Kyk zA%$iLM6i&60fpz%lWS~ZQrp1?Z+ZN9@B8k{?{{#+ut^U}x&=G}9I$U@U#=}c(gN@X z@aIw=NPz|rm9)=h)}M6f!u)}xUa!~F+S;0uBvGr?(g=K$^l;(^lD2?n?RGm@US1~8 za{!_!Vt03!T7RuZqtO7sImhPaCf@rq;I^3!#u*2aUP)55T2&N90xmEJ0s&fGT~(T< z3d2xYmK9C>IP*x-M@ib*+0pFm>>uW37N2Wzaq-fCnIZE9pb8}0+uN+KuQM2oZVHfP z8U6kQdo3?>Wo2dT)WeM9So8DqW&&C5J*(hPtz=NwB*OLRINYPA}bN`)jz{=T>p@;oQc zbK*G0dyn@Xpo65ll6sQVYPAF?P18{~btJMZ6QF~GgF^Z)>E4W))qy*}r>RCBj}CCh z%-+ucn0Z+T_ GUPnP Reference Manual - + - + @@ -14,11 +14,11 @@

variable_name :

The name of the variable to retreive -The name of the variable to retrieve

Returns :

the state variable or NULL. Do not modify or free it. +the state variable or NULL. Do not modify or +free it. [transfer none]
-

Version 0.14.0 +

Version 0.20.5

-

+

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later @@ -95,6 +95,9 @@ GUPnPContextManager — Manages GUPnPContext objects.

+GUPnPWhiteList — Class for network filtering. +
+
GUPnPResourceFactory — Class for resource and resource proxy object creation.
@@ -124,6 +127,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/index.sgml b/doc/html/index.sgml index a4c7f5e..0788f18 100644 --- a/doc/html/index.sgml +++ b/doc/html/index.sgml @@ -23,6 +23,7 @@ + @@ -170,6 +171,7 @@ + @@ -177,13 +179,14 @@ + - + @@ -198,6 +201,7 @@ + @@ -213,6 +217,7 @@ + @@ -224,10 +229,13 @@ + + + @@ -241,15 +249,34 @@ + + + + - + + + + + + + + + + + + + + + + @@ -298,6 +325,7 @@ + @@ -317,6 +345,8 @@ + + - + diff --git a/doc/html/ix01.html b/doc/html/ix01.html index ba33a93..b542543 100644 --- a/doc/html/ix01.html +++ b/doc/html/ix01.html @@ -3,11 +3,11 @@ Index - + - + @@ -20,11 +20,13 @@

-Index

+Index

G

-
GUPnPContext, GUPnPContext +
GUPnPContext, struct GUPnPContext +
+
GUPnPContext:default-language, The "default-language" property
GUPnPContext:port, The "port" property
@@ -34,21 +36,21 @@
GUPnPContext:subscription-timeout, The "subscription-timeout" property
-
GUPnPContextManager, GUPnPContextManager +
GUPnPContextManager, struct GUPnPContextManager
GUPnPContextManager::context-available, The "context-available" signal
GUPnPContextManager::context-unavailable, The "context-unavailable" signal
-
GUPnPContextManager:context-manager, The "context-manager" property -
GUPnPContextManager:main-context, The "main-context" property
GUPnPContextManager:port, The "port" property
+
GUPnPContextManager:white-list, The "white-list" property +
GUPnPControlError, enum GUPnPControlError
-
GUPnPControlPoint, GUPnPControlPoint +
GUPnPControlPoint, struct GUPnPControlPoint
GUPnPControlPoint::device-proxy-available, The "device-proxy-available" signal
@@ -60,11 +62,11 @@
GUPnPControlPoint:resource-factory, The "resource-factory" property
-
GUPnPDevice, GUPnPDevice +
GUPnPDevice, struct GUPnPDevice
GUPnPDevice:root-device, The "root-device" property
-
GUPnPDeviceInfo, GUPnPDeviceInfo +
GUPnPDeviceInfo, struct GUPnPDeviceInfo
GUPnPDeviceInfo:context, The "context" property
@@ -82,13 +84,13 @@
GUPnPDeviceInfo:url-base, The "url-base" property
-
GUPnPDeviceProxy, GUPnPDeviceProxy +
GUPnPDeviceProxy, struct GUPnPDeviceProxy
GUPnPEventingError, enum GUPnPEventingError
-
GUPnPResourceFactory, GUPnPResourceFactory +
GUPnPResourceFactory, struct GUPnPResourceFactory
-
GUPnPRootDevice, GUPnPRootDevice +
GUPnPRootDevice, struct GUPnPRootDevice
GUPnPRootDevice:available, The "available" property
@@ -100,7 +102,7 @@
GUPnPServerError, enum GUPnPServerError
-
GUPnPService, GUPnPService +
GUPnPService, struct GUPnPService
GUPnPService::action-invoked, The "action-invoked" signal
@@ -110,7 +112,7 @@
GUPnPService:root-device, The "root-device" property
-
GUPnPServiceAction, GUPnPServiceAction +
GUPnPServiceAction, GUPnPServiceAction
GUPnPServiceActionArgDirection, enum GUPnPServiceActionArgDirection
@@ -118,7 +120,7 @@
GUPnPServiceActionInfo, GUPnPServiceActionInfo
-
GUPnPServiceInfo, GUPnPServiceInfo +
GUPnPServiceInfo, struct GUPnPServiceInfo
GUPnPServiceInfo:context, The "context" property
@@ -134,13 +136,13 @@
GUPnPServiceInfo:url-base, The "url-base" property
-
GUPnPServiceIntrospection, GUPnPServiceIntrospection +
GUPnPServiceIntrospection, struct GUPnPServiceIntrospection
GUPnPServiceIntrospection:scpd, The "scpd" property
GUPnPServiceIntrospectionCallback, GUPnPServiceIntrospectionCallback ()
-
GUPnPServiceProxy, GUPnPServiceProxy +
GUPnPServiceProxy, struct GUPnPServiceProxy
GUPnPServiceProxy::subscription-lost, The "subscription-lost" signal
@@ -154,10 +156,14 @@
GUPnPServiceStateVariableInfo, GUPnPServiceStateVariableInfo
-
GUPnPXMLDoc, GUPnPXMLDoc +
GUPnPWhiteList, struct GUPnPWhiteList +
+
GUPnPXMLDoc, struct GUPnPXMLDoc
GUPnPXMLError, enum GUPnPXMLError
+
gupnp_context_get_default_language, gupnp_context_get_default_language () +
gupnp_context_get_host_ip, gupnp_context_get_host_ip ()
gupnp_context_get_port, gupnp_context_get_port () @@ -172,14 +178,24 @@
gupnp_context_host_path_for_agent, gupnp_context_host_path_for_agent ()
+
gupnp_context_manager_create, gupnp_context_manager_create () +
+
gupnp_context_manager_get_port, gupnp_context_manager_get_port () +
+
gupnp_context_manager_get_white_list, gupnp_context_manager_get_white_list () +
gupnp_context_manager_manage_control_point, gupnp_context_manager_manage_control_point ()
gupnp_context_manager_manage_root_device, gupnp_context_manager_manage_root_device ()
gupnp_context_manager_new, gupnp_context_manager_new ()
+
gupnp_context_manager_rescan_control_points, gupnp_context_manager_rescan_control_points () +
gupnp_context_new, gupnp_context_new ()
+
gupnp_context_set_default_language, gupnp_context_set_default_language () +
gupnp_context_set_subscription_timeout, gupnp_context_set_subscription_timeout ()
gupnp_context_unhost_path, gupnp_context_unhost_path () @@ -244,6 +260,8 @@
gupnp_device_info_list_dlna_capabilities, gupnp_device_info_list_dlna_capabilities ()
+
gupnp_device_info_list_dlna_device_class_identifier, gupnp_device_info_list_dlna_device_class_identifier () +
gupnp_device_info_list_services, gupnp_device_info_list_services ()
gupnp_device_info_list_service_types, gupnp_device_info_list_service_types () @@ -270,6 +288,8 @@
gupnp_root_device_get_relative_location, gupnp_root_device_get_relative_location ()
+
gupnp_root_device_get_ssdp_resource_group, gupnp_root_device_get_ssdp_resource_group () +
gupnp_root_device_new, gupnp_root_device_new ()
gupnp_root_device_new_full, gupnp_root_device_new_full () @@ -280,6 +300,8 @@
gupnp_service_action_get, gupnp_service_action_get ()
+
gupnp_service_action_get_argument_count, gupnp_service_action_get_argument_count () +
gupnp_service_action_get_gvalue, gupnp_service_action_get_gvalue ()
gupnp_service_action_get_locales, gupnp_service_action_get_locales () @@ -404,6 +426,24 @@
GUPNP_TYPE_UUID, GUPNP_TYPE_UUID
+
gupnp_white_list_add_entry, gupnp_white_list_add_entry () +
+
gupnp_white_list_check_context, gupnp_white_list_check_context () +
+
gupnp_white_list_clear, gupnp_white_list_clear () +
+
gupnp_white_list_get_enabled, gupnp_white_list_get_enabled () +
+
gupnp_white_list_get_entries, gupnp_white_list_get_entries () +
+
gupnp_white_list_is_empty, gupnp_white_list_is_empty () +
+
gupnp_white_list_new, gupnp_white_list_new () +
+
gupnp_white_list_remove_entry, gupnp_white_list_remove_entry () +
+
gupnp_white_list_set_enabled, gupnp_white_list_set_enabled () +
gupnp_xml_doc_new, gupnp_xml_doc_new ()
gupnp_xml_doc_new_from_path, gupnp_xml_doc_new_from_path () @@ -415,6 +455,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/left.png b/doc/html/left.png index 2d05b3d5b4aeec9384bbfe404bfc4ed0897051c4..48cab276723733c79792bf270990592938a46e1f 100644 GIT binary patch literal 373 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaA)dl#3xB}__)B_+ZBqTI6G_0+y z9UL4Q8XB6Lo0l(Ne*OCO`}glZe*F0P^XIQ$zyAFB^Y7okf!3B;efk5`BUKXQ7tFxI zBOsw-U}EEukX}$--`zib{^He#Z{Pp?dtyH?D^OLBr;B4q#jV^+H-(xE1Y9l_Iu;z4 zZR+ak`upELn{z+1{HV^C3RAUx`dg(vwnTdruGcuhx4p|L{wTx5ZYPx&X4B#s`RabR uK2tDo4+%_Il(5uMF~;EeeHHIRk9osW6@K4xn;Q#s7lWs(pUXO@geCwjBg*ao delta 444 zcmV;t0Ym=v0?PxC8Gi-<007{3J@^0s00v@9M??Vs0RI60puMM)00009a7bBm000XT z000XT0n*)m`~Uy|2XskIMF-Ld9|bWcxwBg+00044NklrEmXM`#OJKufRi{?QPXg;4;wroQu z4?mN1Ydd@|kaQ|ZyWLK!)yi7Wb%=0{}lD)tfliHAU zyWRQ+fD_;aV6j->y6!O_8bENg Overview - + - + @@ -50,6 +50,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/right.png b/doc/html/right.png index 92832e3a4566e59d6e4092010e08d28f3be3a68d..ed55207f1724d878d7f34739df09bc691de6ba5d 100644 GIT binary patch literal 380 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaARR{QlxB}__)B`}%SXfv%I5>EC zcoY;Al$DjWwY41_99FMhy?_7y!-o$aKYslD`Sb7JzX#g+Jp2n#J%dz9kY6wZ2akY= zgp7uXg@b!U^y=;V51+q${r=xGkihYWaF0)nSGL_~4v zsy0qpoBHoRx91b)PML#uY~Cl_6iIcwxhCq(b4!hn#|+g)^Yq0S-!v7Ec$2?7@@M^iZG`mTh716h@d}lb{2iURkP+kX3j17wd>EmBX&=u zvv*uDf3%l(&U^nZl`l8v@kwm9&20<|)bsLR{F2#{Ut#yhsr;NEk9fNJxvX C=EM*H delta 457 zcmV;)0XF{p0@wqP8Gi-<007{3J@^0s00v@9M??Vs0RI60puMM)00009a7bBm000XT z000XT0n*)m`~Uy|2XskIMF-Ld9|bZDNhQHO0004HNkl1uNCn_os z6B83nFeDhn1OmY%4!=J!eifp2No7S5b&yPK4gtv~mee#Ef`8G{V@9J9 zz$Y&tcWM9ulb=if00000NkvXXu0mjf)Xc`> diff --git a/doc/html/schemas-device.html b/doc/html/schemas-device.html index 694c5eb..2f62cba 100644 --- a/doc/html/schemas-device.html +++ b/doc/html/schemas-device.html @@ -3,12 +3,12 @@ Device Description - + - + @@ -87,6 +87,6 @@ device = element device { + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/schemas-service.html b/doc/html/schemas-service.html index 45b403e..ed59761 100644 --- a/doc/html/schemas-service.html +++ b/doc/html/schemas-service.html @@ -3,12 +3,12 @@ Service Description - + - + @@ -83,6 +83,6 @@ scpd = element scpd { + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/schemas.html b/doc/html/schemas.html index 057464e..d74aab8 100644 --- a/doc/html/schemas.html +++ b/doc/html/schemas.html @@ -3,12 +3,12 @@ Part III. XML Schemas - + - + @@ -32,6 +32,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/server-tutorial.html b/doc/html/server-tutorial.html index 6c1daea..f1ec040 100644 --- a/doc/html/server-tutorial.html +++ b/doc/html/server-tutorial.html @@ -3,12 +3,12 @@ Writing a UPnP Service - + - + @@ -24,7 +24,7 @@ Writing a UPnP Service

-Introduction

+Introduction

This chapter explains how to implement a UPnP service using GUPnP. For this example we will create a virtual UPnP-enabled light bulb. @@ -32,20 +32,21 @@

Before any code can be written, the device and services that it implement need to be described in XML. Although this can be frustrating, if you are - implementing a standardised service (see http://upnp.org/standardizeddcps/ for the list of standard devices - and services) then the service description is already written for you and - the device description is trivial. UPnP has standardised Lighting + implementing a standardised service (see http://upnp.org/sdcps-and-certification/standards/sdcps/ for the + list of standard devices and services) then the service description is + already written for you and the device description is trivial. UPnP has + standardised Lighting Controls, so we'll be using the device and service types defined there.

-Defining the Device

+Defining the Device

The first step is to write the device description file. This is a short XML document which describes the device and what - services it provides (for more details see the UPnP + services it provides (for more details see the UPnP Device Architecture specification, section 2.1). We'll be using the BinaryLight1 device type, but if none of the existing device types are suitable a custom device type can be created. @@ -117,9 +118,9 @@

-Defining Services

+Defining Services

- Becase we are using a standard service we can use the service description + Because we are using a standard service we can use the service description from the specification. This is the SwitchPower1 service description file:

@@ -204,13 +205,13 @@

For the full specification of the service definition file, including a complete list of valid dataTypes, see section 2.3 of - the UPnP + the UPnP Device Architecture.

-Implementing the Device

+Implementing the Device

Before starting to implement the device, some boilerplate code is needed to initialise GUPnP. GLib types and threading needs to be initialised, @@ -218,24 +219,21 @@

GUPnPContext *context;
 /* Initialize required subsystems */
-g_thread_init (NULL);
-g_type_init ();
+#if !GLIB_CHECK_VERSION(2,35,0)
+  g_type_init ();
+#endif
 /* Create the GUPnP context with default host and port */
 context = gupnp_context_new (NULL, NULL, 0, NULL);

- UPnP uses HTTP to provide the device and service description files, so - next we tell GUPnP to publish them. This is done with - gupnp_context_host_path() which takes a local filename to send when a - certain server path is requested. -

-
gupnp_context_host_path (context, "BinaryLight1.xml", "/BinaryLight1.xml");
-gupnp_context_host_path (context, "SwitchPower1.xml", "/SwitchPower1.xml");
-

- Next the root device can be created. + Next the root device can be created. The name of the device description + file can be passed as an absolute file path or a relative path to the + second parameter of gupnp_root_device_new(). The service description + files referenced in the device description are expected to be at the path + given there as well.

GUPnPRootDevice *dev;
 /* Create the root device object */
-dev = gupnp_root_device_new (context, "/BinaryLight1.xml");
+dev = gupnp_root_device_new (context, "BinaryLight1.xml", ".");
 /* Activate the root device, so that it announces itself */
 gupnp_root_device_set_available (dev, TRUE);

@@ -247,7 +245,7 @@ gupnp_root_device_set_available (dev, TRUE);

-Implementing a Service

+Implementing a Service

To implement a service we first fetch the #GUPnPService from the root device using gupnp_device_info_get_service() (#GUPnPRootDevice is a @@ -356,14 +354,17 @@ g_signal_connect (service, "query-variable::Status", G_CALLBACK (query_status_cb

-Generating Service-specific Wrappers

+Generating Service-specific Wrappers

Using service-specific wrappers can simplify the implementation of a service. Wrappers can be generated with gupnp-binding-tool(1) using the option --mode server.

- In the following examples the wrapper has been created with --mode server --prefix switch. + In the following examples the wrapper has been created with + --mode server --prefix switch. Please note that the callback handlers + (get_status_cb and set_target_cb) are not automatically + generated by gupnp-binding-tool(1) for you.

static gboolean status;
 
@@ -417,6 +418,6 @@ switch_status_query_connect (service, query_status_cb, NULL);
+ Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/tutorial.html b/doc/html/tutorial.html index 031810c..d07074c 100644 --- a/doc/html/tutorial.html +++ b/doc/html/tutorial.html @@ -3,12 +3,12 @@ Part I. Tutorial - + - + @@ -33,6 +33,6 @@ + Generated by GTK-Doc V1.18 \ No newline at end of file diff --git a/doc/html/up.png b/doc/html/up.png index 85b3e2a2755fece72d0d09fbf1cf28d51fa71077..8eb591f3b8d09f472b1d32c003da9647394a3823 100644 GIT binary patch delta 264 zcmV+j0r&ov1ET_vB!B8jL_t(|+U=Dg4udchh7rh$i3ubUF)@Kea0d>s9R;@oaDd8* z$%)B{i3vm{vJ!!qKp+rrk0mc50rIw%Wr+RBXDYrgX`0ko)Bs?Egx?Um$PuAk5HY9x zgg{xAptYvR4H2`-gCGFU^PngSCSoYZ;|?ZbC+8yeaz0`&=YJ#iaz0`&=Oe3rK$^*i zkvz{Sq7b)}uMw#0n&egpAwVfbk%+G60TYYkcv9y3KJ=%xe$g}y9ffp72~rschHH@n z_hhdh1oW8WA6S0ijDVC9(li|<%Q6bwO#%th!h749emYxZ&k#Ak+!J)Z1t|@{Ain?r O002ovPDHLkU;%0fhde0+s`iB!32COGiWi{{a60|De66lK=n!32;bRa{vGf5&!@T5&_cPe*6Fc z00(qQO+^RN2pa;kaQ|( z`5WR$(ye}YkQ5(MekVy)RmnN$BTvDRZF!buO4C$jS%yb;$pHvJc%)Ar92q0uJ2FK+ zIkJy@bRpDp8pE!C`{c5ub4g!a|Hl@2mxlw91%SoCUS3H)Pd>q+ Z_y(<~7_yo_Swa8+002ovPDHLkV1lM for the list of standard devices - and services) then the service description is already written for you and - the device description is trivial. UPnP has standardised Lighting + url="http://upnp.org/sdcps-and-certification/standards/sdcps/"/> for the + list of standard devices and services) then the service description is + already written for you and the device description is trivial. UPnP has + standardised Lighting Controls, so we'll be using the device and service types defined there. @@ -29,7 +29,7 @@ The first step is to write the device description file. This is a short XML document which describes the device and what services it provides (for more details see the UPnP + url="http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0.pdf">UPnP Device Architecture specification, section 2.1). We'll be using the BinaryLight1 device type, but if none of the existing device types are suitable a custom device type can be created. @@ -78,7 +78,7 @@ Defining Services - Becase we are using a standard service we can use the service description + Because we are using a standard service we can use the service description from the specification. This is the SwitchPower1 service description file: @@ -115,7 +115,7 @@ For the full specification of the service definition file, including a complete list of valid dataTypes, see section 2.3 of the UPnP + url="http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.0.pdf">UPnP Device Architecture. @@ -129,24 +129,21 @@ GUPnPContext *context; /* Initialize required subsystems */ -g_thread_init (NULL); -g_type_init (); +#if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); +#endif /* Create the GUPnP context with default host and port */ context = gupnp_context_new (NULL, NULL, 0, NULL); - UPnP uses HTTP to provide the device and service description files, so - next we tell GUPnP to publish them. This is done with - gupnp_context_host_path() which takes a local filename to send when a - certain server path is requested. - -gupnp_context_host_path (context, "BinaryLight1.xml", "/BinaryLight1.xml"); -gupnp_context_host_path (context, "SwitchPower1.xml", "/SwitchPower1.xml"); - - Next the root device can be created. + Next the root device can be created. The name of the device description + file can be passed as an absolute file path or a relative path to the + second parameter of gupnp_root_device_new(). The service description + files referenced in the device description are expected to be at the path + given there as well. GUPnPRootDevice *dev; /* Create the root device object */ -dev = gupnp_root_device_new (context, "/BinaryLight1.xml"); +dev = gupnp_root_device_new (context, "BinaryLight1.xml", "."); /* Activate the root device, so that it announces itself */ gupnp_root_device_set_available (dev, TRUE); @@ -273,7 +270,10 @@ g_signal_connect (service, "query-variable::Status", G_CALLBACK (query_status_cb using the option --mode server. - In the following examples the wrapper has been created with --mode server --prefix switch. + In the following examples the wrapper has been created with + --mode server --prefix switch. Please note that the callback handlers + (get_status_cb and set_target_cb) are not automatically + generated by for you. static gboolean status; diff --git a/doc/tmpl/gupnp-context-manager.sgml b/doc/tmpl/gupnp-context-manager.sgml deleted file mode 100644 index b729110..0000000 --- a/doc/tmpl/gupnp-context-manager.sgml +++ /dev/null @@ -1,87 +0,0 @@ - -GUPnPContextManager - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@gupnpcontextmanager: the object which received the signal. -@arg1: - - - - - - -@gupnpcontextmanager: the object which received the signal. -@arg1: - - - - - - - - - - - - - - - - - - - - - -@main_context: -@port: -@Returns: - - - - - - - -@manager: -@control_point: - - - - - - - -@manager: -@root_device: - - diff --git a/doc/tmpl/gupnp-context.sgml b/doc/tmpl/gupnp-context.sgml deleted file mode 100644 index ca1d7a2..0000000 --- a/doc/tmpl/gupnp-context.sgml +++ /dev/null @@ -1,145 +0,0 @@ - -GUPnPContext - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@main_context: -@interface: -@port: -@error: -@Returns: - - - - - - - -@context: -@Returns: - - - - - - - -@context: -@Returns: - - - - - - - -@context: -@Returns: - - - - - - - -@context: -@Returns: - - - - - - - -@context: -@timeout: - - - - - - - -@context: -@Returns: - - - - - - - -@context: -@local_path: -@server_path: - - - - - - - -@context: -@local_path: -@server_path: -@user_agent: -@Returns: - - - - - - - -@context: -@server_path: - - diff --git a/doc/tmpl/gupnp-control-point.sgml b/doc/tmpl/gupnp-control-point.sgml deleted file mode 100644 index a8c6fff..0000000 --- a/doc/tmpl/gupnp-control-point.sgml +++ /dev/null @@ -1,122 +0,0 @@ - -GUPnPControlPoint - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@gupnpcontrolpoint: the object which received the signal. -@arg1: - - - - - - -@gupnpcontrolpoint: the object which received the signal. -@arg1: - - - - - - -@gupnpcontrolpoint: the object which received the signal. -@arg1: - - - - - - -@gupnpcontrolpoint: the object which received the signal. -@arg1: - - - - - - - - - - - -@context: -@target: -@Returns: - - - - - - - -@context: -@factory: -@target: -@Returns: - - - - - - - -@control_point: -@Returns: - - - - - - - -@control_point: -@Returns: - - - - - - - -@control_point: -@Returns: - - - - - - - -@control_point: -@Returns: - - diff --git a/doc/tmpl/gupnp-device-info.sgml b/doc/tmpl/gupnp-device-info.sgml deleted file mode 100644 index 8f2f83b..0000000 --- a/doc/tmpl/gupnp-device-info.sgml +++ /dev/null @@ -1,305 +0,0 @@ - -GUPnPDeviceInfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@device_info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@requested_mime_type: -@requested_depth: -@requested_width: -@requested_height: -@prefer_bigger: -@mime_type: -@depth: -@width: -@height: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@element: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@type: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@type: -@Returns: - - diff --git a/doc/tmpl/gupnp-device-proxy.sgml b/doc/tmpl/gupnp-device-proxy.sgml deleted file mode 100644 index cde3826..0000000 --- a/doc/tmpl/gupnp-device-proxy.sgml +++ /dev/null @@ -1,28 +0,0 @@ - -GUPnPDeviceProxy - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/tmpl/gupnp-device.sgml b/doc/tmpl/gupnp-device.sgml deleted file mode 100644 index 1ebb802..0000000 --- a/doc/tmpl/gupnp-device.sgml +++ /dev/null @@ -1,33 +0,0 @@ - -GUPnPDevice - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/tmpl/gupnp-error.sgml b/doc/tmpl/gupnp-error.sgml deleted file mode 100644 index 7bb441b..0000000 --- a/doc/tmpl/gupnp-error.sgml +++ /dev/null @@ -1,91 +0,0 @@ - -Error codes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@GUPNP_SERVER_ERROR_INTERNAL_SERVER_ERROR: -@GUPNP_SERVER_ERROR_NOT_FOUND: -@GUPNP_SERVER_ERROR_NOT_IMPLEMENTED: -@GUPNP_SERVER_ERROR_INVALID_RESPONSE: -@GUPNP_SERVER_ERROR_INVALID_URL: -@GUPNP_SERVER_ERROR_OTHER: - - - - - - - - - - - - - -@GUPNP_EVENTING_ERROR_SUBSCRIPTION_FAILED: -@GUPNP_EVENTING_ERROR_SUBSCRIPTION_LOST: -@GUPNP_EVENTING_ERROR_NOTIFY_FAILED: - - - - - - - - - - - - - -@GUPNP_CONTROL_ERROR_INVALID_ACTION: -@GUPNP_CONTROL_ERROR_INVALID_ARGS: -@GUPNP_CONTROL_ERROR_OUT_OF_SYNC: -@GUPNP_CONTROL_ERROR_ACTION_FAILED: - - - - - - - - - - - - - -@GUPNP_XML_ERROR_PARSE: -@GUPNP_XML_ERROR_NO_NODE: -@GUPNP_XML_ERROR_EMPTY_NODE: -@GUPNP_XML_ERROR_OTHER: - diff --git a/doc/tmpl/gupnp-resource-factory.sgml b/doc/tmpl/gupnp-resource-factory.sgml deleted file mode 100644 index cabc1ed..0000000 --- a/doc/tmpl/gupnp-resource-factory.sgml +++ /dev/null @@ -1,86 +0,0 @@ - -GUPnPResourceFactory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@void: -@Returns: - - - - - - - -@void: -@Returns: - - - - - - - -@factory: -@upnp_type: -@type: - - - - - - - -@factory: -@upnp_type: -@Returns: - - - - - - - -@factory: -@upnp_type: -@type: - - - - - - - -@factory: -@upnp_type: -@Returns: - - diff --git a/doc/tmpl/gupnp-root-device.sgml b/doc/tmpl/gupnp-root-device.sgml deleted file mode 100644 index 70027fd..0000000 --- a/doc/tmpl/gupnp-root-device.sgml +++ /dev/null @@ -1,117 +0,0 @@ - -GUPnPRootDevice - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@context: -@description_path: -@description_dir: -@Returns: - - - - - - - -@context: -@factory: -@description_doc: -@description_path: -@description_dir: -@Returns: - - - - - - - -@root_device: -@available: - - - - - - - -@root_device: -@Returns: - - - - - - - -@root_device: -@Returns: - - - - - - - -@root_device: -@Returns: - - - - - - - -@root_device: -@Returns: - - diff --git a/doc/tmpl/gupnp-service-info.sgml b/doc/tmpl/gupnp-service-info.sgml deleted file mode 100644 index 67b0803..0000000 --- a/doc/tmpl/gupnp-service-info.sgml +++ /dev/null @@ -1,175 +0,0 @@ - -GUPnPServiceInfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@info: -@introspection: -@error: -@user_data: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@Returns: - - - - - - - -@info: -@error: -@Returns: - - - - - - - -@info: -@callback: -@user_data: - - diff --git a/doc/tmpl/gupnp-service-introspection.sgml b/doc/tmpl/gupnp-service-introspection.sgml deleted file mode 100644 index de12d37..0000000 --- a/doc/tmpl/gupnp-service-introspection.sgml +++ /dev/null @@ -1,130 +0,0 @@ - -GUPnPServiceIntrospection - - - - - - - - - - - - - - - - - - - - - - - - - -@GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN: -@GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT: - - - - - - -@name: -@direction: -@related_state_variable: -@retval: - - - - - - -@name: -@arguments: - - - - - - -@name: -@send_events: -@is_numeric: -@type: -@default_value: -@minimum: -@maximum: -@step: -@allowed_values: - - - - - - - - - - - - - - - - - -@introspection: -@Returns: - - - - - - - -@introspection: -@Returns: - - - - - - - -@introspection: -@action_name: -@Returns: - - - - - - - -@introspection: -@Returns: - - - - - - - -@introspection: -@Returns: - - - - - - - -@introspection: -@variable_name: -@Returns: - - diff --git a/doc/tmpl/gupnp-service-proxy.sgml b/doc/tmpl/gupnp-service-proxy.sgml deleted file mode 100644 index 1eb334f..0000000 --- a/doc/tmpl/gupnp-service-proxy.sgml +++ /dev/null @@ -1,276 +0,0 @@ - -GUPnPServiceProxy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@gupnpserviceproxy: the object which received the signal. -@arg1: - - - - - - - - - - - - - - - - - -@proxy: -@action: -@user_data: - - - - - - - -@proxy: -@variable: -@value: -@user_data: - - - - - - - -@proxy: -@action: -@error: -@Varargs: -@Returns: - - - - - - - -@proxy: -@action: -@error: -@var_args: -@Returns: - - - - - - - -@proxy: -@action: -@error: -@in_hash: -@out_hash: -@Returns: - - - - - - - -@proxy: -@action: -@error: -@in_names: -@in_values: -@out_names: -@out_types: -@out_values: -@Returns: - - - - - - - -@proxy: -@action: -@callback: -@user_data: -@Varargs: -@Returns: - - - - - - - -@proxy: -@action: -@callback: -@user_data: -@var_args: -@Returns: - - - - - - - -@proxy: -@action: -@callback: -@user_data: -@hash: -@Returns: - - - - - - - -@proxy: -@action: -@in_names: -@in_values: -@callback: -@user_data: -@Returns: - - - - - - - -@proxy: -@action: -@error: -@Varargs: -@Returns: - - - - - - - -@proxy: -@action: -@error: -@var_args: -@Returns: - - - - - - - -@proxy: -@action: -@error: -@hash: -@Returns: - - - - - - - -@proxy: -@action: -@error: -@out_names: -@out_types: -@out_values: -@Returns: - - - - - - - -@proxy: -@action: - - - - - - - -@proxy: -@variable: -@type: -@callback: -@user_data: -@Returns: - - - - - - - -@proxy: -@variable: -@callback: -@user_data: -@Returns: - - - - - - - -@proxy: -@subscribed: - - - - - - - -@proxy: -@Returns: - - diff --git a/doc/tmpl/gupnp-service.sgml b/doc/tmpl/gupnp-service.sgml deleted file mode 100644 index 78ad2f3..0000000 --- a/doc/tmpl/gupnp-service.sgml +++ /dev/null @@ -1,252 +0,0 @@ - -GUPnPService - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@gupnpservice: the object which received the signal. -@arg1: - - - - - - -@gupnpservice: the object which received the signal. -@arg1: -@arg2: - - - - - - -@gupnpservice: the object which received the signal. -@arg1: -@arg2: - - - - - - - - - - - - - - - - - -@action: -@Returns: - - - - - - - -@action: -@Returns: - - - - - - - -@action: -@Varargs: - - - - - - - -@action: -@var_args: - - - - - - - -@action: -@argument: -@value: - - - - - - - -@action: -@argument: -@type: -@Returns: - - - - - - - -@action: -@arg_names: -@arg_types: -@Returns: - - - - - - - -@action: -@Varargs: - - - - - - - -@action: -@var_args: - - - - - - - -@action: -@argument: -@value: - - - - - - - -@action: -@arg_names: -@arg_values: - - - - - - - -@action: - - - - - - - -@action: -@error_code: -@error_description: - - - - - - - -@action: -@Returns: - - - - - - - -@service: -@Varargs: - - - - - - - -@service: -@var_args: - - - - - - - -@service: -@variable: -@value: - - - - - - - -@service: - - - - - - - -@service: - - - - - - - -@service: -@user_data: -@error: - - diff --git a/doc/tmpl/gupnp-types.sgml b/doc/tmpl/gupnp-types.sgml deleted file mode 100644 index 9d4c62a..0000000 --- a/doc/tmpl/gupnp-types.sgml +++ /dev/null @@ -1,85 +0,0 @@ - -Special UPnP types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/tmpl/gupnp-unused.sgml b/doc/tmpl/gupnp-unused.sgml deleted file mode 100644 index e69de29..0000000 diff --git a/doc/tmpl/gupnp-xml-doc.sgml b/doc/tmpl/gupnp-xml-doc.sgml deleted file mode 100644 index d2cb276..0000000 --- a/doc/tmpl/gupnp-xml-doc.sgml +++ /dev/null @@ -1,48 +0,0 @@ - -GUPnPXMLDoc - - - - - - - - - - - - - - - - - - - - - - - - - -@doc: - - - - - - -@xml_doc: -@Returns: - - - - - - - -@path: -@error: -@Returns: - - diff --git a/examples/Makefile.in b/examples/Makefile.in index ed91b1b..a397ab9 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,6 +51,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ noinst_PROGRAMS = light-server$(EXEEXT) light-client$(EXEEXT) subdir = examples DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -42,7 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -54,8 +72,8 @@ am_light_client_OBJECTS = light-client.$(OBJEXT) light_client_OBJECTS = $(am_light_client_OBJECTS) light_client_LDADD = $(LDADD) light_client_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent light_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -68,7 +86,7 @@ light_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(light_server_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -77,24 +95,29 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(light_client_SOURCES) $(light_server_SOURCES) DIST_SOURCES = $(light_client_SOURCES) $(light_server_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -109,13 +132,14 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ -DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -124,28 +148,34 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ -LIBCONIC_LIBS = @LIBCONIC_LIBS@ LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ LIBOBJS = @LIBOBJS@ @@ -156,6 +186,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -179,12 +210,14 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -USE_CONIC = @USE_CONIC@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -217,7 +250,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -229,7 +261,11 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -286,10 +322,10 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -light-client$(EXEEXT): $(light_client_OBJECTS) $(light_client_DEPENDENCIES) +light-client$(EXEEXT): $(light_client_OBJECTS) $(light_client_DEPENDENCIES) $(EXTRA_light_client_DEPENDENCIES) @rm -f light-client$(EXEEXT) $(AM_V_CCLD)$(light_client_LINK) $(light_client_OBJECTS) $(light_client_LDADD) $(LIBS) -light-server$(EXEEXT): $(light_server_OBJECTS) $(light_server_DEPENDENCIES) +light-server$(EXEEXT): $(light_server_OBJECTS) $(light_server_DEPENDENCIES) $(EXTRA_light_server_DEPENDENCIES) @rm -f light-server$(EXEEXT) $(AM_V_CCLD)$(light_server_LINK) $(light_server_OBJECTS) $(light_server_LDADD) $(LIBS) @@ -305,26 +341,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -428,10 +461,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/examples/light-client.c b/examples/light-client.c index 1e6825d..60ce266 100644 --- a/examples/light-client.c +++ b/examples/light-client.c @@ -21,7 +21,8 @@ static enum { } mode; static void -service_proxy_available_cb (GUPnPControlPoint *cp, GUPnPServiceProxy *proxy) +service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { GError *error = NULL; gboolean target; @@ -77,8 +78,10 @@ main (int argc, char **argv) GUPnPContext *context; GUPnPControlPoint *cp; - g_thread_init (NULL); +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif + /* Check and parse command line arguments */ if (argc != 2) { diff --git a/examples/light-server.c b/examples/light-server.c index dc416c5..2dcddf3 100644 --- a/examples/light-server.c +++ b/examples/light-server.c @@ -15,6 +15,7 @@ static gboolean status; +G_BEGIN_DECLS G_MODULE_EXPORT void set_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data); @@ -28,14 +29,16 @@ G_MODULE_EXPORT void query_target_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data); G_MODULE_EXPORT void query_status_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data); - +G_END_DECLS /* * Action handlers */ /* SetTarget */ G_MODULE_EXPORT void -set_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data) +set_target_cb (GUPnPService *service, + GUPnPServiceAction *action, + G_GNUC_UNUSED gpointer user_data) { gboolean target; @@ -61,7 +64,9 @@ set_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_ /* GetTarget */ G_MODULE_EXPORT void -get_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data) +get_target_cb (G_GNUC_UNUSED GUPnPService *service, + GUPnPServiceAction *action, + G_GNUC_UNUSED gpointer user_data) { gupnp_service_action_set (action, "RetTargetValue", G_TYPE_BOOLEAN, status, @@ -71,7 +76,9 @@ get_target_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_ /* GetStatus */ G_MODULE_EXPORT void -get_status_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data) +get_status_cb (G_GNUC_UNUSED GUPnPService *service, + GUPnPServiceAction *action, + G_GNUC_UNUSED gpointer user_data) { gupnp_service_action_set (action, "ResultStatus", G_TYPE_BOOLEAN, status, @@ -85,7 +92,10 @@ get_status_cb (GUPnPService *service, GUPnPServiceAction *action, gpointer user_ /* Target */ G_MODULE_EXPORT void -query_target_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data) +query_target_cb (G_GNUC_UNUSED GUPnPService *service, + G_GNUC_UNUSED char *variable, + GValue *value, + G_GNUC_UNUSED gpointer user_data) { g_value_init (value, G_TYPE_BOOLEAN); g_value_set_boolean (value, status); @@ -93,7 +103,10 @@ query_target_cb (GUPnPService *service, char *variable, GValue *value, gpointer /* Status */ G_MODULE_EXPORT void -query_status_cb (GUPnPService *service, char *variable, GValue *value, gpointer user_data) +query_status_cb (G_GNUC_UNUSED GUPnPService *service, + G_GNUC_UNUSED char *variable, + GValue *value, + G_GNUC_UNUSED gpointer user_data) { g_value_init (value, G_TYPE_BOOLEAN); g_value_set_boolean (value, status); @@ -101,7 +114,7 @@ query_status_cb (GUPnPService *service, char *variable, GValue *value, gpointer int -main (int argc, char **argv) +main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) { GMainLoop *main_loop; GError *error = NULL; @@ -109,8 +122,9 @@ main (int argc, char **argv) GUPnPRootDevice *dev; GUPnPServiceInfo *service; - g_thread_init (NULL); +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif /* By default the light is off */ status = FALSE; diff --git a/gtk-doc.make b/gtk-doc.make index 57fab98..9841de4 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -5,12 +5,12 @@ #################################### if GTK_DOC_USE_LIBTOOL -GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else -GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif @@ -23,17 +23,19 @@ GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) -EXTRA_DIST = \ +SETUP_FILES = \ $(content_files) \ - $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ - pdf-build.stamp \ - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ - $(srcdir)/pdf.stamp +EXTRA_DIST = \ + $(HTML_IMAGES) \ + $(SETUP_FILES) + +DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -70,22 +72,45 @@ docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp +#### setup #### + +setup-build.stamp: + -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + echo ' DOC Preparing build'; \ + files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + test -f $(abs_srcdir)/$$file && \ + cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ + done; \ + fi; \ + fi + @touch setup-build.stamp + + #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo 'gtk-doc: Scanning header files' - @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + @echo ' DOC Scanning header files' + @_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + echo " DOC Introspecting gobjects"; \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ + fi; \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ - cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ + test -f $$i || touch $$i ; \ done \ fi @touch scan-build.stamp @@ -93,30 +118,15 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -#### templates #### - -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - @echo 'gtk-doc: Rebuilding template files' - @-chmod -R u+w $(srcdir) - @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - @touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -$(srcdir)/tmpl/*.sgml: - @true - #### xml #### -sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - @echo 'gtk-doc: Building XML' - @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) + @echo ' DOC Building XML' + @_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + done ; \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @@ -125,58 +135,78 @@ sgml.stamp: sgml-build.stamp #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building HTML' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/html - @mkdir $(srcdir)/html + @echo ' DOC Building HTML' + @rm -rf html + @mkdir html @mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkhtml_options="$$mkhtml_options --verbose"; \ + fi; \ + fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ - mkhtml_options=--path="$(srcdir)"; \ + mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ - cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) - @echo 'gtk-doc: Fixing cross-references' - @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + -@test "x$(HTML_IMAGES)" = "x" || \ + for file in $(HTML_IMAGES) ; do \ + if test -f $(abs_srcdir)/$$file ; then \ + cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + fi; \ + if test -f $(abs_builddir)/$$file ; then \ + cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + fi; \ + done; + @echo ' DOC Fixing cross-references' + @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building PDF' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/$(DOC_MODULE).pdf - @mkpdf_imgdirs=""; \ + @echo ' DOC Building PDF' + @rm -f $(DOC_MODULE).pdf + @mkpdf_options=""; \ + gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$(?)" = "0"; then \ + if test "x$(V)" = "x1"; then \ + mkpdf_options="$$mkpdf_options --verbose"; \ + fi; \ + fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ - echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \ + echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ - mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \ + mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ - cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## clean-local: - rm -f *~ *.bak - rm -rf .libs + @rm -f *~ *.bak + @rm -rf .libs distclean-local: - cd $(srcdir) && \ - rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ + fi maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html + @rm -rf xml html install-data-local: - @installfiles=`echo $(srcdir)/html/*`; \ - if test "$$installfiles" = '$(srcdir)/html/*'; \ - then echo '-- Nothing to install' ; \ + @installfiles=`echo $(builddir)/html/*`; \ + if test "$$installfiles" = '$(builddir)/html/*'; \ + then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ @@ -185,14 +215,12 @@ install-data-local: fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ + echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - mv -f $${installdir}/$(DOC_MODULE).devhelp \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi @@ -217,14 +245,12 @@ dist-check-gtkdoc: endif dist-hook: dist-check-gtkdoc dist-hook-local - mkdir $(distdir)/tmpl - mkdir $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - cp $(srcdir)/html/* $(distdir)/html - -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ - cd $(distdir) && rm -f $(DISTCLEANFILES) - $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html + @mkdir $(distdir)/html + @cp ./html/* $(distdir)/html + @-cp ./$(DOC_MODULE).pdf $(distdir)/ + @-cp ./$(DOC_MODULE).types $(distdir)/ + @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ + @cd $(distdir) && rm -f $(DISTCLEANFILES) + @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs diff --git a/gupnp-1.0-uninstalled.pc.in b/gupnp-1.0-uninstalled.pc.in index 601e478..40e75ca 100644 --- a/gupnp-1.0-uninstalled.pc.in +++ b/gupnp-1.0-uninstalled.pc.in @@ -8,5 +8,4 @@ Description: GObject-based UPnP library Version: @VERSION@ Libs: ${libdir}/libgupnp-1.0.la Cflags: -I${includedir} -Requires: gssdp-1.0 libxml-2.0 libsoup-2.4 -Requires.Private: uuid gmodule-2.0 +Requires.private: gssdp-1.0 libxml-2.0 libsoup-2.4 diff --git a/gupnp-1.0.pc.in b/gupnp-1.0.pc.in index d4acdd2..d2612b4 100644 --- a/gupnp-1.0.pc.in +++ b/gupnp-1.0.pc.in @@ -8,5 +8,4 @@ Description: GObject-based UPnP library Version: @VERSION@ Libs: -L${libdir} -lgupnp-1.0 Cflags: -I${includedir}/gupnp-1.0 -Requires: gssdp-1.0 libxml-2.0 libsoup-2.4 -Requires.Private: uuid gmodule-2.0 +Requires.private: gssdp-1.0 libxml-2.0 libsoup-2.4 diff --git a/libgupnp/Makefile.am b/libgupnp/Makefile.am index d2d96c2..6d30acb 100644 --- a/libgupnp/Makefile.am +++ b/libgupnp/Makefile.am @@ -1,23 +1,42 @@ -LTVERSION = 3:0:0 +LTVERSION = 4:0:0 +if OS_WIN32 +CONTEXT_MANAGER_IMPL = gupnp-windows-context-manager.c \ + gupnp-windows-context-manager.h +CONTEXT_MANAGER_CFLAGS = +CONTEXT_MANAGER_LIBS = -lws2_32 -liphlpapi +WIN32_LDFLAGS = -no-undefined +else +CONTEXT_MANAGER_IMPL = gupnp-unix-context-manager.c \ + gupnp-unix-context-manager.h if USE_NETWORK_MANAGER -CONTEXT_MANAGER_IMPL = gupnp-network-manager.c \ - gupnp-network-manager.h +CONTEXT_MANAGER_IMPL += gupnp-network-manager.c \ + gupnp-network-manager.h CONTEXT_MANAGER_CFLAGS = -DUSE_NETWORK_MANAGER else -CONTEXT_MANAGER_IMPL = -CONTEXT_MANAGER_CFLAGS = +if USE_CONNMAN +CONTEXT_MANAGER_IMPL += gupnp-connman-manager.c \ + gupnp-connman-manager.h +CONTEXT_MANAGER_CFLAGS = -DUSE_CONNMAN +endif +endif +endif + +if HAVE_NETLINK +CONTEXT_MANAGER_IMPL += \ + gupnp-linux-context-manager.c \ + gupnp-linux-context-manager.h endif -if USE_CONIC -CONIC_CFLAGS = $(LIBCONIC_CFLAGS) -DUSE_CONIC +if USE_NETLINK +NETLINK_CFLAGS = -DUSE_NETLINK else -CONIC_CFLAGS = +NETLINK_CFLAGS = endif AM_CFLAGS = $(LIBGUPNP_CFLAGS) \ $(DBUS_GLIB_CFLAGS) \ - $(CONIC_CFLAGS) \ + $(NETLINK_CFLAGS) \ -I$(top_srcdir) \ $(CONTEXT_MANAGER_CFLAGS) @@ -30,18 +49,38 @@ libgupnpinc_HEADERS = gupnp-context.h \ gupnp-control-point.h \ gupnp-device.h \ gupnp-device-info.h \ - gupnp-device-proxy.h \ + gupnp-device-proxy.h \ gupnp-error.h \ gupnp-resource-factory.h \ gupnp-root-device.h \ gupnp-service.h \ gupnp-service-info.h \ gupnp-service-proxy.h \ - gupnp-service-introspection.h \ + gupnp-service-introspection.h \ gupnp-xml-doc.h \ - gupnp-types.h \ + gupnp-white-list.h \ + gupnp-types.h \ gupnp.h +introspection_sources = $(libgupnpinc_HEADERS) \ + gupnp-context.c \ + gupnp-context-manager.c \ + gupnp-control-point.c \ + gupnp-device.c \ + gupnp-device-info.c \ + gupnp-device-proxy.c \ + gupnp-error.c \ + gupnp-resource-factory.c \ + gupnp-root-device.c \ + gupnp-service.c \ + gupnp-service-info.c \ + gupnp-service-proxy.c \ + gupnp-service-introspection.c \ + gupnp-xml-doc.c \ + gupnp-white-list.c \ + gupnp-types.c + + gupnp-marshal.c: gupnp-marshal.list $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=gupnp_marshal $(srcdir)/gupnp-marshal.list --header --body > gupnp-marshal.c @@ -50,34 +89,20 @@ gupnp-marshal.h: gupnp-marshal.list BUILT_SOURCES = gupnp-marshal.c gupnp-marshal.h -libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) +libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) $(WIN32_LDFLAGS) -libgupnp_1_0_la_SOURCES = http-headers.c \ +libgupnp_1_0_la_SOURCES = $(introspection_sources) \ + http-headers.c \ http-headers.h \ - gupnp-context.c \ gupnp-context-private.h \ - gupnp-context-manager.c \ - $(CONTEXT_MANAGER_IMPL) \ - gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h \ - gupnp-control-point.c \ - gupnp-device.c \ - gupnp-device-info.c \ + $(CONTEXT_MANAGER_IMPL) \ + gupnp-simple-context-manager.h \ + gupnp-simple-context-manager.c \ gupnp-device-info-private.h \ - gupnp-device-proxy.c \ - gupnp-error.c \ gupnp-error-private.h \ - gupnp-resource-factory.c \ - gupnp-resource-factory-private.h \ - gupnp-root-device.c \ - gupnp-service.c \ - gupnp-service-info.c \ - gupnp-service-proxy.c \ - gupnp-service-introspection.c \ - gupnp-service-introspection-private.h \ - gupnp-xml-doc.c \ - gupnp-types.c \ - gupnp-types-private.h \ + gupnp-resource-factory-private.h \ + gupnp-service-introspection-private.h \ + gupnp-types-private.h \ gvalue-util.c \ gvalue-util.h \ xml-util.c \ @@ -85,63 +110,45 @@ libgupnp_1_0_la_SOURCES = http-headers.c \ gena-protocol.h \ $(BUILT_SOURCES) -libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(LIBCONIC_LIBS) +libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(CONTEXT_MANAGER_LIBS) EXTRA_DIST = gupnp-marshal.list \ gupnp-network-manager.c \ gupnp-network-manager.h \ + gupnp-connman-manager.c \ + gupnp-connman-manager.h \ + gupnp-linux-context-manager.c \ + gupnp-linux-context-manager.h \ gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h - + gupnp-unix-context-manager.h \ + gupnp-windows-context-manager.c \ + gupnp-windows-context-manager.h + +-include $(INTROSPECTION_MAKEFILE) +INTROSPECTION_GIRS = +INTROSPECTION_SCANNER_ARGS = --warn-all \ + --symbol-prefix=gupnp \ + --identifier-prefix=GUPnP \ + --add-include-path=$(top_srcdir) \ + --pkg-export=gupnp-1.0 +INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir) if HAVE_INTROSPECTION +GUPnP-1.0.gir: libgupnp-1.0.la +GUPnP_1_0_gir_INCLUDES = libxml2-2.0 GObject-2.0 Soup-2.4 GSSDP-1.0 +GUPnP_1_0_gir_CFLAGS = -DGOBJECT_INTROSPECTION_SKIP $(INCLUDES) $(AM_CFLAGS) +GUPnP_1_0_gir_LIBS = libgupnp-1.0.la +GUPnP_1_0_gir_FILES = $(introspection_sources) +GUPnP_1_0_gir_NAMESPACE = GUPnP +GUPnP_1_0_gir_VERSION = 1.0 -GUPnP-1.0.gir: libgupnp-1.0.la $(INTROSPECTION_SCANNER) - $(AM_V_GEN) \ - $(INTROSPECTION_SCANNER) -v \ - --namespace=GUPnP --nsversion=1.0 \ - --include=libxml2-2.0 \ - --include=GObject-2.0 \ - --include=Soup-2.4 \ - --include=GSSDP-1.0 \ - --library=$< \ - --libtool="$(top_builddir)/libtool" \ - --pkg libxml-2.0 \ - --pkg gobject-2.0 \ - --pkg gssdp-1.0 \ - --pkg libsoup-2.4 \ - --output $@ \ - -I$(top_srcdir) \ - $(addprefix $(top_srcdir)/libgupnp/, $(libgupnpinc_HEADERS)) \ - $(top_srcdir)/libgupnp/gupnp-context.c \ - $(top_srcdir)/libgupnp/gupnp-context-manager.c \ - $(top_srcdir)/libgupnp/gupnp-control-point.c \ - $(top_srcdir)/libgupnp/gupnp-device.c \ - $(top_srcdir)/libgupnp/gupnp-device-info.c \ - $(top_srcdir)/libgupnp/gupnp-device-proxy.c \ - $(top_srcdir)/libgupnp/gupnp-error.c \ - $(top_srcdir)/libgupnp/gupnp-resource-factory.c \ - $(top_srcdir)/libgupnp/gupnp-root-device.c \ - $(top_srcdir)/libgupnp/gupnp-service.c \ - $(top_srcdir)/libgupnp/gupnp-service-info.c \ - $(top_srcdir)/libgupnp/gupnp-service-proxy.c \ - $(top_srcdir)/libgupnp/gupnp-service-introspection.c \ - $(top_srcdir)/libgupnp/gupnp-xml-doc.c \ - $(top_srcdir)/libgupnp/gupnp-types.c +INTROSPECTION_GIRS += GUPnP-1.0.gir girdir = $(datadir)/gir-1.0 gir_DATA = GUPnP-1.0.gir typelibdir = $(libdir)/girepository-1.0/ typelib_DATA = $(gir_DATA:.gir=.typelib) - -%.typelib: %.gir $(INTROSPECTION_COMPILER) - $(AM_V_GEN) \ - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=. \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - endif CLEANFILES = $(BUILT_SOURCES) $(gir_DATA) $(typelib_DATA) diff --git a/libgupnp/Makefile.in b/libgupnp/Makefile.in index ca54564..594ae20 100644 --- a/libgupnp/Makefile.in +++ b/libgupnp/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -18,6 +18,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,6 +53,18 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +@OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@am__append_1 = gupnp-network-manager.c \ +@OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@ gupnp-network-manager.h + +@OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@am__append_2 = gupnp-connman-manager.c \ +@OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@ gupnp-connman-manager.h + +@HAVE_NETLINK_TRUE@am__append_3 = \ +@HAVE_NETLINK_TRUE@ gupnp-linux-context-manager.c \ +@HAVE_NETLINK_TRUE@ gupnp-linux-context-manager.h + +@HAVE_INTROSPECTION_TRUE@am__append_4 = GUPnP-1.0.gir subdir = libgupnp DIST_COMMON = $(libgupnpinc_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -44,7 +73,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -72,46 +101,73 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libgupnpincdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgupnp_1_0_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__libgupnp_1_0_la_SOURCES_DIST = http-headers.c http-headers.h \ - gupnp-context.c gupnp-context-private.h \ - gupnp-context-manager.c gupnp-network-manager.c \ - gupnp-network-manager.h gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h gupnp-control-point.c \ - gupnp-device.c gupnp-device-info.c gupnp-device-info-private.h \ - gupnp-device-proxy.c gupnp-error.c gupnp-error-private.h \ - gupnp-resource-factory.c gupnp-resource-factory-private.h \ - gupnp-root-device.c gupnp-service.c gupnp-service-info.c \ - gupnp-service-proxy.c gupnp-service-introspection.c \ - gupnp-service-introspection-private.h gupnp-xml-doc.c \ - gupnp-types.c gupnp-types-private.h gvalue-util.c \ - gvalue-util.h xml-util.c xml-util.h gena-protocol.h \ - gupnp-marshal.c gupnp-marshal.h -@USE_NETWORK_MANAGER_TRUE@am__objects_1 = gupnp-network-manager.lo -am__objects_2 = gupnp-marshal.lo -am_libgupnp_1_0_la_OBJECTS = http-headers.lo gupnp-context.lo \ - gupnp-context-manager.lo $(am__objects_1) \ - gupnp-unix-context-manager.lo gupnp-control-point.lo \ + $(am__DEPENDENCIES_1) +am__libgupnp_1_0_la_SOURCES_DIST = gupnp-context.h \ + gupnp-context-manager.h gupnp-control-point.h gupnp-device.h \ + gupnp-device-info.h gupnp-device-proxy.h gupnp-error.h \ + gupnp-resource-factory.h gupnp-root-device.h gupnp-service.h \ + gupnp-service-info.h gupnp-service-proxy.h \ + gupnp-service-introspection.h gupnp-xml-doc.h \ + gupnp-white-list.h gupnp-types.h gupnp.h gupnp-context.c \ + gupnp-context-manager.c gupnp-control-point.c gupnp-device.c \ + gupnp-device-info.c gupnp-device-proxy.c gupnp-error.c \ + gupnp-resource-factory.c gupnp-root-device.c gupnp-service.c \ + gupnp-service-info.c gupnp-service-proxy.c \ + gupnp-service-introspection.c gupnp-xml-doc.c \ + gupnp-white-list.c gupnp-types.c http-headers.c http-headers.h \ + gupnp-context-private.h gupnp-unix-context-manager.c \ + gupnp-unix-context-manager.h gupnp-network-manager.c \ + gupnp-network-manager.h gupnp-connman-manager.c \ + gupnp-connman-manager.h gupnp-linux-context-manager.c \ + gupnp-linux-context-manager.h gupnp-windows-context-manager.c \ + gupnp-windows-context-manager.h gupnp-simple-context-manager.h \ + gupnp-simple-context-manager.c gupnp-device-info-private.h \ + gupnp-error-private.h gupnp-resource-factory-private.h \ + gupnp-service-introspection-private.h gupnp-types-private.h \ + gvalue-util.c gvalue-util.h xml-util.c xml-util.h \ + gena-protocol.h gupnp-marshal.c gupnp-marshal.h +am__objects_1 = +am__objects_2 = $(am__objects_1) gupnp-context.lo \ + gupnp-context-manager.lo gupnp-control-point.lo \ gupnp-device.lo gupnp-device-info.lo gupnp-device-proxy.lo \ gupnp-error.lo gupnp-resource-factory.lo gupnp-root-device.lo \ gupnp-service.lo gupnp-service-info.lo gupnp-service-proxy.lo \ - gupnp-service-introspection.lo gupnp-xml-doc.lo gupnp-types.lo \ - gvalue-util.lo xml-util.lo $(am__objects_2) + gupnp-service-introspection.lo gupnp-xml-doc.lo \ + gupnp-white-list.lo gupnp-types.lo +@OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@am__objects_3 = gupnp-network-manager.lo +@OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@am__objects_4 = gupnp-connman-manager.lo +@HAVE_NETLINK_TRUE@am__objects_5 = gupnp-linux-context-manager.lo +@OS_WIN32_FALSE@am__objects_6 = gupnp-unix-context-manager.lo \ +@OS_WIN32_FALSE@ $(am__objects_3) $(am__objects_4) \ +@OS_WIN32_FALSE@ $(am__objects_5) +@OS_WIN32_TRUE@am__objects_6 = gupnp-windows-context-manager.lo \ +@OS_WIN32_TRUE@ $(am__objects_3) $(am__objects_4) \ +@OS_WIN32_TRUE@ $(am__objects_5) +am__objects_7 = gupnp-marshal.lo +am_libgupnp_1_0_la_OBJECTS = $(am__objects_2) http-headers.lo \ + $(am__objects_6) gupnp-simple-context-manager.lo \ + gvalue-util.lo xml-util.lo $(am__objects_7) libgupnp_1_0_la_OBJECTS = $(am_libgupnp_1_0_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libgupnp_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libgupnp_1_0_la_LDFLAGS) $(LDFLAGS) \ -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -120,24 +176,29 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgupnp_1_0_la_SOURCES) DIST_SOURCES = $(am__libgupnp_1_0_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DATA = $(gir_DATA) $(typelib_DATA) HEADERS = $(libgupnpinc_HEADERS) ETAGS = etags @@ -154,13 +215,14 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ -DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -169,28 +231,34 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ -LIBCONIC_LIBS = @LIBCONIC_LIBS@ LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ LIBOBJS = @LIBOBJS@ @@ -201,6 +269,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -224,12 +293,14 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -USE_CONIC = @USE_CONIC@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -262,7 +333,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -274,22 +344,31 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -LTVERSION = 3:0:0 -@USE_NETWORK_MANAGER_FALSE@CONTEXT_MANAGER_IMPL = -@USE_NETWORK_MANAGER_TRUE@CONTEXT_MANAGER_IMPL = gupnp-network-manager.c \ -@USE_NETWORK_MANAGER_TRUE@ gupnp-network-manager.h - -@USE_NETWORK_MANAGER_FALSE@CONTEXT_MANAGER_CFLAGS = -@USE_NETWORK_MANAGER_TRUE@CONTEXT_MANAGER_CFLAGS = -DUSE_NETWORK_MANAGER -@USE_CONIC_FALSE@CONIC_CFLAGS = -@USE_CONIC_TRUE@CONIC_CFLAGS = $(LIBCONIC_CFLAGS) -DUSE_CONIC +LTVERSION = 4:0:0 +@OS_WIN32_FALSE@CONTEXT_MANAGER_IMPL = gupnp-unix-context-manager.c \ +@OS_WIN32_FALSE@ gupnp-unix-context-manager.h $(am__append_1) \ +@OS_WIN32_FALSE@ $(am__append_2) $(am__append_3) +@OS_WIN32_TRUE@CONTEXT_MANAGER_IMPL = gupnp-windows-context-manager.c \ +@OS_WIN32_TRUE@ gupnp-windows-context-manager.h $(am__append_1) \ +@OS_WIN32_TRUE@ $(am__append_2) $(am__append_3) +@OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@CONTEXT_MANAGER_CFLAGS = -DUSE_CONNMAN +@OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@CONTEXT_MANAGER_CFLAGS = -DUSE_NETWORK_MANAGER +@OS_WIN32_TRUE@CONTEXT_MANAGER_CFLAGS = +@OS_WIN32_TRUE@CONTEXT_MANAGER_LIBS = -lws2_32 -liphlpapi +@OS_WIN32_TRUE@WIN32_LDFLAGS = -no-undefined +@USE_NETLINK_FALSE@NETLINK_CFLAGS = +@USE_NETLINK_TRUE@NETLINK_CFLAGS = -DUSE_NETLINK AM_CFLAGS = $(LIBGUPNP_CFLAGS) \ $(DBUS_GLIB_CFLAGS) \ - $(CONIC_CFLAGS) \ + $(NETLINK_CFLAGS) \ -I$(top_srcdir) \ $(CONTEXT_MANAGER_CFLAGS) @@ -300,46 +379,51 @@ libgupnpinc_HEADERS = gupnp-context.h \ gupnp-control-point.h \ gupnp-device.h \ gupnp-device-info.h \ - gupnp-device-proxy.h \ + gupnp-device-proxy.h \ gupnp-error.h \ gupnp-resource-factory.h \ gupnp-root-device.h \ gupnp-service.h \ gupnp-service-info.h \ gupnp-service-proxy.h \ - gupnp-service-introspection.h \ + gupnp-service-introspection.h \ gupnp-xml-doc.h \ - gupnp-types.h \ + gupnp-white-list.h \ + gupnp-types.h \ gupnp.h +introspection_sources = $(libgupnpinc_HEADERS) \ + gupnp-context.c \ + gupnp-context-manager.c \ + gupnp-control-point.c \ + gupnp-device.c \ + gupnp-device-info.c \ + gupnp-device-proxy.c \ + gupnp-error.c \ + gupnp-resource-factory.c \ + gupnp-root-device.c \ + gupnp-service.c \ + gupnp-service-info.c \ + gupnp-service-proxy.c \ + gupnp-service-introspection.c \ + gupnp-xml-doc.c \ + gupnp-white-list.c \ + gupnp-types.c + BUILT_SOURCES = gupnp-marshal.c gupnp-marshal.h -libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) -libgupnp_1_0_la_SOURCES = http-headers.c \ +libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) $(WIN32_LDFLAGS) +libgupnp_1_0_la_SOURCES = $(introspection_sources) \ + http-headers.c \ http-headers.h \ - gupnp-context.c \ gupnp-context-private.h \ - gupnp-context-manager.c \ - $(CONTEXT_MANAGER_IMPL) \ - gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h \ - gupnp-control-point.c \ - gupnp-device.c \ - gupnp-device-info.c \ + $(CONTEXT_MANAGER_IMPL) \ + gupnp-simple-context-manager.h \ + gupnp-simple-context-manager.c \ gupnp-device-info-private.h \ - gupnp-device-proxy.c \ - gupnp-error.c \ gupnp-error-private.h \ - gupnp-resource-factory.c \ - gupnp-resource-factory-private.h \ - gupnp-root-device.c \ - gupnp-service.c \ - gupnp-service-info.c \ - gupnp-service-proxy.c \ - gupnp-service-introspection.c \ - gupnp-service-introspection-private.h \ - gupnp-xml-doc.c \ - gupnp-types.c \ - gupnp-types-private.h \ + gupnp-resource-factory-private.h \ + gupnp-service-introspection-private.h \ + gupnp-types-private.h \ gvalue-util.c \ gvalue-util.h \ xml-util.c \ @@ -347,13 +431,33 @@ libgupnp_1_0_la_SOURCES = http-headers.c \ gena-protocol.h \ $(BUILT_SOURCES) -libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(LIBCONIC_LIBS) +libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(CONTEXT_MANAGER_LIBS) EXTRA_DIST = gupnp-marshal.list \ gupnp-network-manager.c \ gupnp-network-manager.h \ + gupnp-connman-manager.c \ + gupnp-connman-manager.h \ + gupnp-linux-context-manager.c \ + gupnp-linux-context-manager.h \ gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h - + gupnp-unix-context-manager.h \ + gupnp-windows-context-manager.c \ + gupnp-windows-context-manager.h + +INTROSPECTION_GIRS = $(am__append_4) +INTROSPECTION_SCANNER_ARGS = --warn-all \ + --symbol-prefix=gupnp \ + --identifier-prefix=GUPnP \ + --add-include-path=$(top_srcdir) \ + --pkg-export=gupnp-1.0 + +INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir) +@HAVE_INTROSPECTION_TRUE@GUPnP_1_0_gir_INCLUDES = libxml2-2.0 GObject-2.0 Soup-2.4 GSSDP-1.0 +@HAVE_INTROSPECTION_TRUE@GUPnP_1_0_gir_CFLAGS = -DGOBJECT_INTROSPECTION_SKIP $(INCLUDES) $(AM_CFLAGS) +@HAVE_INTROSPECTION_TRUE@GUPnP_1_0_gir_LIBS = libgupnp-1.0.la +@HAVE_INTROSPECTION_TRUE@GUPnP_1_0_gir_FILES = $(introspection_sources) +@HAVE_INTROSPECTION_TRUE@GUPnP_1_0_gir_NAMESPACE = GUPnP +@HAVE_INTROSPECTION_TRUE@GUPnP_1_0_gir_VERSION = 1.0 @HAVE_INTROSPECTION_TRUE@girdir = $(datadir)/gir-1.0 @HAVE_INTROSPECTION_TRUE@gir_DATA = GUPnP-1.0.gir @HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0/ @@ -398,7 +502,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -406,6 +509,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -427,7 +532,7 @@ clean-libLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libgupnp-1.0.la: $(libgupnp_1_0_la_OBJECTS) $(libgupnp_1_0_la_DEPENDENCIES) +libgupnp-1.0.la: $(libgupnp_1_0_la_OBJECTS) $(libgupnp_1_0_la_DEPENDENCIES) $(EXTRA_libgupnp_1_0_la_DEPENDENCIES) $(AM_V_CCLD)$(libgupnp_1_0_la_LINK) -rpath $(libdir) $(libgupnp_1_0_la_OBJECTS) $(libgupnp_1_0_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -436,6 +541,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-connman-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-context-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-control-point.Plo@am__quote@ @@ -443,6 +549,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-device-proxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-linux-context-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-marshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-network-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-resource-factory.Plo@am__quote@ @@ -451,8 +558,11 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-service-introspection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-service-proxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-service.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-simple-context-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-unix-context-manager.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-white-list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-windows-context-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-xml-doc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gvalue-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http-headers.Plo@am__quote@ @@ -461,26 +571,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -489,8 +596,11 @@ clean-libtool: -rm -rf .libs _libs install-girDATA: $(gir_DATA) @$(NORMAL_INSTALL) - test -z "$(girdir)" || $(MKDIR_P) "$(DESTDIR)$(girdir)" @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -504,13 +614,14 @@ uninstall-girDATA: @$(NORMAL_UNINSTALL) @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(girdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(girdir)" && rm -f $$files + dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir) install-typelibDATA: $(typelib_DATA) @$(NORMAL_INSTALL) - test -z "$(typelibdir)" || $(MKDIR_P) "$(DESTDIR)$(typelibdir)" @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(typelibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(typelibdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -524,13 +635,14 @@ uninstall-typelibDATA: @$(NORMAL_UNINSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(typelibdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(typelibdir)" && rm -f $$files + dir='$(DESTDIR)$(typelibdir)'; $(am__uninstall_files_from_dir) install-libgupnpincHEADERS: $(libgupnpinc_HEADERS) @$(NORMAL_INSTALL) - test -z "$(libgupnpincdir)" || $(MKDIR_P) "$(DESTDIR)$(libgupnpincdir)" @list='$(libgupnpinc_HEADERS)'; test -n "$(libgupnpincdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libgupnpincdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libgupnpincdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -544,9 +656,7 @@ uninstall-libgupnpincHEADERS: @$(NORMAL_UNINSTALL) @list='$(libgupnpinc_HEADERS)'; test -n "$(libgupnpincdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libgupnpincdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libgupnpincdir)" && rm -f $$files + dir='$(DESTDIR)$(libgupnpincdir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -649,10 +759,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -766,45 +881,9 @@ gupnp-marshal.c: gupnp-marshal.list gupnp-marshal.h: gupnp-marshal.list $(AM_V_GEN)$(GLIB_GENMARSHAL) --prefix=gupnp_marshal $(srcdir)/gupnp-marshal.list --header > gupnp-marshal.h -@HAVE_INTROSPECTION_TRUE@GUPnP-1.0.gir: libgupnp-1.0.la $(INTROSPECTION_SCANNER) -@HAVE_INTROSPECTION_TRUE@ $(AM_V_GEN) \ -@HAVE_INTROSPECTION_TRUE@ $(INTROSPECTION_SCANNER) -v \ -@HAVE_INTROSPECTION_TRUE@ --namespace=GUPnP --nsversion=1.0 \ -@HAVE_INTROSPECTION_TRUE@ --include=libxml2-2.0 \ -@HAVE_INTROSPECTION_TRUE@ --include=GObject-2.0 \ -@HAVE_INTROSPECTION_TRUE@ --include=Soup-2.4 \ -@HAVE_INTROSPECTION_TRUE@ --include=GSSDP-1.0 \ -@HAVE_INTROSPECTION_TRUE@ --library=$< \ -@HAVE_INTROSPECTION_TRUE@ --libtool="$(top_builddir)/libtool" \ -@HAVE_INTROSPECTION_TRUE@ --pkg libxml-2.0 \ -@HAVE_INTROSPECTION_TRUE@ --pkg gobject-2.0 \ -@HAVE_INTROSPECTION_TRUE@ --pkg gssdp-1.0 \ -@HAVE_INTROSPECTION_TRUE@ --pkg libsoup-2.4 \ -@HAVE_INTROSPECTION_TRUE@ --output $@ \ -@HAVE_INTROSPECTION_TRUE@ -I$(top_srcdir) \ -@HAVE_INTROSPECTION_TRUE@ $(addprefix $(top_srcdir)/libgupnp/, $(libgupnpinc_HEADERS)) \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-context.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-context-manager.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-control-point.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-device.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-device-info.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-device-proxy.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-error.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-resource-factory.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-root-device.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-service.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-service-info.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-service-proxy.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-service-introspection.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-xml-doc.c \ -@HAVE_INTROSPECTION_TRUE@ $(top_srcdir)/libgupnp/gupnp-types.c - -@HAVE_INTROSPECTION_TRUE@%.typelib: %.gir $(INTROSPECTION_COMPILER) -@HAVE_INTROSPECTION_TRUE@ $(AM_V_GEN) \ -@HAVE_INTROSPECTION_TRUE@ $(INTROSPECTION_COMPILER) \ -@HAVE_INTROSPECTION_TRUE@ --includedir=$(srcdir) \ -@HAVE_INTROSPECTION_TRUE@ --includedir=. \ -@HAVE_INTROSPECTION_TRUE@ $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) +-include $(INTROSPECTION_MAKEFILE) + +@HAVE_INTROSPECTION_TRUE@GUPnP-1.0.gir: libgupnp-1.0.la # 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 --git a/libgupnp/gena-protocol.h b/libgupnp/gena-protocol.h index cd6827e..adcb114 100644 --- a/libgupnp/gena-protocol.h +++ b/libgupnp/gena-protocol.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GENA_PROTOCOL_H__ diff --git a/libgupnp/gupnp-connman-manager.c b/libgupnp/gupnp-connman-manager.c new file mode 100644 index 0000000..afce14c --- /dev/null +++ b/libgupnp/gupnp-connman-manager.c @@ -0,0 +1,781 @@ +/* + * Copyright (C) 2012 Intel Corporation. All rights reserved. + * Copyright (C) 2009 Nokia Corporation. + * + * Author: Ludovic Ferrandis + * Author: Zeeshan Ali (Khattak) + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:gupnp-connman-manager + * @short_description: Connman-based implementation of + * #GUPnPContextManager. + * + */ + +#include "gupnp-connman-manager.h" +#include "gupnp-context.h" +#include "gupnp-marshal.h" + +typedef enum +{ + CM_SERVICE_STATE_ACTIVE = 1, + CM_SERVICE_STATE_INACTIVE = 2 + +} CMServiceState; + +typedef struct { + GUPnPConnmanManager *manager; + GUPnPContext *context; + GDBusProxy *proxy; + CMServiceState current; + guint sig_prop_id; + guint port; + gchar *iface; + gchar *name; + +} CMService; + +struct _GUPnPConnmanManagerPrivate { + GDBusProxy *manager_proxy; + GSource *idle_context_creation_src; + GHashTable *cm_services; + guint sig_change_id; + GDBusConnection *system_bus; +}; + +#define CM_DBUS_CONNMAN_NAME "net.connman" +#define CM_DBUS_MANAGER_PATH "/" +#define CM_DBUS_MANAGER_INTERFACE "net.connman.Manager" +#define CM_DBUS_SERVICE_INTERFACE "net.connman.Service" + +#define DBUS_SERVICE_DBUS "org.freedesktop.DBus" +#define DBUS_PATH_DBUS "/org/freedesktop/DBus" +#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus" + +#define LOOPBACK_IFACE "lo" + +G_DEFINE_TYPE (GUPnPConnmanManager, + gupnp_connman_manager, + GUPNP_TYPE_CONTEXT_MANAGER); + +static gboolean +loopback_context_create (gpointer data) +{ + GUPnPConnmanManager *manager; + GUPnPContext *context; + GError *error = NULL; + guint port; + + manager = GUPNP_CONNMAN_MANAGER (data); + manager->priv->idle_context_creation_src = NULL; + + g_object_get (manager, "port", &port, NULL); + + context = g_initable_new (GUPNP_TYPE_CONTEXT, + NULL, + &error, + "interface", LOOPBACK_IFACE, + "port", port, + NULL); + + if (error != NULL) { + g_warning ("Error creating GUPnP context: %s", error->message); + g_error_free (error); + + return FALSE; + } + + g_signal_emit_by_name (manager, "context-available", context); + g_object_unref (context); + + return FALSE; +} + +static gboolean +service_context_create (CMService *cm_service) +{ + GError *error = NULL; + + cm_service->context = g_initable_new (GUPNP_TYPE_CONTEXT, + NULL, + &error, + "interface", cm_service->iface, + "network", cm_service->name, + "port", cm_service->port, + NULL); + + if (error != NULL) { + g_warning ("Error creating GUPnP context: %s", error->message); + g_error_free (error); + + return FALSE; + } + + g_signal_emit_by_name (cm_service->manager, + "context-available", + cm_service->context); + + return TRUE; +} + +static void +service_context_delete (CMService *cm_service) +{ + // For other states we just destroy the context + g_signal_emit_by_name (cm_service->manager, + "context-unavailable", + cm_service->context); + + g_object_unref (cm_service->context); + cm_service->context = NULL; +} + +static void +service_context_update (CMService *cm_service, CMServiceState new_state) +{ + if (cm_service->current != new_state) { + if (new_state == CM_SERVICE_STATE_ACTIVE) { + if (service_context_create (cm_service) == FALSE) + new_state = CM_SERVICE_STATE_INACTIVE; + + } else if ((new_state == CM_SERVICE_STATE_INACTIVE) && + (cm_service->context != NULL)) { + service_context_delete (cm_service); + } + + cm_service->current = new_state; + } +} + +static void +on_service_property_signal (GDBusConnection *connection, + const gchar *sender_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + gpointer user_data) +{ + CMService *cm_service; + GVariant *value; + gchar *name; + const gchar *state_str; + CMServiceState new_state; + + cm_service = (CMService *) user_data; + g_variant_get (parameters, "(&sv)", &name, &value); + + if (g_strcmp0 (name, "Name") == 0) { + g_free (cm_service->name); + g_variant_get (value, "s", &cm_service->name); + + if (cm_service->context != NULL) + g_object_set (G_OBJECT (cm_service->context), + "network", + cm_service->name, + NULL); + + } else if (g_strcmp0 (name, "Ethernet") == 0) { + g_free (cm_service->iface); + g_variant_lookup (value, "Interface", "s", &cm_service->iface); + + if (cm_service->context != NULL) + g_object_set (G_OBJECT (cm_service->context), + "interface", + cm_service->iface, + NULL); + + } else if (g_strcmp0 (name, "State") == 0) { + state_str = g_variant_get_string (value, 0); + + if ((g_strcmp0 (state_str, "online") == 0) || + (g_strcmp0 (state_str, "ready") == 0)) + new_state = CM_SERVICE_STATE_ACTIVE; + else + new_state = CM_SERVICE_STATE_INACTIVE; + + service_context_update (cm_service, new_state); + } + + g_variant_unref (value); +} + +static CMService * +cm_service_new (GUPnPConnmanManager *manager, + GDBusProxy *service_proxy) +{ + CMService *cm_service; + + cm_service = g_slice_new0 (CMService); + + cm_service->manager = manager; + cm_service->proxy = service_proxy; + cm_service->current = CM_SERVICE_STATE_INACTIVE; + + return cm_service; +} + +static void +cm_service_free (CMService *cm_service) +{ + GDBusConnection *cnx; + + cnx = g_dbus_proxy_get_connection (cm_service->proxy); + + if (cm_service->sig_prop_id) { + g_dbus_connection_signal_unsubscribe (cnx, + cm_service->sig_prop_id); + cm_service->sig_prop_id = 0; + } + + g_object_unref (cm_service->proxy); + + if (cm_service->context != NULL) { + g_signal_emit_by_name (cm_service->manager, + "context-unavailable", + cm_service->context); + + g_object_unref (cm_service->context); + } + + g_free (cm_service->iface); + g_free (cm_service->name); + g_slice_free (CMService, cm_service); +} + +static void +cm_service_use (GUPnPConnmanManager *manager, + CMService *cm_service) +{ + GDBusConnection *connection; + + connection = g_dbus_proxy_get_connection (cm_service->proxy); + + cm_service->sig_prop_id = g_dbus_connection_signal_subscribe ( + connection, + CM_DBUS_CONNMAN_NAME, + CM_DBUS_SERVICE_INTERFACE, + "PropertyChanged", + g_dbus_proxy_get_object_path (cm_service->proxy), + NULL, + G_DBUS_SIGNAL_FLAGS_NONE, + on_service_property_signal, + cm_service, + NULL); + + if (cm_service->current == CM_SERVICE_STATE_ACTIVE) + if (service_context_create (cm_service) == FALSE) + cm_service->current = CM_SERVICE_STATE_INACTIVE; +} +static void +cm_service_update (CMService *cm_service, GVariant *dict, guint port) +{ + CMServiceState new_state; + GVariant *eth; + gchar *iface; + gchar *name; + gchar *state; + gboolean is_name; + gboolean is_iface; + + is_iface = FALSE; + iface = NULL; + name = NULL; + + is_name = g_variant_lookup (dict, "Name", "s", &name); + + eth = g_variant_lookup_value (dict, "Ethernet", G_VARIANT_TYPE_VARDICT); + + if (eth != NULL) { + is_iface = g_variant_lookup (eth, "Interface", "s", &iface); + g_variant_unref (eth); + } + + new_state = CM_SERVICE_STATE_INACTIVE; + + if (g_variant_lookup (dict, "State", "&s", &state) != FALSE) + if ((g_strcmp0 (state, "online") == 0) || + (g_strcmp0 (state, "ready") == 0)) + new_state = CM_SERVICE_STATE_ACTIVE; + + if (is_name && (g_strcmp0 (cm_service->name, name) == 0)) { + g_free (cm_service->name); + cm_service->name = name; + + if (cm_service->context != NULL) + g_object_set (G_OBJECT (cm_service->context), + "network", + cm_service->name, + NULL); + } + + if (is_iface && (g_strcmp0 (cm_service->iface, iface) == 0)) { + g_free (cm_service->iface); + cm_service->iface = iface; + + if (cm_service->context != NULL) + g_object_set (G_OBJECT (cm_service->context), + "interface", + cm_service->iface, + NULL); + } + + cm_service->port = port; + service_context_update (cm_service, new_state); +} + +static void +service_proxy_new_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GUPnPConnmanManager *manager; + GDBusProxy *service_proxy; + GError *error = NULL; + CMService *cm_service; + const gchar *path; + + service_proxy = g_dbus_proxy_new_for_bus_finish (res, &error); + + if (error != NULL) { + g_warning ("Failed to create D-Bus proxy: %s", error->message); + g_error_free (error); + + return; + } + + manager = GUPNP_CONNMAN_MANAGER (user_data); + path = g_dbus_proxy_get_object_path (service_proxy); + cm_service = g_hash_table_lookup (manager->priv->cm_services, path); + + if (cm_service == NULL) { + g_object_unref (service_proxy); + + return; + } + + cm_service->proxy = service_proxy; + cm_service_use (manager, cm_service); +} + +static void +cm_service_add (GUPnPConnmanManager *manager, + GVariant *dict, + gchar *path, + guint port) +{ + CMServiceState new_state; + CMService *cm_service; + GVariant *eth; + gchar *iface; + gchar *name; + gchar *state; + + iface = NULL; + name = NULL; + + g_variant_lookup (dict, "Name", "s", &name); + + eth = g_variant_lookup_value (dict, "Ethernet", G_VARIANT_TYPE_VARDICT); + + if (eth != NULL) { + g_variant_lookup (eth, "Interface", "s", &iface); + g_variant_unref (eth); + } + + new_state = CM_SERVICE_STATE_INACTIVE; + + if (g_variant_lookup (dict, "State", "&s", &state) != FALSE) + if ((g_strcmp0 (state, "online") == 0) || + (g_strcmp0 (state, "ready") == 0)) + new_state = CM_SERVICE_STATE_ACTIVE; + + cm_service = cm_service_new (manager, NULL); + + cm_service->name = name; + cm_service->iface = iface; + cm_service->port = port; + cm_service->current = new_state; + + g_hash_table_insert (manager->priv->cm_services, + g_strdup (path), + cm_service); + + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, + NULL, + CM_DBUS_CONNMAN_NAME, + path, + CM_DBUS_SERVICE_INTERFACE, + NULL, + service_proxy_new_cb, + manager); +} + +static void +services_array_add (GUPnPConnmanManager *manager, GVariant *data) +{ + GVariant *dict; + CMService *cm_service; + gchar *path; + GVariantIter iter; + GVariantIter dict_iter; + guint port; + + g_object_get (manager, "port", &port, NULL); + g_variant_iter_init (&iter, data); + + while (g_variant_iter_loop (&iter, "(&o@a{sv})", &path, &dict)) { + + if (path == NULL) + continue; + + if (dict == NULL) + continue; + + if (g_variant_iter_init (&dict_iter, dict) == 0) + continue; + + cm_service = g_hash_table_lookup (manager->priv->cm_services, + path); + + if (cm_service == NULL) + cm_service_add (manager, dict, path, port); + else + cm_service_update (cm_service, dict, port); + } +} + +static void +services_array_remove (GUPnPConnmanManager *manager, GVariant *data) +{ + GUPnPConnmanManagerPrivate *priv; + CMService *cm_service; + char *path; + GVariantIter iter; + + priv = manager->priv; + g_variant_iter_init (&iter, data); + + while (g_variant_iter_next (&iter, "&o", &path)) { + if (path == NULL) + continue; + + cm_service = g_hash_table_lookup (priv->cm_services, path); + + if (cm_service == NULL) + continue; + + g_hash_table_remove (priv->cm_services, path); + } +} + +static void +on_manager_svc_changed_signal (GDBusConnection *connection, + const gchar *sender_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + gpointer user_data) +{ + GUPnPConnmanManager *manager; + GVariant *add_array; + GVariant *remove_array; + + manager = GUPNP_CONNMAN_MANAGER (user_data); + + add_array = g_variant_get_child_value (parameters, 0); + remove_array = g_variant_get_child_value (parameters, 1); + + if ((add_array != NULL) && (g_variant_n_children (add_array) > 0)) + services_array_add (manager, add_array); + + if ((remove_array != NULL) && (g_variant_n_children (remove_array) > 0)) + services_array_remove (manager, remove_array); + + g_variant_unref (add_array); + g_variant_unref (remove_array); +} + +static void +get_services_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GUPnPConnmanManager *manager; + GVariant *ret; + GVariant *services_array; + GError *error = NULL; + + ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), + res, + &error); + + if (error != NULL) { + g_warning ("Error fetching service list: %s", error->message); + g_error_free (error); + + return; + } + + if (ret == NULL) { + g_warning ("Failed fetching list of services but no error"); + + return; + } + + if (g_variant_is_container (ret) != TRUE) + { + g_warning ("Wrong format result"); + g_variant_unref (ret); + + return; + } + + manager = GUPNP_CONNMAN_MANAGER (user_data); + services_array = g_variant_get_child_value (ret, 0); + services_array_add (manager, services_array); + + g_variant_unref (services_array); + g_variant_unref (ret); +} + +static void +schedule_loopback_context_creation (GUPnPConnmanManager *manager) +{ + /* Create contexts in mainloop so that it happens after user has hooked + * to the "context-available" signal. + */ + manager->priv->idle_context_creation_src = g_idle_source_new (); + + g_source_attach (manager->priv->idle_context_creation_src, + g_main_context_get_thread_default ()); + + g_source_set_callback (manager->priv->idle_context_creation_src, + loopback_context_create, + manager, + NULL); + + g_source_unref (manager->priv->idle_context_creation_src); +} + +static void +init_connman_manager (GUPnPConnmanManager *manager) +{ + GUPnPConnmanManagerPrivate *priv; + GError *error = NULL; + GDBusConnection *connection; + + priv = manager->priv; + + priv->manager_proxy = g_dbus_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, + NULL, + CM_DBUS_CONNMAN_NAME, + CM_DBUS_MANAGER_PATH, + CM_DBUS_MANAGER_INTERFACE, + NULL, + &error); + + if (error != NULL) { + g_warning ("Failed to connect to Connman: %s", error->message); + g_error_free (error); + + return; + } + + connection = g_dbus_proxy_get_connection (priv->manager_proxy); + + if (connection == NULL) { + g_warning ("Failed to get DBus Connection"); + g_object_unref (priv->manager_proxy); + priv->manager_proxy = NULL; + + return; + } + + g_dbus_proxy_call (priv->manager_proxy, + "GetServices", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + get_services_cb, + manager); + + priv->sig_change_id = g_dbus_connection_signal_subscribe ( + connection, + CM_DBUS_CONNMAN_NAME, + CM_DBUS_MANAGER_INTERFACE, + "ServicesChanged", + CM_DBUS_MANAGER_PATH, + NULL, + G_DBUS_SIGNAL_FLAGS_NONE, + on_manager_svc_changed_signal, + manager, + NULL); +} + +static void +gupnp_connman_manager_dispose (GObject *object) +{ + GUPnPConnmanManager *manager; + GUPnPConnmanManagerPrivate *priv; + GObjectClass *object_class; + GDBusConnection *cnx; + + manager = GUPNP_CONNMAN_MANAGER (object); + priv = manager->priv; + cnx = g_dbus_proxy_get_connection (priv->manager_proxy); + + if (priv->sig_change_id) { + g_dbus_connection_signal_unsubscribe (cnx, priv->sig_change_id); + priv->sig_change_id = 0; + } + + if (priv->idle_context_creation_src) { + g_source_destroy (priv->idle_context_creation_src); + priv->idle_context_creation_src = NULL; + } + + if (priv->manager_proxy != NULL) { + g_object_unref (priv->manager_proxy); + priv->manager_proxy = NULL; + } + + if (priv->cm_services) { + g_hash_table_destroy (priv->cm_services); + priv->cm_services = NULL; + } + + g_clear_object (&(priv->system_bus)); + + /* Call super */ + object_class = G_OBJECT_CLASS (gupnp_connman_manager_parent_class); + object_class->dispose (object); +} + +static void +gupnp_connman_manager_constructed (GObject *object) +{ + GUPnPConnmanManager *manager; + GObjectClass *object_class; + + manager = GUPNP_CONNMAN_MANAGER (object); + + manager->priv->system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, + NULL, + NULL); + + init_connman_manager (manager); + + schedule_loopback_context_creation (manager); + + /* Call super */ + object_class = G_OBJECT_CLASS (gupnp_connman_manager_parent_class); + + if (object_class->constructed != NULL) { + object_class->constructed (object); + } +} + +static void +gupnp_connman_manager_init (GUPnPConnmanManager *manager) +{ + manager->priv = G_TYPE_INSTANCE_GET_PRIVATE ( + manager, + GUPNP_TYPE_CONNMAN_MANAGER, + GUPnPConnmanManagerPrivate); + + manager->priv->cm_services = g_hash_table_new_full ( + g_str_hash, + g_str_equal, + (GDestroyNotify) g_free, + (GDestroyNotify) cm_service_free); +} + +static void +gupnp_connman_manager_class_init (GUPnPConnmanManagerClass *klass) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (klass); + + object_class->constructed = gupnp_connman_manager_constructed; + object_class->dispose = gupnp_connman_manager_dispose; + + g_type_class_add_private (klass, sizeof (GUPnPConnmanManagerPrivate)); +} + +gboolean +gupnp_connman_manager_is_available (void) +{ + GDBusProxy *dbus_proxy; + GVariant *ret_values; + GError *error = NULL; + gboolean ret = FALSE; + + dbus_proxy = g_dbus_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + NULL, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + NULL, + &error); + + + if (error != NULL) { + g_warning ("Failed to connect to Connman: %s", error->message); + g_error_free (error); + + return ret; + } + + ret_values = g_dbus_proxy_call_sync ( + dbus_proxy, + "NameHasOwner", + g_variant_new ("(s)", CM_DBUS_CONNMAN_NAME), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + + if (error != NULL) { + g_warning ("%s.NameHasOwner() failed: %s", + DBUS_INTERFACE_DBUS, + error->message); + + g_error_free (error); + + } else { + g_variant_get_child (ret_values, 0, "b", &ret); + g_variant_unref (ret_values); + } + + g_object_unref (dbus_proxy); + + return ret; +} diff --git a/libgupnp/gupnp-connman-manager.h b/libgupnp/gupnp-connman-manager.h new file mode 100644 index 0000000..976668f --- /dev/null +++ b/libgupnp/gupnp-connman-manager.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2012 Intel Corporation. All rights reserved. + * Copyright (C) 2009 Nokia Corporation. + * + * Author: Ludovic Ferrandis + * Author: Zeeshan Ali (Khattak) + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GUPNP_CONNMAN_MANAGER_H__ +#define __GUPNP_CONNMAN_MANAGER_H__ + +#include "gupnp-context-manager.h" + +G_BEGIN_DECLS + +G_GNUC_INTERNAL GType +gupnp_connman_manager_get_type (void) G_GNUC_CONST; + +#define GUPNP_TYPE_CONNMAN_MANAGER \ + (gupnp_connman_manager_get_type ()) +#define GUPNP_CONNMAN_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GUPNP_TYPE_CONNMAN_MANAGER, \ + GUPnPConnmanManager)) +#define GUPNP_CONNMAN_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_CAST ((obj), \ + GUPNP_TYPE_CONNMAN_MANAGER, \ + GUPnPConnmanManagerClass)) +#define GUPNP_IS_CONNMAN_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GUPNP_TYPE_CONNMAN_MANAGER)) +#define GUPNP_IS_CONNMAN_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE ((obj), \ + GUPNP_TYPE_CONNMAN_MANAGER)) +#define GUPNP_CONNMAN_MANAGER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GUPNP_TYPE_CONNMAN_MANAGER, \ + GUPnPConnmanManagerClass)) + +typedef struct _GUPnPConnmanManagerPrivate GUPnPConnmanManagerPrivate; + +typedef struct { + GUPnPContextManager parent; + GUPnPConnmanManagerPrivate *priv; + +} GUPnPConnmanManager; + +typedef struct { + GUPnPContextManagerClass parent_class; + +} GUPnPConnmanManagerClass; + +G_GNUC_INTERNAL gboolean +gupnp_connman_manager_is_available (void); + +G_END_DECLS + +#endif /* __GUPNP_CONNMAN_MANAGER_H__ */ diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c index be2b077..21ce53b 100644 --- a/libgupnp/gupnp-context-manager.c +++ b/libgupnp/gupnp-context-manager.c @@ -1,9 +1,11 @@ /* - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. + * Copyright (C) 2013 Intel Corporation. * * Author: Zeeshan Ali (Khattak) * Jorn Baayen + * Ludovic Ferrandis * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -17,8 +19,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -37,6 +39,7 @@ #include #include #include +#include #include #include "gupnp.h" @@ -44,25 +47,26 @@ #include "gupnp-unix-context-manager.h" -G_DEFINE_TYPE (GUPnPContextManager, - gupnp_context_manager, - G_TYPE_OBJECT); +G_DEFINE_ABSTRACT_TYPE (GUPnPContextManager, + gupnp_context_manager, + G_TYPE_OBJECT); struct _GUPnPContextManagerPrivate { - GMainContext *main_context; - guint port; GUPnPContextManager *impl; GList *objects; /* control points and root devices */ + GList *blacklisted; /* Blacklisted Context */ + + GUPnPWhiteList *white_list; }; enum { PROP_0, PROP_MAIN_CONTEXT, PROP_PORT, - PROP_CONTEXT_MANAGER + PROP_WHITE_LIST }; enum { @@ -74,28 +78,40 @@ enum { static guint signals[SIGNAL_LAST]; static void -on_context_available (GUPnPContextManager *impl, - GUPnPContext *context, - gpointer *user_data) +on_context_available (GUPnPContextManager *manager, + GUPnPContext *context, + G_GNUC_UNUSED gpointer *user_data) { - GUPnPContextManager *manager = GUPNP_CONTEXT_MANAGER (user_data); - - /* Just proxy the signal */ - g_signal_emit (manager, - signals[CONTEXT_AVAILABLE], - 0, - context); + GUPnPWhiteList *white_list; + + white_list = manager->priv->white_list; + + /* Try to catch the notification, only if the white list + * is enabled, not empty and the context doesn't match */ + if (!gupnp_white_list_is_empty (white_list) && + gupnp_white_list_get_enabled (white_list) && + !gupnp_white_list_check_context (white_list, context)) { + /* If the conext doesn't match, block the notification + * and disable the context */ + g_signal_stop_emission_by_name (manager, "context-available"); + + /* Make sure we don't send anything on now blocked network */ + g_object_set (context, "active", FALSE, NULL); + + /* Save it in case we need to re-enable it */ + manager->priv->blacklisted = g_list_prepend ( + manager->priv->blacklisted, + g_object_ref (context)); + } } static void -on_context_unavailable (GUPnPContextManager *impl, - GUPnPContext *context, - gpointer *user_data) +on_context_unavailable (GUPnPContextManager *manager, + GUPnPContext *context, + G_GNUC_UNUSED gpointer *user_data) { - GUPnPContextManager *manager; GList *l; - - manager = GUPNP_CONTEXT_MANAGER (user_data); + GList *black; /* Make sure we don't send anything on now unavailable network */ g_object_set (context, "active", FALSE, NULL); @@ -133,11 +149,118 @@ on_context_unavailable (GUPnPContextManager *impl, } } - /* Just proxy the signal */ - g_signal_emit (manager, - signals[CONTEXT_UNAVAILABLE], - 0, - context); + black = g_list_find (manager->priv->blacklisted, context); + + if (black != NULL) { + g_signal_stop_emission_by_name (manager, "context-unavailable"); + + g_object_unref (black->data); + manager->priv->blacklisted = + g_list_delete_link (manager->priv->blacklisted, black); + } +} + +static void +gupnp_context_manager_filter_context (GUPnPWhiteList *white_list, + GUPnPContextManager *manager, + gboolean check) +{ + GList *next; + GList *obj; + GList *blk; + gboolean match; + GUPnPContext *context; + GSSDPResourceBrowser *browser; + + obj = manager->priv->objects; + blk = manager->priv->blacklisted; + + while (obj != NULL) { + if (!GUPNP_IS_CONTROL_POINT (obj->data)) + continue; + + /* If the white list is empty, treat it as disabled */ + if (check) { + /* Filter out context */ + context = gupnp_control_point_get_context (obj->data); + match = gupnp_white_list_check_context (white_list, + context); + } else { + /* Re-activate all context, if needed */ + match = TRUE; + } + + browser = GSSDP_RESOURCE_BROWSER (obj->data); + gssdp_resource_browser_set_active (browser, match); + + if (match) + (void) gssdp_resource_browser_rescan (browser); + + obj = obj->next; + } + + while (blk != NULL) { + /* If the white list is empty, treat it as disabled */ + if (check) + /* Filter out context */ + match = gupnp_white_list_check_context (white_list, + blk->data); + else + /* Re-activate all context, if needed */ + match = TRUE; + + if (!match) { + blk = blk->next; + continue; + } + + next = blk->next; + g_object_set (blk->data, "active", TRUE, NULL); + + g_signal_emit_by_name (manager, "context-available", blk->data); + + g_object_unref (blk->data); + manager->priv->blacklisted = g_list_delete_link ( + manager->priv->blacklisted, + blk); + blk = next; + } +} + +static void +on_white_list_change_cb (GUPnPWhiteList *white_list, + GParamSpec *pspec, + gpointer user_data) +{ + GUPnPContextManager *manager = GUPNP_CONTEXT_MANAGER (user_data); + gboolean enabled; + gboolean is_empty; + + enabled = gupnp_white_list_get_enabled (white_list); + is_empty = gupnp_white_list_is_empty (white_list); + + if (enabled) + gupnp_context_manager_filter_context (white_list, + manager, + !is_empty); +} + +static void +on_white_list_enabled_cb (GUPnPWhiteList *white_list, + GParamSpec *pspec, + gpointer user_data) +{ + GUPnPContextManager *manager = GUPNP_CONTEXT_MANAGER (user_data); + gboolean enabled; + gboolean is_empty; + + enabled = gupnp_white_list_get_enabled (white_list); + is_empty = gupnp_white_list_is_empty (white_list); + + if (!is_empty) + gupnp_context_manager_filter_context (white_list, + manager, + enabled); } static void @@ -147,6 +270,14 @@ gupnp_context_manager_init (GUPnPContextManager *manager) G_TYPE_INSTANCE_GET_PRIVATE (manager, GUPNP_TYPE_CONTEXT_MANAGER, GUPnPContextManagerPrivate); + + manager->priv->white_list = gupnp_white_list_new (); + + g_signal_connect_after (manager->priv->white_list, "notify::entries", + G_CALLBACK (on_white_list_change_cb), manager); + + g_signal_connect_after (manager->priv->white_list, "notify::enabled", + G_CALLBACK (on_white_list_enabled_cb), manager); } static void @@ -166,22 +297,11 @@ gupnp_context_manager_set_property (GObject *object, priv->port = g_value_get_uint (value); break; case PROP_MAIN_CONTEXT: - priv->main_context = g_value_get_pointer (value); - break; - case PROP_CONTEXT_MANAGER: - priv->impl = g_value_get_object (value); - if (priv->impl != NULL) { - priv->impl = g_object_ref (priv->impl); - - g_signal_connect (priv->impl, - "context-available", - G_CALLBACK (on_context_available), - manager); - g_signal_connect (priv->impl, - "context-unavailable", - G_CALLBACK (on_context_unavailable), - manager); - } + if (g_value_get_pointer (value) != NULL) + g_warning ("GUPnPContextManager:main-context is " + "deprecated. Use " + "g_main_context_push_thread_default()" + "instead."); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -204,10 +324,14 @@ gupnp_context_manager_get_property (GObject *object, g_value_set_uint (value, manager->priv->port); break; case PROP_MAIN_CONTEXT: - g_value_set_pointer (value, manager->priv->main_context); + g_warning ("GUPnPContextManager:main-context is deprecated. " + "Use g_main_context_push_thread_default()" + "instead."); + g_value_set_pointer (value, + g_main_context_get_thread_default ()); break; - case PROP_CONTEXT_MANAGER: - g_value_set_object (value, manager->priv->impl); + case PROP_WHITE_LIST: + g_value_set_object (value, manager->priv->white_list); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -219,22 +343,29 @@ static void gupnp_context_manager_dispose (GObject *object) { GUPnPContextManager *manager; + GUPnPWhiteList *wl; GObjectClass *object_class; manager = GUPNP_CONTEXT_MANAGER (object); + wl = manager->priv->white_list; - if (manager->priv->impl != NULL) { - g_signal_handlers_disconnect_by_func (manager->priv->impl, - on_context_available, manager); - g_signal_handlers_disconnect_by_func (manager->priv->impl, - on_context_unavailable, manager); - g_object_unref (manager->priv->impl); - manager->priv->impl = NULL; - } + g_signal_handlers_disconnect_by_func (wl, + on_white_list_enabled_cb, + manager); + + g_signal_handlers_disconnect_by_func (wl, + on_white_list_change_cb, + NULL); - g_list_foreach (manager->priv->objects, (GFunc) g_object_unref, NULL); - g_list_free (manager->priv->objects); + g_list_free_full (manager->priv->objects, g_object_unref); manager->priv->objects = NULL; + g_list_free_full (manager->priv->blacklisted, g_object_unref); + manager->priv->blacklisted = NULL; + + if (wl) { + g_object_unref (wl); + manager->priv->white_list = NULL; + } /* Call super */ object_class = G_OBJECT_CLASS (gupnp_context_manager_parent_class); @@ -259,6 +390,9 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass) * * The #GMainContext to pass to created #GUPnPContext objects. Set to * NULL to use the default. + * + * Deprecated: 0.17.2: Use g_main_context_push_thread_default() + * instead. **/ g_object_class_install_property (object_class, @@ -275,7 +409,7 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass) /** * GUPnPContextManager:port: * - * @port: Port to create contexts for, or 0 if you don't care what + * Port the contexts listen on, or 0 if you don't care what * port is used by #GUPnPContext objects created by this object. **/ g_object_class_install_property @@ -291,28 +425,24 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass) G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); - /** - * GUPnPContextManager:context-manager: - * - * The actual GUPnPContextManager implementation used. This is an - * internal property and therefore Application developer should just - * ignore it. + /** + * GUPnPContextManager:white-list: * + * The white list to use. **/ g_object_class_install_property (object_class, - PROP_CONTEXT_MANAGER, - g_param_spec_object ("context-manager", - "ContextManager", - "ContextManager implemention", - GUPNP_TYPE_CONTEXT_MANAGER, - G_PARAM_WRITABLE | - G_PARAM_CONSTRUCT_ONLY | + PROP_WHITE_LIST, + g_param_spec_object ("white-list", + "White List", + "The white list to use", + GUPNP_TYPE_WHITE_LIST, + G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); - /** + /** * GUPnPContextManager::context-available: * @context_manager: The #GUPnPContextManager that received the signal * @context: The now available #GUPnPContext @@ -321,15 +451,15 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass) * **/ signals[CONTEXT_AVAILABLE] = - g_signal_new ("context-available", - GUPNP_TYPE_CONTEXT_MANAGER, - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, - 1, - GUPNP_TYPE_CONTEXT); + g_signal_new_class_handler ("context-available", + GUPNP_TYPE_CONTEXT_MANAGER, + G_SIGNAL_RUN_FIRST, + G_CALLBACK (on_context_available), + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, + 1, + GUPNP_TYPE_CONTEXT); /** * GUPnPContextManager::context-unavailable: @@ -340,57 +470,135 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass) * **/ signals[CONTEXT_UNAVAILABLE] = - g_signal_new ("context-unavailable", - GUPNP_TYPE_CONTEXT_MANAGER, - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, - 1, - GUPNP_TYPE_CONTEXT); + g_signal_new_class_handler + ("context-unavailable", + GUPNP_TYPE_CONTEXT_MANAGER, + G_SIGNAL_RUN_FIRST, + G_CALLBACK (on_context_unavailable), + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, + 1, + GUPNP_TYPE_CONTEXT); } /** * gupnp_context_manager_new: + * @main_context: (allow-none): Deprecated: 0.17.2: %NULL. If you want to use + * a different main context use + * g_main_context_push_thread_default() instead. * @port: Port to create contexts for, or 0 if you don't care what port is used. - * @main_context: GMainContext to pass to created GUPnPContext objects. * - * Create a new #GUPnPContextManager. + * Same as gupnp_context_manager_create(). * - * Return value: A new #GUPnPContextManager object. + * Returns: (transfer full): A new #GUPnPContextManager object. + * Deprecated: 0.17.2: Use gupnp_context_manager_create(). **/ GUPnPContextManager * gupnp_context_manager_new (GMainContext *main_context, guint port) { - GUPnPContextManager *manager; + if (main_context) + g_warning ("gupnp_context_manager_new::main_context is" + " deprecated. Use " + " g_main_context_push_thread_default() instead"); + + return gupnp_context_manager_create (port); +} + +#ifdef HAVE_LINUX_RTNETLINK_H +#include "gupnp-linux-context-manager.h" +#endif + +/** + * gupnp_context_manager_create: + * @port: Port to create contexts for, or 0 if you don't care what port is used. + * + * Factory-method to create a new #GUPnPContextManager. The final type of the + * #GUPnPContextManager depends on the compile-time selection or - in case of + * NetworkManager - on its availability during runtime. If it is not available, + * the implementation falls back to the basic Unix context manager instead. + * + * Returns: (transfer full): A new #GUPnPContextManager object. + **/ +GUPnPContextManager * +gupnp_context_manager_create (guint port) +{ +#if defined(USE_NETWORK_MANAGER) || defined (USE_CONNMAN) + GDBusConnection *system_bus; +#endif GUPnPContextManager *impl; GType impl_type = G_TYPE_INVALID; +#ifdef G_OS_WIN32 +#include "gupnp-windows-context-manager.h" + impl_type = GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER; +#else #ifdef USE_NETWORK_MANAGER #include "gupnp-network-manager.h" + system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); - if (gupnp_network_manager_is_available (main_context)) + if (gupnp_network_manager_is_available ()) impl_type = GUPNP_TYPE_NETWORK_MANAGER; +#elif USE_CONNMAN +#include "gupnp-connman-manager.h" + system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); + + if (gupnp_connman_manager_is_available ()) + impl_type = GUPNP_TYPE_CONNMAN_MANAGER; #endif - if (impl_type == G_TYPE_INVALID) + if (impl_type == G_TYPE_INVALID) { + /* Either user requested us to use the Linux CM explicitly or we + * are using one of the DBus managers but it's not available, so we + * fall-back to it. */ +#if defined (USE_NETLINK) || defined (HAVE_LINUX_RTNETLINK_H) + if (gupnp_linux_context_manager_is_available ()) + impl_type = GUPNP_TYPE_LINUX_CONTEXT_MANAGER; + else + impl_type = GUPNP_TYPE_UNIX_CONTEXT_MANAGER; +#else impl_type = GUPNP_TYPE_UNIX_CONTEXT_MANAGER; - +#endif + } +#endif /* G_OS_WIN32 */ impl = g_object_new (impl_type, - "main-context", main_context, "port", port, NULL); - manager = g_object_new (GUPNP_TYPE_CONTEXT_MANAGER, - "main-context", main_context, - "port", port, - "context-manager", impl, - NULL); - g_object_unref (impl); +#if defined(USE_NETWORK_MANAGER) || defined(USE_CONNMAN) + g_object_unref (system_bus); +#endif + return impl; +} - return manager; +/** + * gupnp_context_manager_rescan_control_points: + * @manager: A #GUPnPContextManager + * + * This function starts a rescan on every control point managed by @manager. + * Only the active control points send discovery messages. + * This function should be called when servers are suspected to have + * disappeared. + **/ +void +gupnp_context_manager_rescan_control_points (GUPnPContextManager *manager) +{ + GList *l; + + g_return_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager)); + + l = manager->priv->objects; + + while (l) { + if (GUPNP_IS_CONTROL_POINT (l->data)) { + GSSDPResourceBrowser *browser = + GSSDP_RESOURCE_BROWSER (l->data); + gssdp_resource_browser_rescan (browser); + } + + l = l->next; + } } /** @@ -437,3 +645,34 @@ gupnp_context_manager_manage_root_device (GUPnPContextManager *manager, g_object_ref (root_device)); } +/** + * gupnp_context_manager_get_port: + * @manager: A #GUPnPContextManager + * + * Get the network port associated with this context manager. + * Returns: The network port asssociated with this context manager. + */ +guint +gupnp_context_manager_get_port (GUPnPContextManager *manager) +{ + g_return_val_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager), 0); + + return manager->priv->port; +} + +/** + * gupnp_context_manager_get_white_list: + * @manager: A #GUPnPContextManager + * + * Get the #GUPnPWhiteList associated with @manager. + * + * Returns: (transfer none): The #GUPnPWhiteList asssociated with this + * context manager. + */ +GUPnPWhiteList * +gupnp_context_manager_get_white_list (GUPnPContextManager *manager) +{ + g_return_val_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager), NULL); + + return manager->priv->white_list; +} diff --git a/libgupnp/gupnp-context-manager.h b/libgupnp/gupnp-context-manager.h index d67ae20..6124ea9 100644 --- a/libgupnp/gupnp-context-manager.h +++ b/libgupnp/gupnp-context-manager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. * * Author: Zeeshan Ali (Khattak) @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_CONTEXT_MANAGER_H__ @@ -26,6 +26,7 @@ #include #include "gupnp.h" +#include "gupnp-white-list.h" G_BEGIN_DECLS @@ -54,6 +55,8 @@ gupnp_context_manager_get_type (void) G_GNUC_CONST; GUPnPContextManagerClass)) typedef struct _GUPnPContextManagerPrivate GUPnPContextManagerPrivate; +typedef struct _GUPnPContextManager GUPnPContextManager; +typedef struct _GUPnPContextManagerClass GUPnPContextManagerClass; /** * GUPnPContextManager: @@ -61,13 +64,13 @@ typedef struct _GUPnPContextManagerPrivate GUPnPContextManagerPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPContextManager { GObject parent; GUPnPContextManagerPrivate *priv; -} GUPnPContextManager; +}; -typedef struct { +struct _GUPnPContextManagerClass { GObjectClass parent_class; /* future padding */ @@ -75,11 +78,21 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPContextManagerClass; +}; + +#ifndef GUPNP_DISABLE_DEPRECATED GUPnPContextManager * gupnp_context_manager_new (GMainContext *main_context, guint port); +#endif + +GUPnPContextManager * +gupnp_context_manager_create (guint port); + +void +gupnp_context_manager_rescan_control_points + (GUPnPContextManager *manager); void gupnp_context_manager_manage_control_point @@ -91,6 +104,12 @@ gupnp_context_manager_manage_root_device (GUPnPContextManager *manager, GUPnPRootDevice *root_device); +guint +gupnp_context_manager_get_port (GUPnPContextManager *manager); + +GUPnPWhiteList * +gupnp_context_manager_get_white_list (GUPnPContextManager *manager); + G_END_DECLS #endif /* __GUPNP_CONTEXT_MANAGER_H__ */ diff --git a/libgupnp/gupnp-context-private.h b/libgupnp/gupnp-context-private.h index 005693a..18c4813 100644 --- a/libgupnp/gupnp-context-private.h +++ b/libgupnp/gupnp-context-private.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_CONTEXT_PRIVATE_H__ diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c index 13fa0d3..81c030c 100644 --- a/libgupnp/gupnp-context.c +++ b/libgupnp/gupnp-context.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * * Author: Jorn Baayen * Zeeshan Ali (Khattak) @@ -18,8 +18,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -30,7 +30,7 @@ * GUPnP classes. It automatically starts a web server on demand. * * For debugging, it is possible to see the messages being sent and received by - * exporting #GUPNP_DEBUG. + * exporting GUPNP_DEBUG. */ #include @@ -40,9 +40,10 @@ #include #include #include +#include +#ifndef G_OS_WIN32 #include -#include -#include +#endif #include #include #include @@ -50,13 +51,25 @@ #include "gupnp-context.h" #include "gupnp-context-private.h" +#include "gupnp-error.h" #include "gupnp-marshal.h" #include "gena-protocol.h" #include "http-headers.h" -G_DEFINE_TYPE (GUPnPContext, - gupnp_context, - GSSDP_TYPE_CLIENT); +#define GUPNP_CONTEXT_DEFAULT_LANGUAGE "en" + +static void +gupnp_context_initable_iface_init (gpointer g_iface, + gpointer iface_data); + + +G_DEFINE_TYPE_EXTENDED (GUPnPContext, + gupnp_context, + GSSDP_TYPE_CLIENT, + 0, + G_IMPLEMENT_INTERFACE + (G_TYPE_INITABLE, + gupnp_context_initable_iface_init)); struct _GUPnPContextPrivate { guint port; @@ -67,6 +80,7 @@ struct _GUPnPContextPrivate { SoupServer *server; /* Started on demand */ char *server_url; + char *default_language; GList *host_path_datas; }; @@ -76,7 +90,8 @@ enum { PROP_PORT, PROP_SERVER, PROP_SESSION, - PROP_SUBSCRIPTION_TIMEOUT + PROP_SUBSCRIPTION_TIMEOUT, + PROP_DEFAULT_LANGUAGE }; typedef struct { @@ -88,16 +103,33 @@ typedef struct { typedef struct { char *local_path; char *server_path; + char *default_language; GList *user_agents; } HostPathData; +static GInitableIface* initable_parent_iface = NULL; + /* * Generates the default server ID. **/ static char * make_server_id (void) { +#ifdef G_OS_WIN32 + OSVERSIONINFO versioninfo; + versioninfo.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); + if (GetVersionEx (&versioninfo)) { + return g_strdup_printf ("Microsoft Windows/%ld.%ld" + " UPnP/1.0 GUPnP/%s", + versioninfo.dwMajorVersion, + versioninfo.dwMinorVersion, + VERSION); + } else { + return g_strdup_printf ("Microsoft Windows UPnP/1.0 GUPnP/%s", + VERSION); + } +#else struct utsname sysinfo; uname (&sysinfo); @@ -106,6 +138,7 @@ make_server_id (void) sysinfo.sysname, sysinfo.release, VERSION); +#endif } static void @@ -123,28 +156,34 @@ gupnp_context_init (GUPnPContext *context) g_free (server_id); } -static GObject * -gupnp_context_constructor (GType type, - guint n_props, - GObjectConstructParam *props) +static gboolean +gupnp_context_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error) { - GObject *object; - GUPnPContext *context; char *user_agent; + GError *inner_error = NULL; + GUPnPContext *context; - object = G_OBJECT_CLASS (gupnp_context_parent_class)->constructor - (type, n_props, props); - context = GUPNP_CONTEXT (object); + if (!initable_parent_iface->init(initable, + cancellable, + &inner_error)) { + g_propagate_error (error, inner_error); + + return FALSE; + } + + context = GUPNP_CONTEXT (initable); context->priv->session = soup_session_async_new_with_options (SOUP_SESSION_IDLE_TIMEOUT, 60, SOUP_SESSION_ASYNC_CONTEXT, - gssdp_client_get_main_context (GSSDP_CLIENT (context)), + g_main_context_get_thread_default (), NULL); user_agent = g_strdup_printf ("%s GUPnP/" VERSION " DLNADOC/1.50", - g_get_application_name ()? : ""); + g_get_prgname ()? : ""); g_object_set (context->priv->session, SOUP_SESSION_USER_AGENT, user_agent, @@ -158,7 +197,37 @@ gupnp_context_constructor (GType type, SOUP_SESSION_FEATURE (logger)); } - return object; + soup_session_add_feature_by_type (context->priv->session, + SOUP_TYPE_CONTENT_DECODER); + + /* Create the server already if the port is not null*/ + if (context->priv->port != 0) { + gupnp_context_get_server (context); + + if (context->priv->server == NULL) { + g_object_unref (context->priv->session); + context->priv->session = NULL; + + g_set_error (error, + GUPNP_SERVER_ERROR, + GUPNP_SERVER_ERROR_OTHER, + "Could not create HTTP server on port %d", + context->priv->port); + + return FALSE; + } + } + + return TRUE; +} + +static void +gupnp_context_initable_iface_init (gpointer g_iface, + G_GNUC_UNUSED gpointer iface_data) +{ + GInitableIface *iface = (GInitableIface *)g_iface; + initable_parent_iface = g_type_interface_peek_parent (iface); + iface->init = gupnp_context_initable_init; } static void @@ -178,6 +247,10 @@ gupnp_context_set_property (GObject *object, case PROP_SUBSCRIPTION_TIMEOUT: context->priv->subscription_timeout = g_value_get_uint (value); break; + case PROP_DEFAULT_LANGUAGE: + gupnp_context_set_default_language (context, + g_value_get_string (value)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -212,6 +285,11 @@ gupnp_context_get_property (GObject *object, gupnp_context_get_subscription_timeout (context)); break; + case PROP_DEFAULT_LANGUAGE: + g_value_set_string (value, + gupnp_context_get_default_language + (context)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -231,11 +309,6 @@ gupnp_context_dispose (GObject *object) context->priv->session = NULL; } - if (context->priv->server) { - g_object_unref (context->priv->server); - context->priv->server = NULL; - } - while (context->priv->host_path_datas) { HostPathData *data; @@ -244,6 +317,11 @@ gupnp_context_dispose (GObject *object) gupnp_context_unhost_path (context, data->server_path); } + if (context->priv->server) { + g_object_unref (context->priv->server); + context->priv->server = NULL; + } + /* Call super */ object_class = G_OBJECT_CLASS (gupnp_context_parent_class); object_class->dispose (object); @@ -257,6 +335,11 @@ gupnp_context_finalize (GObject *object) context = GUPNP_CONTEXT (object); + if (context->priv->default_language) { + g_free (context->priv->default_language); + context->priv->default_language = NULL; + } + g_free (context->priv->server_url); /* Call super */ @@ -271,7 +354,6 @@ gupnp_context_class_init (GUPnPContextClass *klass) object_class = G_OBJECT_CLASS (klass); - object_class->constructor = gupnp_context_constructor; object_class->set_property = gupnp_context_set_property; object_class->get_property = gupnp_context_get_property; object_class->dispose = gupnp_context_dispose; @@ -352,6 +434,25 @@ gupnp_context_class_init (GUPnPContextClass *klass) G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + /** + * GUPnPContext:default-language: + * + * The content of the Content-Language header id the client + * sends Accept-Language and no language-specific pages to serve + * exist. The property defaults to 'en'. + **/ + g_object_class_install_property + (object_class, + PROP_DEFAULT_LANGUAGE, + g_param_spec_string ("default-language", + "Default language", + "Default language", + GUPNP_CONTEXT_DEFAULT_LANGUAGE, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); } /** @@ -375,12 +476,12 @@ gupnp_context_get_session (GUPnPContext *context) * Default server handler: Return 404 not found. **/ static void -default_server_handler (SoupServer *server, - SoupMessage *msg, - const char *path, - GHashTable *query, - SoupClientContext *client, - gpointer user_data) +default_server_handler (G_GNUC_UNUSED SoupServer *server, + SoupMessage *msg, + G_GNUC_UNUSED const char *path, + G_GNUC_UNUSED GHashTable *query, + G_GNUC_UNUSED SoupClientContext *client, + G_GNUC_UNUSED gpointer user_data) { soup_message_set_status (msg, SOUP_STATUS_NOT_FOUND); } @@ -391,7 +492,7 @@ default_server_handler (SoupServer *server, * * Get the #SoupServer HTTP server that GUPnP is using. * - * Return value: The #SoupServer used by GUPnP. Do not unref this when finished. + * Returns: (transfer none): The #SoupServer used by GUPnP. Do not unref this when finished. **/ SoupServer * gupnp_context_get_server (GUPnPContext *context) @@ -409,17 +510,21 @@ gupnp_context_get_server (GUPnPContext *context) (SOUP_SERVER_PORT, context->priv->port, SOUP_SERVER_ASYNC_CONTEXT, - gssdp_client_get_main_context (GSSDP_CLIENT (context)), + g_main_context_get_thread_default (), SOUP_SERVER_INTERFACE, addr, NULL); g_object_unref (addr); - soup_server_add_handler (context->priv->server, NULL, - default_server_handler, context, - NULL); + if (context->priv->server) { + soup_server_add_handler (context->priv->server, + NULL, + default_server_handler, + context, + NULL); - soup_server_run_async (context->priv->server); + soup_server_run_async (context->priv->server); + } } return context->priv->server; @@ -456,28 +561,35 @@ _gupnp_context_get_server_url (GUPnPContext *context) /** * gupnp_context_new: - * @main_context: A #GMainContext, or %NULL to use the default one - * @interface: The network interface to use, or %NULL to auto-detect. + * @main_context: (allow-none): Deprecated: 0.17.2: Always set to %NULL. If you + * want to use a different context, use g_main_context_push_thread_default(). + * @iface: (allow-none): The network interface to use, or %NULL to + * auto-detect. * @port: Port to run on, or 0 if you don't care what port is used. * @error: A location to store a #GError, or %NULL * - * Create a new #GUPnPContext with the specified @main_context, @interface and + * Create a new #GUPnPContext with the specified @main_context, @iface and * @port. * * Return value: A new #GUPnPContext object, or %NULL on an error **/ GUPnPContext * gupnp_context_new (GMainContext *main_context, - const char *interface, + const char *iface, guint port, GError **error) { - return g_object_new (GUPNP_TYPE_CONTEXT, - "main-context", main_context, - "interface", interface, - "port", port, - "error", error, - NULL); + if (main_context) + g_warning ("gupnp_context_new::main_context is deprecated." + " Use g_main_context_push_thread_default()" + " instead"); + + return g_initable_new (GUPNP_TYPE_CONTEXT, + NULL, + error, + "interface", iface, + "port", port, + NULL); } /** @@ -554,6 +666,73 @@ gupnp_context_get_subscription_timeout (GUPnPContext *context) return context->priv->subscription_timeout; } +static void +host_path_data_set_language (HostPathData *data, const char *language) +{ + char *old_language = data->default_language; + + if ((old_language != NULL) && (!strcmp (language, old_language))) + return; + + data->default_language = g_strdup (language); + + + if (old_language != NULL) + g_free (old_language); +} + +/** + * gupnp_context_set_default_language: + * @context: A #GUPnPContext + * @language: A language tag as defined in RFC 2616 3.10 + * + * Set the default language for the Content-Length header to @language. + * + * If the client sends an Accept-Language header the UPnP HTTP server + * is required to send a Content-Language header in return. If there are + * no files hosted in languages which match the requested ones the + * Content-Language header is set to this value. The default value is "en". + */ +void +gupnp_context_set_default_language (GUPnPContext *context, + const char *language) +{ + g_return_if_fail (GUPNP_IS_CONTEXT (context)); + g_return_if_fail (language != NULL); + + + char *old_language = context->priv->default_language; + + if ((old_language != NULL) && (!strcmp (language, old_language))) + return; + + context->priv->default_language = g_strdup (language); + + g_list_foreach (context->priv->host_path_datas, + (GFunc) host_path_data_set_language, + (gpointer) language); + + if (old_language != NULL) + g_free (old_language); +} + +/** + * gupnp_context_get_default_language: + * @context: A #GUPnPContext + * + * Get the default Content-Language header for this context. + * + * Returns: (transfer none): The default content of the Content-Language + * header. + */ +const char * +gupnp_context_get_default_language (GUPnPContext *context) +{ + g_return_val_if_fail (GUPNP_IS_CONTEXT (context), NULL); + + return context->priv->default_language; +} + /* Construct a local path from @requested path, removing the last slash * if any to make sure we append the locale suffix in a canonical way. */ static char * @@ -646,12 +825,12 @@ redirect_to_folder (SoupMessage *msg) /* Serve @path. Note that we do not need to check for path including bogus * '..' as libsoup does this for us. */ static void -host_path_handler (SoupServer *server, - SoupMessage *msg, - const char *path, - GHashTable *query, - SoupClientContext *client, - gpointer user_data) +host_path_handler (G_GNUC_UNUSED SoupServer *server, + SoupMessage *msg, + const char *path, + G_GNUC_UNUSED GHashTable *query, + G_GNUC_UNUSED SoupClientContext *client, + gpointer user_data) { char *local_path, *path_to_open; struct stat st; @@ -754,58 +933,67 @@ host_path_handler (SoupServer *server, status = SOUP_STATUS_OK; if (msg->method == SOUP_METHOD_GET) { - gsize offset, length; gboolean have_range; SoupBuffer *buffer; + SoupRange *ranges; + int nranges; /* Find out range */ have_range = FALSE; - offset = 0; - length = st.st_size; + if (soup_message_headers_get_ranges (msg->request_headers, + st.st_size, + &ranges, + &nranges)) + have_range = TRUE; - if (!http_request_get_range (msg, - &have_range, - &offset, - &length)) { - soup_message_set_status - (msg, - SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE); - - goto DONE; - } - - if (have_range && (length > st.st_size - offset || + /* We do not support mulipart/byteranges so only first first */ + /* range from request is handled */ + if (have_range && (ranges[0].end > st.st_size || st.st_size < 0 || - (off_t) offset >= st.st_size)) { + ranges[0].start >= st.st_size || + ranges[0].start > ranges[0].end)) { soup_message_set_status (msg, SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE); + soup_message_headers_free_ranges (msg->request_headers, + ranges); goto DONE; } /* Add requested content */ buffer = soup_buffer_new_with_owner - (g_mapped_file_get_contents (mapped_file) + offset, - length, + (g_mapped_file_get_contents (mapped_file), + g_mapped_file_get_length (mapped_file), mapped_file, (GDestroyNotify) g_mapped_file_unref); - soup_message_body_append_buffer (msg->response_body, buffer); - - soup_buffer_free (buffer); - - /* Set status */ + /* Set range and status */ if (have_range) { - http_response_set_content_range (msg, - offset, - offset + length, - st.st_size); - + SoupBuffer *range_buffer; + + soup_message_body_truncate (msg->response_body); + soup_message_headers_set_content_range ( + msg->response_headers, + ranges[0].start, + ranges[0].end, + buffer->length); + range_buffer = soup_buffer_new_subbuffer ( + buffer, + ranges[0].start, + ranges[0].end - ranges[0].start + 1); + soup_message_body_append_buffer (msg->response_body, + range_buffer); status = SOUP_STATUS_PARTIAL_CONTENT; - } + soup_message_headers_free_ranges (msg->request_headers, + ranges); + soup_buffer_free (range_buffer); + } else + soup_message_body_append_buffer (msg->response_body, buffer); + + soup_buffer_free (buffer); } else if (msg->method == SOUP_METHOD_HEAD) { char *length; @@ -831,7 +1019,13 @@ host_path_handler (SoupServer *server, /* Set Content-Language */ if (locales) - http_response_set_content_locale (msg, locales->data); + http_response_set_content_locale (msg, locales->data); + else if (soup_message_headers_get_one (msg->request_headers, + "Accept-Language")) { + soup_message_headers_append (msg->response_headers, + "Content-Language", + host_path_data->default_language); + } /* Set Accept-Ranges */ soup_message_headers_append (msg->response_headers, @@ -877,7 +1071,8 @@ user_agent_free (UserAgent *agent) static HostPathData * host_path_data_new (const char *local_path, - const char *server_path) + const char *server_path, + const char *default_language) { HostPathData *path_data; @@ -885,6 +1080,7 @@ host_path_data_new (const char *local_path, path_data->local_path = g_strdup (local_path); path_data->server_path = g_strdup (server_path); + path_data->default_language = g_strdup (default_language); return path_data; } @@ -894,6 +1090,8 @@ host_path_data_free (HostPathData *path_data) { g_free (path_data->local_path); g_free (path_data->server_path); + g_free (path_data->default_language); + while (path_data->user_agents) { UserAgent *agent; @@ -934,7 +1132,8 @@ gupnp_context_host_path (GUPnPContext *context, server = gupnp_context_get_server (context); path_data = host_path_data_new (local_path, - server_path); + server_path, + context->priv->default_language); soup_server_add_handler (server, server_path, @@ -951,6 +1150,7 @@ static unsigned int path_compare_func (HostPathData *path_data, const char *server_path) { + /* ignore default language */ return strcmp (path_data->server_path, server_path); } diff --git a/libgupnp/gupnp-context.h b/libgupnp/gupnp-context.h index 2f10701..a2e2f9e 100644 --- a/libgupnp/gupnp-context.h +++ b/libgupnp/gupnp-context.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_CONTEXT_H__ @@ -53,6 +53,8 @@ gupnp_context_get_type (void) G_GNUC_CONST; GUPnPContextClass)) typedef struct _GUPnPContextPrivate GUPnPContextPrivate; +typedef struct _GUPnPContext GUPnPContext; +typedef struct _GUPnPContextClass GUPnPContextClass; /** * GUPnPContext: @@ -60,13 +62,13 @@ typedef struct _GUPnPContextPrivate GUPnPContextPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPContext { GSSDPClient parent; GUPnPContextPrivate *priv; -} GUPnPContext; +}; -typedef struct { +struct _GUPnPContextClass { GSSDPClientClass parent_class; /* future padding */ @@ -74,11 +76,11 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPContextClass; +}; GUPnPContext * gupnp_context_new (GMainContext *main_context, - const char *interface, + const char *iface, guint port, GError **error); @@ -106,6 +108,13 @@ guint gupnp_context_get_subscription_timeout (GUPnPContext *context); void +gupnp_context_set_default_language (GUPnPContext *context, + const char *language); + +const char * +gupnp_context_get_default_language (GUPnPContext *context); + +void gupnp_context_host_path (GUPnPContext *context, const char *local_path, const char *server_path); diff --git a/libgupnp/gupnp-control-point.c b/libgupnp/gupnp-control-point.c index a281bf7..fe0c7b8 100644 --- a/libgupnp/gupnp-control-point.c +++ b/libgupnp/gupnp-control-point.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -109,9 +109,9 @@ gupnp_control_point_init (GUPnPControlPoint *control_point) /* Return TRUE if value == user_data */ static gboolean -find_doc (gpointer key, - gpointer value, - gpointer user_data) +find_doc (G_GNUC_UNUSED gpointer key, + gpointer value, + G_GNUC_UNUSED gpointer user_data) { return (value == user_data); } @@ -132,9 +132,9 @@ doc_finalized (gpointer user_data, /* Release weak reference on xmlDoc wrapper */ static void -weak_unref_doc (gpointer key, - gpointer value, - gpointer user_data) +weak_unref_doc (G_GNUC_UNUSED gpointer key, + gpointer value, + gpointer user_data) { g_object_weak_unref (G_OBJECT (value), doc_finalized, user_data); } @@ -213,7 +213,7 @@ find_service_node (GUPnPControlPoint *control_point, info = GUPNP_SERVICE_INFO (l->data); - if ((strcmp (gupnp_service_info_get_udn (info), udn) == 0) || + if ((strcmp (gupnp_service_info_get_udn (info), udn) == 0) && (strcmp (gupnp_service_info_get_service_type (info), service_type) == 0)) break; @@ -323,6 +323,44 @@ create_and_report_device_proxy (GUPnPControlPoint *control_point, proxy); } +static gboolean +compare_service_types_versioned (const char *searched_service, + const char *current_service) +{ + const char *searched_version_ptr, *current_version_ptr; + guint searched_version, current_version, searched_length; + guint current_length; + + searched_version_ptr = strrchr (searched_service, ':'); + if (searched_version_ptr == NULL) + return FALSE; + + current_version_ptr = strrchr (current_service, ':'); + if (current_version_ptr == NULL) + return FALSE; + + searched_length = (searched_version_ptr - searched_service); + current_length = (current_version_ptr - current_service); + + if (searched_length != current_length) + return FALSE; + + searched_version = (guint) atol (searched_version_ptr + 1); + if (searched_version == 0) + return FALSE; + + current_version = (guint) atol (current_version_ptr + 1); + if (current_version == 0) + return FALSE; + + if (current_version < searched_version) + return FALSE; + + return strncmp (searched_service, + current_service, + searched_length) == 0; +} + /* Search @element for matching services */ static void process_service_list (xmlNode *element, @@ -348,8 +386,8 @@ process_service_list (xmlNode *element, if (!prop) continue; - match = (strcmp ((char *) prop, service_type) == 0); - + match = compare_service_types_versioned (service_type, + (char *) prop); xmlFree (prop); if (!match) @@ -471,9 +509,6 @@ description_loaded (GUPnPControlPoint *control_point, return; } - if (element == NULL) - return; - url_base = xml_util_get_child_element_content_uri (element, "URLBase", NULL); @@ -497,9 +532,9 @@ description_loaded (GUPnPControlPoint *control_point, * Description URL downloaded. */ static void -got_description_url (SoupSession *session, - SoupMessage *msg, - GetDescriptionURLData *data) +got_description_url (G_GNUC_UNUSED SoupSession *session, + SoupMessage *msg, + GetDescriptionURLData *data) { GUPnPXMLDoc *doc; @@ -749,7 +784,6 @@ gupnp_control_point_resource_unavailable { GUPnPControlPoint *control_point; char *udn, *service_type; - GList *l, *cur_l; control_point = GUPNP_CONTROL_POINT (resource_browser); @@ -759,7 +793,7 @@ gupnp_control_point_resource_unavailable /* Find proxy */ if (service_type) { - l = find_service_node (control_point, udn, service_type); + GList *l = find_service_node (control_point, udn, service_type); if (l) { GUPnPServiceProxy *proxy; @@ -767,12 +801,9 @@ gupnp_control_point_resource_unavailable /* Remove proxy */ proxy = GUPNP_SERVICE_PROXY (l->data); - cur_l = l; - l = l->next; - control_point->priv->services = g_list_delete_link - (control_point->priv->services, cur_l); + (control_point->priv->services, l); g_signal_emit (control_point, signals[SERVICE_PROXY_UNAVAILABLE], @@ -782,7 +813,7 @@ gupnp_control_point_resource_unavailable g_object_unref (proxy); } } else { - l = find_device_node (control_point, udn); + GList *l = find_device_node (control_point, udn); if (l) { GUPnPDeviceProxy *proxy; @@ -790,12 +821,9 @@ gupnp_control_point_resource_unavailable /* Remove proxy */ proxy = GUPNP_DEVICE_PROXY (l->data); - cur_l = l; - l = l->next; - control_point->priv->devices = g_list_delete_link - (control_point->priv->devices, cur_l); + (control_point->priv->devices, l); g_signal_emit (control_point, signals[DEVICE_PROXY_UNAVAILABLE], @@ -1041,7 +1069,7 @@ gupnp_control_point_new_full (GUPnPContext *context, * * Get the #GUPnPControlPoint associated with @control_point. * - * Return value: The #GUPnPContext. + * Returns: (transfer none): The #GUPnPContext. **/ GUPnPContext * gupnp_control_point_get_context (GUPnPControlPoint *control_point) @@ -1081,7 +1109,7 @@ gupnp_control_point_list_device_proxies (GUPnPControlPoint *control_point) * Get the #GList of discovered #GUPnPServiceProxy objects. Do not free the * list nor its elements. * - * Return value: (element-type: GUPnP.ServiceProxy) (transfer none): a #GList + * Return value: (element-type GUPnP.ServiceProxy) (transfer none): a #GList * of #GUPnPServiceProxy objects. **/ const GList * @@ -1098,7 +1126,7 @@ gupnp_control_point_list_service_proxies (GUPnPControlPoint *control_point) * * Get the #GUPnPResourceFactory used by the @control_point. * - * Return value: A #GUPnPResourceFactory. + * Returns: (transfer none): A #GUPnPResourceFactory. **/ GUPnPResourceFactory * gupnp_control_point_get_resource_factory (GUPnPControlPoint *control_point) diff --git a/libgupnp/gupnp-control-point.h b/libgupnp/gupnp-control-point.h index 3057827..2cb3911 100644 --- a/libgupnp/gupnp-control-point.h +++ b/libgupnp/gupnp-control-point.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_CONTROL_POINT_H__ @@ -56,6 +56,8 @@ gupnp_control_point_get_type (void) G_GNUC_CONST; GUPnPControlPointClass)) typedef struct _GUPnPControlPointPrivate GUPnPControlPointPrivate; +typedef struct _GUPnPControlPoint GUPnPControlPoint; +typedef struct _GUPnPControlPointClass GUPnPControlPointClass; /** * GUPnPControlPoint: @@ -63,13 +65,13 @@ typedef struct _GUPnPControlPointPrivate GUPnPControlPointPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPControlPoint { GSSDPResourceBrowser parent; GUPnPControlPointPrivate *priv; -} GUPnPControlPoint; +}; -typedef struct { +struct _GUPnPControlPointClass { GSSDPResourceBrowserClass parent_class; /* signals */ @@ -89,7 +91,7 @@ typedef struct { void (* _gupnp_reserved1) (void); void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); -} GUPnPControlPointClass; +}; GUPnPControlPoint * gupnp_control_point_new (GUPnPContext *context, diff --git a/libgupnp/gupnp-device-info-private.h b/libgupnp/gupnp-device-info-private.h index 5dabe32..e71005a 100644 --- a/libgupnp/gupnp-device-info-private.h +++ b/libgupnp/gupnp-device-info-private.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_DEVICE_INFO_PRIVATE_H__ diff --git a/libgupnp/gupnp-device-info.c b/libgupnp/gupnp-device-info.c index 0a4fb6e..9ef38fd 100644 --- a/libgupnp/gupnp-device-info.c +++ b/libgupnp/gupnp-device-info.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -85,7 +85,7 @@ gupnp_device_info_set_property (GObject *object, switch (property_id) { case PROP_RESOURCE_FACTORY: - info->priv->factory = + info->priv->factory = GUPNP_RESOURCE_FACTORY (g_value_dup_object (value)); break; case PROP_CONTEXT: @@ -101,11 +101,7 @@ gupnp_device_info_set_property (GObject *object, info->priv->device_type = g_value_dup_string (value); break; case PROP_URL_BASE: - info->priv->url_base = g_value_get_pointer (value); - if (info->priv->url_base) - info->priv->url_base = - soup_uri_copy (info->priv->url_base); - + info->priv->url_base = g_value_dup_boxed (value); break; case PROP_DOCUMENT: info->priv->doc = g_value_dup_object (value); @@ -151,8 +147,7 @@ gupnp_device_info_get_property (GObject *object, gupnp_device_info_get_device_type (info)); break; case PROP_URL_BASE: - g_value_set_pointer (value, - info->priv->url_base); + g_value_set_boxed (value, info->priv->url_base); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -314,14 +309,15 @@ gupnp_device_info_class_init (GUPnPDeviceInfoClass *klass) g_object_class_install_property (object_class, PROP_URL_BASE, - g_param_spec_pointer ("url-base", - "URL base", - "The URL base", - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | - G_PARAM_STATIC_BLURB)); + g_param_spec_boxed ("url-base", + "URL base", + "The URL base", + SOUP_TYPE_URI, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); /** * GUPnPDeviceInfo:document: @@ -371,7 +367,7 @@ gupnp_device_info_class_init (GUPnPDeviceInfoClass *klass) * * Get the #GUPnPResourceFactory used by the @device_info. * - * Returns: A #GUPnPResourceFactory. + * Returns: (transfer none): A #GUPnPResourceFactory. **/ GUPnPResourceFactory * gupnp_device_info_get_resource_factory (GUPnPDeviceInfo *info) @@ -387,7 +383,7 @@ gupnp_device_info_get_resource_factory (GUPnPDeviceInfo *info) * * Get the associated #GUPnPContext. * - * Returns: A #GUPnPContext. + * Returns: (transfer none): A #GUPnPContext. **/ GUPnPContext * gupnp_device_info_get_context (GUPnPDeviceInfo *info) @@ -478,7 +474,7 @@ gupnp_device_info_get_device_type (GUPnPDeviceInfo *info) * @info: A #GUPnPDeviceInfo * * Get the friendly name of the device. - * + * * Return value: A string, or %NULL. g_free() after use. **/ char * @@ -581,7 +577,7 @@ gupnp_device_info_get_model_number (GUPnPDeviceInfo *info) * @info: A #GUPnPDeviceInfo * * Get a URL pointing to the device model's website. - * + * * Return value: A string, or %NULL. g_free() after use. **/ char * @@ -599,7 +595,7 @@ gupnp_device_info_get_model_url (GUPnPDeviceInfo *info) * @info: A #GUPnPDeviceInfo * * Get the serial number of the device. - * + * * Return value: A string, or %NULL. g_free() after use. **/ char * @@ -634,7 +630,7 @@ gupnp_device_info_get_upc (GUPnPDeviceInfo *info) * * Get a URL pointing to the device's presentation page, for web-based * administration. - * + * * Return value: A string, or %NULL. g_free() after use. **/ char * @@ -658,7 +654,7 @@ typedef struct { } Icon; static Icon * -icon_parse (GUPnPDeviceInfo *info, xmlNode *element) +icon_parse (G_GNUC_UNUSED GUPnPDeviceInfo *info, xmlNode *element) { Icon *icon; @@ -755,9 +751,12 @@ gupnp_device_info_get_icon_url (GUPnPDeviceInfo *info, icon = icon_parse (info, element); if (requested_mime_type) { - mime_type_ok = - !strcmp (requested_mime_type, - (char *) icon->mime_type); + if (icon->mime_type) + mime_type_ok = !strcmp ( + requested_mime_type, + (char *) icon->mime_type); + else + mime_type_ok = FALSE; } else mime_type_ok = TRUE; @@ -873,7 +872,7 @@ gupnp_device_info_get_icon_url (GUPnPDeviceInfo *info, return ret; } -/* Returns TRUE if @query matches against @base. +/* Returns TRUE if @query matches against @base. * - If @query does not specify a version, it matches any version specified * in @base. * - If @query specifies a version, it matches any version specified in @base @@ -930,13 +929,46 @@ resource_type_match (const char *query, } /** + * gupnp_device_info_list_dlna_device_class_identifier: + * @info: A #GUPnPDeviceInfo + * + * Get a #GList of strings that represent the device class and version as + * announced in the device description file using the <dlna:X_DLNADOC> + * element. + * Returns: (transfer full) (element-type utf8): a #GList of newly allocated strings or + * %NULL if the device description doesn't contain the <dlna:X_DLNADOC> + * element. + **/ +GList * +gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info) +{ + xmlNode *element; + GList *list = NULL; + + g_return_val_if_fail (GUPNP_IS_DEVICE_INFO (info), NULL); + + element = info->priv->element; + + for (element = element->children; element; element = element->next) { + /* No early exit since the node explicitly may appear multiple + * times: 7.2.10.3 */ + if (!strcmp ("X_DLNADOC", (char *) element->name)) + list = g_list_prepend (list, + xmlNodeGetContent(element)); + } + + /* Return in order of appearance in document */ + return g_list_reverse (list); +} + +/** * gupnp_device_info_list_dlna_capabilities: * @info: A #GUPnPDeviceInfo * - * Get a #GList of strings that represent the device capabilities as announced + * Get a #GList of strings that represent the device capabilities as announced * in the device description file using the <dlna:X_DLNACAP> element. * - * Return value: (element-type utf8): a #GList of newly allocated strings or + * Returns: (transfer full) (element-type utf8): a #GList of newly allocated strings or * %NULL if the device description doesn't contain the <dlna:X_DLNACAP> * element. **/ @@ -1109,7 +1141,7 @@ gupnp_device_info_list_device_types (GUPnPDeviceInfo *info) * this function a new object is created. The application must cache any used * devices if it wishes to keep them around and re-use them. * - * Return value: A new #GUPnPDeviceInfo. + * Returns: (transfer full)(allow-none): A new #GUPnPDeviceInfo. **/ GUPnPDeviceInfo * gupnp_device_info_get_device (GUPnPDeviceInfo *info, @@ -1120,6 +1152,7 @@ gupnp_device_info_get_device (GUPnPDeviceInfo *info, xmlNode *element; g_return_val_if_fail (GUPNP_IS_DEVICE_INFO (info), NULL); + g_return_val_if_fail (type != NULL, NULL); class = GUPNP_DEVICE_INFO_GET_CLASS (info); @@ -1263,7 +1296,7 @@ gupnp_device_info_list_service_types (GUPnPDeviceInfo *info) * this function a new object is created. The application must cache any used * services if it wishes to keep them around and re-use them. * - * Return value: A #GUPnPServiceInfo. + * Returns: (transfer full): A #GUPnPServiceInfo. **/ GUPnPServiceInfo * gupnp_device_info_get_service (GUPnPDeviceInfo *info, @@ -1274,6 +1307,7 @@ gupnp_device_info_get_service (GUPnPDeviceInfo *info, xmlNode *element; g_return_val_if_fail (GUPNP_IS_DEVICE_INFO (info), NULL); + g_return_val_if_fail (type != NULL, NULL); class = GUPNP_DEVICE_INFO_GET_CLASS (info); diff --git a/libgupnp/gupnp-device-info.h b/libgupnp/gupnp-device-info.h index df7aa80..0a65184 100644 --- a/libgupnp/gupnp-device-info.h +++ b/libgupnp/gupnp-device-info.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_DEVICE_INFO_H__ @@ -57,6 +57,8 @@ gupnp_device_info_get_type (void) G_GNUC_CONST; GUPnPDeviceInfoClass)) typedef struct _GUPnPDeviceInfoPrivate GUPnPDeviceInfoPrivate; +typedef struct _GUPnPDeviceInfo GUPnPDeviceInfo; +typedef struct _GUPnPDeviceInfoClass GUPnPDeviceInfoClass; /** * GUPnPDeviceInfo: @@ -64,28 +66,32 @@ typedef struct _GUPnPDeviceInfoPrivate GUPnPDeviceInfoPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPDeviceInfo { GObject parent; GUPnPDeviceInfoPrivate *priv; -} GUPnPDeviceInfo; +}; -typedef struct { +struct _GUPnPDeviceInfoClass { GObjectClass parent_class; /* vtable */ xmlNode * (* get_element) (GUPnPDeviceInfo *info); + + /* FIXME: Once we can break API/ABI, clean-up and rename the + * _get_device/_get_service functions */ +#ifndef GOBJECT_INTROSPECTION_SKIP GUPnPDeviceInfo * (* get_device) (GUPnPDeviceInfo *info, xmlNode *element); GUPnPServiceInfo * (* get_service) (GUPnPDeviceInfo *info, xmlNode *element); - +#endif /* future padding */ void (* _gupnp_reserved1) (void); void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPDeviceInfoClass; +}; GUPnPContext * @@ -146,6 +152,9 @@ char * gupnp_device_info_get_presentation_url (GUPnPDeviceInfo *info); GList * +gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info); + +GList * gupnp_device_info_list_dlna_capabilities (GUPnPDeviceInfo *info); char * diff --git a/libgupnp/gupnp-device-proxy.c b/libgupnp/gupnp-device-proxy.c index 85776c1..14885c9 100644 --- a/libgupnp/gupnp-device-proxy.c +++ b/libgupnp/gupnp-device-proxy.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -97,7 +97,7 @@ gupnp_device_proxy_get_service (GUPnPDeviceInfo *info, } static void -gupnp_device_proxy_init (GUPnPDeviceProxy *proxy) +gupnp_device_proxy_init (G_GNUC_UNUSED GUPnPDeviceProxy *proxy) { } diff --git a/libgupnp/gupnp-device-proxy.h b/libgupnp/gupnp-device-proxy.h index 5e19f19..5b96567 100644 --- a/libgupnp/gupnp-device-proxy.h +++ b/libgupnp/gupnp-device-proxy.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_DEVICE_PROXY_H__ @@ -51,6 +51,8 @@ gupnp_device_proxy_get_type (void) G_GNUC_CONST; GUPnPDeviceProxyClass)) typedef struct _GUPnPDeviceProxyPrivate GUPnPDeviceProxyPrivate; +typedef struct _GUPnPDeviceProxy GUPnPDeviceProxy; +typedef struct _GUPnPDeviceProxyClass GUPnPDeviceProxyClass; /** * GUPnPDeviceProxy: @@ -58,13 +60,13 @@ typedef struct _GUPnPDeviceProxyPrivate GUPnPDeviceProxyPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPDeviceProxy { GUPnPDeviceInfo parent; GUPnPDeviceProxyPrivate *priv; -} GUPnPDeviceProxy; +}; -typedef struct { +struct _GUPnPDeviceProxyClass { GUPnPDeviceInfoClass parent_class; /* future padding */ @@ -72,7 +74,7 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPDeviceProxyClass; +}; G_END_DECLS diff --git a/libgupnp/gupnp-device.c b/libgupnp/gupnp-device.c index e8b0c93..2497029 100644 --- a/libgupnp/gupnp-device.c +++ b/libgupnp/gupnp-device.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** diff --git a/libgupnp/gupnp-device.h b/libgupnp/gupnp-device.h index 463e0cd..106b164 100644 --- a/libgupnp/gupnp-device.h +++ b/libgupnp/gupnp-device.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_DEVICE_H__ @@ -51,6 +51,8 @@ gupnp_device_get_type (void) G_GNUC_CONST; GUPnPDeviceClass)) typedef struct _GUPnPDevicePrivate GUPnPDevicePrivate; +typedef struct _GUPnPDevice GUPnPDevice; +typedef struct _GUPnPDeviceClass GUPnPDeviceClass; /** * GUPnPDevice: @@ -58,13 +60,13 @@ typedef struct _GUPnPDevicePrivate GUPnPDevicePrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPDevice { GUPnPDeviceInfo parent; GUPnPDevicePrivate *priv; -} GUPnPDevice; +}; -typedef struct { +struct _GUPnPDeviceClass { GUPnPDeviceInfoClass parent_class; /* future padding */ @@ -72,7 +74,7 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPDeviceClass; +}; G_END_DECLS diff --git a/libgupnp/gupnp-error-private.h b/libgupnp/gupnp-error-private.h index f9b4798..7ab1e7d 100644 --- a/libgupnp/gupnp-error-private.h +++ b/libgupnp/gupnp-error-private.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_ERROR_PRIVATE_H__ diff --git a/libgupnp/gupnp-error.c b/libgupnp/gupnp-error.c index 426022a..6a483f4 100644 --- a/libgupnp/gupnp-error.c +++ b/libgupnp/gupnp-error.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "gupnp-error.h" diff --git a/libgupnp/gupnp-error.h b/libgupnp/gupnp-error.h index cfde0d3..a850857 100644 --- a/libgupnp/gupnp-error.h +++ b/libgupnp/gupnp-error.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_ERROR_H__ @@ -104,6 +104,7 @@ gupnp_xml_error_quark (void) G_GNUC_CONST; * @GUPNP_XML_ERROR_PARSE: Generic XML parsing error. * @GUPNP_XML_ERROR_NO_NODE: A required XML node was not found. * @GUPNP_XML_ERROR_EMPTY_NODE: An XML node is unexpectedly empty. + * @GUPNP_XML_ERROR_INVALID_ATTRIBUTE: An XML node has an unknown attribute. * @GUPNP_XML_ERROR_OTHER: Unknown/unhandled XML related errors. * * #GError codes used for errors in the #GUPNP_XML_ERROR domain, during @@ -113,6 +114,7 @@ typedef enum { GUPNP_XML_ERROR_PARSE, GUPNP_XML_ERROR_NO_NODE, GUPNP_XML_ERROR_EMPTY_NODE, + GUPNP_XML_ERROR_INVALID_ATTRIBUTE, GUPNP_XML_ERROR_OTHER } GUPnPXMLError; diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c new file mode 100644 index 0000000..2257a6e --- /dev/null +++ b/libgupnp/gupnp-linux-context-manager.c @@ -0,0 +1,817 @@ +/* + * Copyright (C) 2011 Jens Georg + * + * Author: Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:gupnp-linux-context-manager + * @short_description: Linux-specific implementation of #GUPnPContextManager + * + */ + +#include + +#include +#include +#include +#include +#ifdef HAVE_LINUX_WIRELESS_H +#include +#endif +#include +#include +#include + +#include "gupnp-linux-context-manager.h" +#include "gupnp-context.h" + +G_DEFINE_TYPE (GUPnPLinuxContextManager, + gupnp_linux_context_manager, + GUPNP_TYPE_CONTEXT_MANAGER); + +struct _GUPnPLinuxContextManagerPrivate { + int fd; + int nl_seq; + GSocket *netlink_socket; + GSource *netlink_socket_source; + GSource *bootstrap_source; + + GHashTable *interfaces; +}; + +typedef enum { + /* Interface is up */ + NETWORK_INTERFACE_UP = 1 << 0, + + /* Interface doesn't support multicast or is P-t-P */ + NETWORK_INTERFACE_IGNORE = 1 << 1, + + /* Interface is down but has an address set */ + NETWORK_INTERFACE_PRECONFIGURED = 1 << 2 +} NetworkInterfaceFlags; + +/* struct representing a network interface */ +struct _NetworkInterface { + /* Weak pointer to context manager associated with this interface */ + GUPnPLinuxContextManager *manager; + + /* Name of the interface (eth0 etc.) */ + char *name; + + /* ESSID for wireless interfaces */ + char *essid; + + /* States of the interface */ + NetworkInterfaceFlags flags; + + /* UPnP contexts associated with this interface. Can be more than one + * with alias addresses like eth0:1 etc. */ + GHashTable *contexts; +}; + +typedef struct _NetworkInterface NetworkInterface; + +/* Create a new network interface struct and query the device name */ +static NetworkInterface * +network_device_new (GUPnPLinuxContextManager *manager, + int index) +{ + NetworkInterface *device; + struct ifreq ifr; + int ret; + + /* Query interface name */ + memset (&ifr, 0, sizeof (struct ifreq)); + ifr.ifr_ifindex = index; + ret = ioctl (manager->priv->fd, SIOCGIFNAME, &ifr); + + if (ret == -1) { + g_warning ("Could not get interface name for index %d", + index); + + return NULL; + } + + device = g_slice_new0 (NetworkInterface); + device->manager = manager; + device->name = g_strdup (ifr.ifr_name); + + device->contexts = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + g_object_unref); + + return device; +} + +/* Try to update the ESSID of a network interface. */ +static void +network_device_update_essid (NetworkInterface *device) +{ + char *old_essid = device->essid; +#ifdef HAVE_LINUX_WIRELESS_H + char essid[IW_ESSID_MAX_SIZE + 1]; + struct iwreq iwr; + int ret; + + /* Query essid */ + memset (&iwr, 0, sizeof (struct iwreq)); + memset (essid, 0, IW_ESSID_MAX_SIZE + 1); + strncpy (iwr.ifr_name, device->name, IFNAMSIZ); + iwr.u.essid.pointer = (caddr_t) essid; + iwr.u.essid.length = IW_ESSID_MAX_SIZE; + ret = ioctl (device->manager->priv->fd, SIOCGIWESSID, &iwr); + + if ((ret == 0 && essid[0] != '\0') && + (!device->essid || strcmp (device->essid, essid))) + device->essid = g_strdup (essid); + else + old_essid = NULL; +#endif + if (old_essid) + g_free (old_essid); +} + +static void +network_device_create_context (NetworkInterface *device, const char *label) +{ + guint port; + GError *error = NULL; + GUPnPContext *context; + + /* We cannot create a context yet. But it may be that there will not + * be a RTM_NEWADDR message for this device if the IP address does not + * change so we mark this device as preconfigured and will create the + * context if the device comes up. If the address changes, we'll get a + * RTM_DELADDR before the next RTM_NEWADDR. */ + if (!device->flags & NETWORK_INTERFACE_UP) { + device->flags |= NETWORK_INTERFACE_PRECONFIGURED; + + return; + } + + device->flags &= ~NETWORK_INTERFACE_PRECONFIGURED; + + g_object_get (device->manager, + "port", &port, + NULL); + + network_device_update_essid (device); + context = g_initable_new (GUPNP_TYPE_CONTEXT, + NULL, + &error, + "interface", label, + "network", device->essid, + "port", port, + NULL); + + if (error) { + g_warning ("Error creating GUPnP context: %s", + error->message); + g_error_free (error); + + return; + } + g_hash_table_insert (device->contexts, g_strdup (label), context); + + g_signal_emit_by_name (device->manager, + "context-available", + context); +} + +static void +context_signal_up (G_GNUC_UNUSED gpointer key, + gpointer value, + gpointer user_data) +{ + g_signal_emit_by_name (user_data, "context-available", value); +} + +static void +context_signal_down (G_GNUC_UNUSED gpointer key, + gpointer value, + gpointer user_data) +{ + g_signal_emit_by_name (user_data, "context-unavailable", value); +} + +static void +network_device_up (NetworkInterface *device) +{ + if (device->flags & NETWORK_INTERFACE_UP) + return; + + device->flags |= NETWORK_INTERFACE_UP; + + if (g_hash_table_size (device->contexts) > 0) + g_hash_table_foreach (device->contexts, + context_signal_up, + device->manager); + else if (device->flags & NETWORK_INTERFACE_PRECONFIGURED) + network_device_create_context (device, device->name); +} + +static void +network_device_down (NetworkInterface *device) +{ + if (!device->flags & NETWORK_INTERFACE_UP) + return; + + device->flags &= ~NETWORK_INTERFACE_UP; + + if (device->contexts) + g_hash_table_foreach (device->contexts, + context_signal_down, + device->manager); +} + +static void +network_device_free (NetworkInterface *device) +{ + if (device->name != NULL) + g_free (device->name); + if (device->essid != NULL) + g_free (device->essid); + + if (device->contexts != NULL) { + GHashTableIter iter; + char *key; + GUPnPContext *value; + + g_hash_table_iter_init (&iter, device->contexts); + while (g_hash_table_iter_next (&iter, + (gpointer *) &key, + (gpointer *) &value)) { + g_signal_emit_by_name (device->manager, + "context-unavailable", + value); + g_hash_table_iter_remove (&iter); + } + } + + g_hash_table_unref (device->contexts); + device->contexts = NULL; +} + + +static void query_all_network_interfaces (GUPnPLinuxContextManager *self); +static void query_all_addresses (GUPnPLinuxContextManager *self); +static void receive_netlink_message (GUPnPLinuxContextManager *self, + GError **error); +static void create_context (GUPnPLinuxContextManager *self, + const char *label, + struct ifaddrmsg *ifa); +static void remove_context (GUPnPLinuxContextManager *self, + const char *label, + struct ifaddrmsg *ifa); + +static gboolean +on_netlink_message_available (G_GNUC_UNUSED GSocket *socket, + G_GNUC_UNUSED GIOCondition condition, + gpointer user_data) +{ + GUPnPLinuxContextManager *self; + + self = GUPNP_LINUX_CONTEXT_MANAGER (user_data); + + receive_netlink_message (self, NULL); + + return TRUE; +} + +#define RT_ATTR_OK(a,l) \ + ((l > 0) && RTA_OK (a, l)) + +static void +extract_info (struct nlmsghdr *header, char **label) +{ + int rt_attr_len; + struct rtattr *rt_attr; + + rt_attr = IFLA_RTA (NLMSG_DATA (header)); + rt_attr_len = IFLA_PAYLOAD (header); + while (RT_ATTR_OK (rt_attr, rt_attr_len)) { + if (rt_attr->rta_type == IFA_LABEL) { + *label = g_strdup ((char *) RTA_DATA (rt_attr)); + break; + } + rt_attr = RTA_NEXT (rt_attr, rt_attr_len); + } +} + +static gboolean +is_wireless_status_message (struct nlmsghdr *header) +{ + int rt_attr_len; + struct rtattr *rt_attr; + + rt_attr = IFLA_RTA (NLMSG_DATA (header)); + rt_attr_len = IFLA_PAYLOAD (header); + while (RT_ATTR_OK (rt_attr, rt_attr_len)) { + if (rt_attr->rta_type == IFLA_WIRELESS) + return TRUE; + + rt_attr = RTA_NEXT (rt_attr, rt_attr_len); + } + + return FALSE; +} + +static void +create_context (GUPnPLinuxContextManager *self, + const char *label, + struct ifaddrmsg *ifa) +{ + NetworkInterface *device; + + remove_context (self, label, ifa); + + device = g_hash_table_lookup (self->priv->interfaces, + GINT_TO_POINTER (ifa->ifa_index)); + + if (!device) { + g_warning ("Got new address for device %d but device is" + " not active", + ifa->ifa_index); + + return; + } + + /* If device isn't one we consider, silently skip address */ + if (device->flags & NETWORK_INTERFACE_IGNORE) { + return; + } + + network_device_create_context (device, label); +} + +static void +remove_context (GUPnPLinuxContextManager *self, + const char *label, + struct ifaddrmsg *ifa) +{ + NetworkInterface *device; + GUPnPContext *context; + + device = g_hash_table_lookup (self->priv->interfaces, + GINT_TO_POINTER (ifa->ifa_index)); + + if (!device) + return; + + context = g_hash_table_lookup (device->contexts, label); + if (context) { + if (device->flags & NETWORK_INTERFACE_UP) { + g_signal_emit_by_name (self, + "context-unavailable", + context); + } + g_hash_table_remove (device->contexts, label); + } + + if (g_hash_table_size (device->contexts) == 0) + device->flags &= ~NETWORK_INTERFACE_PRECONFIGURED; +} + +/* Idle-handler for initial interface and address bootstrapping. + * + * We cannot send the RTM_GETADDR message until we processed all packets of + * the RTM_GETLINK message. So on the first call this idle handler processes + * all answers of RTM_GETLINK on the second call all answers of RTM_GETADDR + * and on the third call it creates the regular socket source for listening on + * the netlink socket, detaching itself from the idle source afterwards. + */ +static gboolean +on_bootstrap (GUPnPLinuxContextManager *self) +{ + if (self->priv->nl_seq == 0) { + query_all_network_interfaces (self); + + return TRUE; + } else if (self->priv->nl_seq == 1) { + query_all_addresses (self); + + return TRUE; + } else { + self->priv->netlink_socket_source = g_socket_create_source + (self->priv->netlink_socket, + G_IO_IN | G_IO_PRI, + NULL); + + g_source_attach (self->priv->netlink_socket_source, + g_main_context_get_thread_default ()); + + g_source_set_callback (self->priv->netlink_socket_source, + (GSourceFunc) + on_netlink_message_available, + self, + NULL); + } + + return FALSE; +} + +struct nl_req_s { + struct nlmsghdr hdr; + struct rtgenmsg gen; +}; + +static void +send_netlink_request (GUPnPLinuxContextManager *self, + guint netlink_message, + guint flags) +{ + struct nl_req_s req; + struct sockaddr_nl dest; + struct msghdr msg; + struct iovec io; + int fd; + + memset (&req, 0, sizeof (req)); + memset (&dest, 0, sizeof (dest)); + memset (&msg, 0, sizeof (msg)); + + dest.nl_family = AF_NETLINK; + req.hdr.nlmsg_len = NLMSG_LENGTH (sizeof (struct rtgenmsg)); + req.hdr.nlmsg_seq = self->priv->nl_seq++; + req.hdr.nlmsg_type = netlink_message; + req.hdr.nlmsg_flags = NLM_F_REQUEST | flags; + req.gen.rtgen_family = AF_INET; + + io.iov_base = &req; + io.iov_len = req.hdr.nlmsg_len; + + msg.msg_iov = &io; + msg.msg_iovlen = 1; + msg.msg_name = &dest; + msg.msg_namelen = sizeof (dest); + + fd = g_socket_get_fd (self->priv->netlink_socket); + if (sendmsg (fd, (struct msghdr *) &msg, 0) < 0) + g_warning ("Could not send netlink message: %s", + strerror (errno)); +} + +static void +query_all_network_interfaces (GUPnPLinuxContextManager *self) +{ + GError *error = NULL; + + send_netlink_request (self, RTM_GETLINK, NLM_F_DUMP); + do { + receive_netlink_message (self, &error); + } while (error == NULL); + + g_error_free (error); +} + +static void +query_all_addresses (GUPnPLinuxContextManager *self) +{ + send_netlink_request (self, + RTM_GETADDR, + NLM_F_ROOT | NLM_F_MATCH | NLM_F_ACK); +} + +/* Ignore non-multicast device, except loop-back and P-t-P devices */ +#define INTERFACE_IS_VALID(ifi) \ + (((ifi)->ifi_flags & (IFF_MULTICAST | IFF_LOOPBACK)) && \ + !((ifi)->ifi_flags & IFF_POINTOPOINT)) + +static void +handle_device_status_change (GUPnPLinuxContextManager *self, + struct ifinfomsg *ifi) +{ + gpointer key; + NetworkInterface *device; + + key = GINT_TO_POINTER (ifi->ifi_index); + device = g_hash_table_lookup (self->priv->interfaces, + key); + + if (device != NULL) { + if (ifi->ifi_flags & IFF_UP) + network_device_up (device); + else + network_device_down (device); + + return; + } + + device = network_device_new (self, ifi->ifi_index); + if (device) { + if (!INTERFACE_IS_VALID (ifi)) + device->flags |= NETWORK_INTERFACE_IGNORE; + if (ifi->ifi_flags & IFF_UP) + device->flags |= NETWORK_INTERFACE_UP; + + g_hash_table_insert (self->priv->interfaces, + key, + device); + } +} + +static void +remove_device (GUPnPLinuxContextManager *self, + struct ifinfomsg *ifi) +{ + g_hash_table_remove (self->priv->interfaces, + GINT_TO_POINTER (ifi->ifi_index)); +} + +#define NLMSG_IS_VALID(msg,len) \ + (NLMSG_OK(msg,len) && (msg->nlmsg_type != NLMSG_DONE)) + +static void +receive_netlink_message (GUPnPLinuxContextManager *self, GError **error) +{ + static char buf[4096]; + static const int bufsize = 4096; + + gssize len; + GError *inner_error = NULL; + struct nlmsghdr *header = (struct nlmsghdr *) buf; + struct ifinfomsg *ifi; + struct ifaddrmsg *ifa; + + + len = g_socket_receive (self->priv->netlink_socket, + buf, + bufsize, + NULL, + &inner_error); + if (len == -1) { + if (inner_error->code != G_IO_ERROR_WOULD_BLOCK) + g_warning ("Error receiving netlink message: %s", + inner_error->message); + g_propagate_error (error, inner_error); + + return; + } + + for (;NLMSG_IS_VALID (header, len); header = NLMSG_NEXT (header,len)) { + switch (header->nlmsg_type) { + /* RTM_NEWADDR and RTM_DELADDR are sent on real address + * changes. + * RTM_NEWLINK is sent on varous occations: + * - Creation of a new device + * - Device goes up/down + * - Wireless status changes + * RTM_DELLINK is sent only if device is removed, like + * openvpn --rmtun /dev/tun0, NOT on ifconfig down. */ + case RTM_NEWADDR: + { + char *label = NULL; + + ifa = NLMSG_DATA (header); + extract_info (header, &label); + create_context (self, label, ifa); + g_free (label); + } + break; + case RTM_DELADDR: + { + char *label = NULL; + + ifa = NLMSG_DATA (header); + extract_info (header, &label); + remove_context (self, label, ifa); + g_free (label); + } + break; + case RTM_NEWLINK: + ifi = NLMSG_DATA (header); + + /* Check if wireless is up for chit-chat */ + if (is_wireless_status_message (header)) + continue; + handle_device_status_change (self, ifi); + break; + case RTM_DELLINK: + ifi = NLMSG_DATA (header); + remove_device (self, ifi); + break; + case NLMSG_ERROR: + break; + default: + break; + } + } +} + +/* Create INET socket used for SIOCGIFNAME and SIOCGIWESSID ioctl + * calls */ +static gboolean +create_ioctl_socket (GUPnPLinuxContextManager *self, GError **error) +{ + self->priv->fd = socket (AF_INET, SOCK_DGRAM, 0); + + if (self->priv->fd < 0) { + self->priv->fd = 0; + + g_set_error_literal (error, + G_IO_ERROR, + g_io_error_from_errno (errno), + "Failed to setup socket for ioctl"); + + return FALSE; + } + + return TRUE; +} + +/* Create a netlink socket, bind to it and wrap it in a GSocket */ +static gboolean +create_netlink_socket (GUPnPLinuxContextManager *self, GError **error) +{ + struct sockaddr_nl sa; + int fd, status; + GSocket *sock; + GError *inner_error; + + inner_error = NULL; + + fd = socket (PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + if (fd == -1) { + g_set_error_literal (error, + G_IO_ERROR, + g_io_error_from_errno (errno), + "Failed to bind to netlink socket"); + return FALSE; + } + + memset (&sa, 0, sizeof (sa)); + sa.nl_family = AF_NETLINK; + /* Listen for interface changes and IP address changes */ + sa.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR; + + status = bind (fd, (struct sockaddr *) &sa, sizeof (sa)); + if (status == -1) { + g_set_error_literal (error, + G_IO_ERROR, + g_io_error_from_errno (errno), + "Failed to bind to netlink socket"); + close (fd); + + return FALSE; + } + + sock = g_socket_new_from_fd (fd, &inner_error); + if (sock == NULL) { + close (fd); + g_propagate_prefixed_error (error, + inner_error, + "Failed to create GSocket from " + "netlink socket"); + + return FALSE; + } + + g_socket_set_blocking (sock, FALSE); + + self->priv->netlink_socket = sock; + + return TRUE; +} + +gboolean +gupnp_linux_context_manager_is_available (void) +{ + int fd = -1; + + fd = socket (PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + + if (fd == -1) + return FALSE; + + close (fd); + + return TRUE; +} + +static void +gupnp_linux_context_manager_init (GUPnPLinuxContextManager *self) +{ + self->priv = + G_TYPE_INSTANCE_GET_PRIVATE (self, + GUPNP_TYPE_LINUX_CONTEXT_MANAGER, + GUPnPLinuxContextManagerPrivate); + + self->priv->nl_seq = 0; + + self->priv->interfaces = + g_hash_table_new_full (g_direct_hash, + g_direct_equal, + NULL, + (GDestroyNotify) network_device_free); +} + +static void +gupnp_linux_context_manager_constructed (GObject *object) +{ + GObjectClass *parent_class; + GUPnPLinuxContextManager *self; + GError *error = NULL; + + self = GUPNP_LINUX_CONTEXT_MANAGER (object); + + if (!create_ioctl_socket (self, &error)) + goto cleanup; + + if (!create_netlink_socket (self, &error)) + goto cleanup; + + self->priv->bootstrap_source = + g_idle_source_new (); + g_source_attach (self->priv->bootstrap_source, + g_main_context_get_thread_default ()); + g_source_set_callback (self->priv->bootstrap_source, + (GSourceFunc) on_bootstrap, + self, + NULL); +cleanup: + if (error) { + if (self->priv->fd > 0) + close (self->priv->fd); + + g_warning ("Failed to setup Linux context manager: %s", + error->message); + + g_error_free (error); + } + + /* Chain-up */ + parent_class = G_OBJECT_CLASS (gupnp_linux_context_manager_parent_class); + if (parent_class->constructed) + parent_class->constructed (object); +} + +static void +gupnp_linux_context_manager_dispose (GObject *object) +{ + GUPnPLinuxContextManager *self; + GObjectClass *parent_class; + + self = GUPNP_LINUX_CONTEXT_MANAGER (object); + + if (self->priv->bootstrap_source != NULL) { + g_source_destroy (self->priv->bootstrap_source); + g_source_unref (self->priv->bootstrap_source); + self->priv->bootstrap_source = NULL; + } + + if (self->priv->netlink_socket_source != NULL) { + g_source_destroy (self->priv->netlink_socket_source); + g_source_unref (self->priv->netlink_socket_source); + self->priv->netlink_socket_source = NULL; + } + + if (self->priv->netlink_socket != NULL) { + g_object_unref (self->priv->netlink_socket); + self->priv->netlink_socket = NULL; + } + + if (self->priv->fd != 0) { + close (self->priv->fd); + self->priv->fd = 0; + } + + if (self->priv->interfaces) { + g_hash_table_destroy (self->priv->interfaces); + self->priv->interfaces = NULL; + } + + /* Chain-up */ + parent_class = G_OBJECT_CLASS (gupnp_linux_context_manager_parent_class); + parent_class->dispose (object); +} + +static void +gupnp_linux_context_manager_class_init (GUPnPLinuxContextManagerClass *klass) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (klass); + + object_class->constructed = gupnp_linux_context_manager_constructed; + object_class->dispose = gupnp_linux_context_manager_dispose; + + g_type_class_add_private (klass, + sizeof (GUPnPLinuxContextManagerPrivate)); +} diff --git a/libgupnp/gupnp-linux-context-manager.h b/libgupnp/gupnp-linux-context-manager.h new file mode 100644 index 0000000..76b1f80 --- /dev/null +++ b/libgupnp/gupnp-linux-context-manager.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2011 Jens Georg. + * + * Author: Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GUPNP_LINUX_CONTEXT_MANAGER_H__ +#define __GUPNP_LINUX_CONTEXT_MANAGER_H__ + +#include "gupnp-context-manager.h" + +G_BEGIN_DECLS + +G_GNUC_INTERNAL GType +gupnp_linux_context_manager_get_type (void) G_GNUC_CONST; + +#define GUPNP_TYPE_LINUX_CONTEXT_MANAGER \ + (gupnp_linux_context_manager_get_type ()) +#define GUPNP_LINUX_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GUPNP_TYPE_LINUX_CONTEXT_MANAGER, \ + GUPnPLinuxContextManager)) +#define GUPNP_LINUX_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_CAST ((obj), \ + GUPNP_TYPE_LINUX_CONTEXT_MANAGER, \ + GUPnPLinuxContextManagerClass)) +#define GUPNP_IS_LINUX_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GUPNP_TYPE_LINUX_CONTEXT_MANAGER)) +#define GUPNP_IS_LINUX_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE ((obj), \ + GUPNP_TYPE_LINUX_CONTEXT_MANAGER)) +#define GUPNP_LINUX_CONTEXT_MANAGER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GUPNP_TYPE_LINUX_CONTEXT_MANAGER, \ + GUPnPLinuxContextManagerClass)) + +typedef struct _GUPnPLinuxContextManagerPrivate GUPnPLinuxContextManagerPrivate; + +typedef struct { + GUPnPContextManager parent; + + GUPnPLinuxContextManagerPrivate *priv; +} GUPnPLinuxContextManager; + +typedef struct { + GUPnPContextManagerClass parent_class; + + /* future padding */ + void (* _gupnp_reserved1) (void); + void (* _gupnp_reserved2) (void); + void (* _gupnp_reserved3) (void); + void (* _gupnp_reserved4) (void); +} GUPnPLinuxContextManagerClass; + +G_GNUC_INTERNAL gboolean gupnp_linux_context_manager_is_available (void); + +G_END_DECLS + +#endif /* __GUPNP_LINUX_CONTEXT_MANAGER_H__ */ diff --git a/libgupnp/gupnp-marshal.c b/libgupnp/gupnp-marshal.c index 8374ba0..c02b40b 100644 --- a/libgupnp/gupnp-marshal.c +++ b/libgupnp/gupnp-marshal.c @@ -8,7 +8,7 @@ G_BEGIN_DECLS #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) @@ -139,51 +139,6 @@ gupnp_marshal_VOID__POINTER_POINTER (GClosure *closure, data2); } -/* VOID:UINT,UINT,UINT (./gupnp-marshal.list:3) */ -extern void gupnp_marshal_VOID__UINT_UINT_UINT (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); -void -gupnp_marshal_VOID__UINT_UINT_UINT (GClosure *closure, - GValue *return_value G_GNUC_UNUSED, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1, - guint arg_1, - guint arg_2, - guint arg_3, - gpointer data2); - register GMarshalFunc_VOID__UINT_UINT_UINT callback; - register GCClosure *cc = (GCClosure*) closure; - register gpointer data1, data2; - - g_return_if_fail (n_param_values == 4); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); - - callback (data1, - g_marshal_value_peek_uint (param_values + 1), - g_marshal_value_peek_uint (param_values + 2), - g_marshal_value_peek_uint (param_values + 3), - data2); -} - G_END_DECLS #endif /* __gupnp_marshal_MARSHAL_H__ */ diff --git a/libgupnp/gupnp-marshal.h b/libgupnp/gupnp-marshal.h index b24f048..7ddf1d3 100644 --- a/libgupnp/gupnp-marshal.h +++ b/libgupnp/gupnp-marshal.h @@ -22,14 +22,6 @@ extern void gupnp_marshal_VOID__POINTER_POINTER (GClosure *closure, gpointer invocation_hint, gpointer marshal_data); -/* VOID:UINT,UINT,UINT (./gupnp-marshal.list:3) */ -extern void gupnp_marshal_VOID__UINT_UINT_UINT (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - G_END_DECLS #endif /* __gupnp_marshal_MARSHAL_H__ */ diff --git a/libgupnp/gupnp-marshal.list b/libgupnp/gupnp-marshal.list index 7ece635..96f6f7d 100644 --- a/libgupnp/gupnp-marshal.list +++ b/libgupnp/gupnp-marshal.list @@ -1,3 +1,2 @@ VOID:STRING,POINTER VOID:POINTER,POINTER -VOID:UINT,UINT,UINT diff --git a/libgupnp/gupnp-network-manager.c b/libgupnp/gupnp-network-manager.c index 6e77fe6..3b4e424 100644 --- a/libgupnp/gupnp-network-manager.c +++ b/libgupnp/gupnp-network-manager.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * * Author: Zeeshan Ali (Khattak) * @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -32,9 +32,7 @@ #include #include #include -#include -#include -#include +#include #include "gupnp-network-manager.h" #include "gupnp-context.h" @@ -46,7 +44,13 @@ #define DBUS_SERVICE_NM "org.freedesktop.NetworkManager" #define MANAGER_PATH "/org/freedesktop/NetworkManager" #define MANAGER_INTERFACE "org.freedesktop.NetworkManager" +#define AP_INTERFACE "org.freedesktop.NetworkManager.AccessPoint" #define DEVICE_INTERFACE "org.freedesktop.NetworkManager.Device" +#define WIFI_INTERFACE "org.freedesktop.NetworkManager.Device.Wireless" + +#define DBUS_SERVICE_DBUS "org.freedesktop.DBus" +#define DBUS_PATH_DBUS "/org/freedesktop/DBus" +#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus" G_DEFINE_TYPE (GUPnPNetworkManager, gupnp_network_manager, @@ -54,68 +58,102 @@ G_DEFINE_TYPE (GUPnPNetworkManager, typedef enum { - NM_DEVICE_STATE_UNKNOWN, - NM_DEVICE_STATE_UNMANAGED, - NM_DEVICE_STATE_UNAVAILABLE, - NM_DEVICE_STATE_DISCONNECTED, - NM_DEVICE_STATE_PREPARE, - NM_DEVICE_STATE_CONFIG, - NM_DEVICE_STATE_NEED_AUTH, - NM_DEVICE_STATE_IP_CONFIG, - NM_DEVICE_STATE_ACTIVATED, - NM_DEVICE_STATE_FAILED + NM_DEVICE_STATE_UNKNOWN = 0, + NM_OLD_DEVICE_STATE_UNMANAGED = 1, + NM_OLD_DEVICE_STATE_UNAVAILABLE = 2, + NM_OLD_DEVICE_STATE_DISCONNECTED = 3, + NM_OLD_DEVICE_STATE_PREPARE = 4, + NM_OLD_DEVICE_STATE_CONFIG = 5, + NM_OLD_DEVICE_STATE_NEED_AUTH = 6, + NM_OLD_DEVICE_STATE_IP_CONFIG = 7, + NM_OLD_DEVICE_STATE_ACTIVATED = 8, + NM_OLD_DEVICE_STATE_FAILED = 9, + NM_DEVICE_STATE_UNMANAGED = 10, + NM_DEVICE_STATE_UNAVAILABLE = 20, + NM_DEVICE_STATE_DISCONNECTED = 30, + NM_DEVICE_STATE_PREPARE = 40, + NM_DEVICE_STATE_CONFIG = 50, + NM_DEVICE_STATE_NEED_AUTH = 60, + NM_DEVICE_STATE_IP_CONFIG = 70, + NM_DEVICE_STATE_IP_CHECK = 80, + NM_DEVICE_STATE_SECONDARIES = 90, + NM_DEVICE_STATE_ACTIVATED = 100, + NM_DEVICE_STATE_DEACTIVATING = 110, + NM_DEVICE_STATE_FAILED = 120 } NMDeviceState; +typedef enum +{ + NM_DEVICE_TYPE_UNKNOWN, + NM_DEVICE_TYPE_ETHERNET, + NM_DEVICE_TYPE_WIFI, + NM_OLD_DEVICE_TYPE_GSM, + NM_OLD_DEVICE_TYPE_CDMA, + NM_DEVICE_TYPE_BT, + NM_DEVICE_TYPE_OLPC_MESH, + NM_DEVICE_TYPE_WIMAX, + NM_DEVICE_TYPE_MODEM +} NMDeviceType; + typedef struct { + gint ref_count; + GUPnPNetworkManager *manager; GUPnPContext *context; - DBusGProxy *device_proxy; - DBusGProxy *prop_proxy; + GDBusProxy *proxy; + GDBusProxy *wifi_proxy; + GDBusProxy *ap_proxy; } NMDevice; struct _GUPnPNetworkManagerPrivate { - DBusConnection *dbus_connection; - DBusGConnection *connection; - DBusGProxy *manager_proxy; + GDBusProxy *manager_proxy; GSource *idle_context_creation_src; GList *nm_devices; + + GCancellable *cancellable; + + GDBusConnection *system_bus; }; static NMDevice * nm_device_new (GUPnPNetworkManager *manager, - const char *device_path) + GDBusProxy *device_proxy) { NMDevice *nm_device; nm_device = g_slice_new0 (NMDevice); + g_atomic_int_set (&nm_device->ref_count, 1); nm_device->manager = g_object_ref (manager); + nm_device->proxy = g_object_ref (device_proxy); - nm_device->prop_proxy = dbus_g_proxy_new_for_name ( - manager->priv->connection, - DBUS_SERVICE_NM, - device_path, - DBUS_INTERFACE_PROPERTIES); + return nm_device; +} - nm_device->device_proxy = dbus_g_proxy_new_for_name ( - manager->priv->connection, - DBUS_SERVICE_NM, - device_path, - DEVICE_INTERFACE); +static NMDevice * +nm_device_ref (NMDevice *nm_device) +{ + g_atomic_int_inc (&nm_device->ref_count); return nm_device; } static void -nm_device_free (NMDevice *nm_device) +nm_device_unref (NMDevice *nm_device) { - g_object_unref (nm_device->prop_proxy); - g_object_unref (nm_device->device_proxy); + if (!g_atomic_int_dec_and_test (&nm_device->ref_count)) + return; + + g_object_unref (nm_device->proxy); + if (nm_device->wifi_proxy != NULL) + g_object_unref (nm_device->wifi_proxy); + if (nm_device->ap_proxy != NULL) + g_object_unref (nm_device->ap_proxy); if (nm_device->context != NULL) { g_signal_emit_by_name (nm_device->manager, @@ -125,6 +163,7 @@ nm_device_free (NMDevice *nm_device) g_object_unref (nm_device->context); } + g_object_unref (nm_device->proxy); g_object_unref (nm_device->manager); g_slice_free (NMDevice, nm_device); @@ -137,23 +176,21 @@ create_loopback_context (gpointer data) { GUPnPNetworkManager *manager = (GUPnPNetworkManager *) data; GUPnPContext *context; - GMainContext *main_context; guint port; GError *error = NULL; manager->priv->idle_context_creation_src = NULL; g_object_get (manager, - "main-context", &main_context, "port", &port, NULL); - context = g_object_new (GUPNP_TYPE_CONTEXT, - "main-context", main_context, - "interface", LOOPBACK_IFACE, - "port", port, - "error", &error, - NULL); + context = g_initable_new (GUPNP_TYPE_CONTEXT, + NULL, + &error, + "interface", LOOPBACK_IFACE, + "port", port, + NULL); if (error) { g_warning ("Error creating GUPnP context: %s\n", error->message); @@ -170,23 +207,52 @@ create_loopback_context (gpointer data) } static void -create_context_for_device (NMDevice *nm_device, const char *iface) +create_context_for_device (NMDevice *nm_device) { GError *error = NULL; - GMainContext *main_context; guint port; + GVariant *value; + char *iface; + char *ssid = NULL; g_object_get (nm_device->manager, - "main-context", &main_context, "port", &port, NULL); - nm_device->context = g_object_new (GUPNP_TYPE_CONTEXT, - "main-context", main_context, - "interface", iface, - "port", port, - "error", &error, - NULL); + value = g_dbus_proxy_get_cached_property (nm_device->proxy, + "Interface"); + if (G_UNLIKELY (value == NULL)) + return; + + if (G_UNLIKELY (!g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))) { + g_variant_unref (value); + + return; + } + + iface = g_variant_dup_string (value, NULL); + g_variant_unref (value); + + if (nm_device->ap_proxy != NULL) { + value = g_dbus_proxy_get_cached_property (nm_device->ap_proxy, + "Ssid"); + if (G_LIKELY (value != NULL)) { + ssid = g_strndup (g_variant_get_data (value), + g_variant_get_size (value)); + g_variant_unref (value); + } + } + + nm_device->context = g_initable_new (GUPNP_TYPE_CONTEXT, + NULL, + &error, + "interface", iface, + "network", ssid, + "port", port, + NULL); + g_free (iface); + g_free (ssid); + if (error) { g_warning ("Error creating GUPnP context: %s\n", error->message); @@ -202,87 +268,94 @@ create_context_for_device (NMDevice *nm_device, const char *iface) } static void -get_device_interface_cb (DBusGProxy *proxy, - DBusGProxyCall *call, - void *user_data) +ap_proxy_new_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) { - GValue value = {0,}; - GError *error = NULL; - NMDevice *nm_device = (NMDevice *) user_data; - - if (!dbus_g_proxy_end_call (nm_device->prop_proxy, - call, - &error, - G_TYPE_VALUE, &value, - G_TYPE_INVALID)) { - g_warning ("Error reading property from object: %s\n", - error->message); + NMDevice *nm_device; + GError *error; + nm_device = (NMDevice *) user_data; + error = NULL; + + nm_device->ap_proxy = g_dbus_proxy_new_for_bus_finish (res, &error); + if (G_UNLIKELY (error != NULL)) { + g_message ("Failed to create D-Bus proxy: %s", error->message); g_error_free (error); - return; + goto done; } - create_context_for_device (nm_device, g_value_get_string (&value)); - g_value_unset (&value); + create_context_for_device (nm_device); + +done: + nm_device_unref (nm_device); } static void -get_device_state_cb (DBusGProxy *proxy, - DBusGProxyCall *call, - void *user_data) +on_wifi_device_activated (NMDevice *nm_device) { - GValue value = {0,}; - GError *error = NULL; - NMDevice *nm_device = (NMDevice *) user_data; + GVariant *value; + const char *ap_path; + + value = g_dbus_proxy_get_cached_property (nm_device->wifi_proxy, + "ActiveAccessPoint"); + if (G_UNLIKELY (value == NULL)) + return; - if (!dbus_g_proxy_end_call (proxy, - call, - &error, - G_TYPE_VALUE, &value, - G_TYPE_INVALID)) { - g_warning ("Error reading property: %s\n", error->message); + if (G_UNLIKELY (!g_variant_is_of_type (value, + G_VARIANT_TYPE_OBJECT_PATH))) { + g_variant_unref (value); - g_error_free (error); return; } - NMDeviceState state = g_value_get_uint (&value); - - if (state == NM_DEVICE_STATE_ACTIVATED) { - dbus_g_proxy_begin_call (nm_device->prop_proxy, - "Get", - get_device_interface_cb, - nm_device, - NULL, - G_TYPE_STRING, DEVICE_INTERFACE, - G_TYPE_STRING, "Interface", - G_TYPE_INVALID); - } + ap_path = g_variant_get_string (value, NULL); + if (G_UNLIKELY (ap_path == NULL)) + create_context_for_device (nm_device); + else { + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + DBUS_SERVICE_NM, + ap_path, + AP_INTERFACE, + nm_device->manager->priv->cancellable, + ap_proxy_new_cb, + nm_device_ref (nm_device)); + } + + g_variant_unref (value); +} - g_value_unset (&value); +static void +on_device_activated (NMDevice *nm_device) +{ + if (nm_device->wifi_proxy != NULL) + on_wifi_device_activated (nm_device); + else + create_context_for_device (nm_device); } static void -on_device_state_changed (DBusGProxy *proxy, - guint new_state, - guint old_state, - guint reason, - void *user_data) +on_device_signal (GDBusProxy *proxy, + char *sender_name, + char *signal_name, + GVariant *parameters, + gpointer user_data) { NMDevice *nm_device; + unsigned int new_state; + + if (g_strcmp0 (signal_name, "StateChanged") != 0) + return; nm_device = (NMDevice *) user_data; + g_variant_get_child (parameters, 0, "u", &new_state); - if (new_state == NM_DEVICE_STATE_ACTIVATED) { - dbus_g_proxy_begin_call (nm_device->prop_proxy, - "Get", - get_device_interface_cb, - nm_device, - NULL, - G_TYPE_STRING, DEVICE_INTERFACE, - G_TYPE_STRING, "Interface", - G_TYPE_INVALID); - } else if (nm_device->context != NULL) { + if (new_state == NM_OLD_DEVICE_STATE_ACTIVATED || + new_state == NM_DEVICE_STATE_ACTIVATED) + on_device_activated (nm_device); + else if (nm_device->context != NULL) { /* For all other states we just destroy the context */ g_signal_emit_by_name (nm_device->manager, "context-unavailable", @@ -290,49 +363,129 @@ on_device_state_changed (DBusGProxy *proxy, g_object_unref (nm_device->context); nm_device->context = NULL; + + if (nm_device->ap_proxy != NULL) { + g_object_unref (nm_device->ap_proxy); + nm_device->ap_proxy = NULL; + } } } static void -add_device_from_path (char *device_path, - GUPnPNetworkManager *manager) +use_new_device (GUPnPNetworkManager *manager, + NMDevice *nm_device) { - NMDevice *nm_device; - - nm_device = nm_device_new (manager, device_path); + NMDeviceState state; + GVariant *value; manager->priv->nm_devices = g_list_append (manager->priv->nm_devices, nm_device); - dbus_g_proxy_add_signal (nm_device->device_proxy, - "StateChanged", - G_TYPE_UINT, - G_TYPE_UINT, - G_TYPE_UINT, - G_TYPE_INVALID); - - dbus_g_proxy_connect_signal (nm_device->device_proxy, - "StateChanged", - G_CALLBACK (on_device_state_changed), - nm_device, - NULL); - - dbus_g_proxy_begin_call (nm_device->prop_proxy, - "Get", - get_device_state_cb, - nm_device, - NULL, - G_TYPE_STRING, DEVICE_INTERFACE, - G_TYPE_STRING, "State", - G_TYPE_INVALID); + g_signal_connect (nm_device->proxy, + "g-signal", + G_CALLBACK (on_device_signal), + nm_device); + + value = g_dbus_proxy_get_cached_property (nm_device->proxy, "State"); + if (G_UNLIKELY (value == NULL)) + return; + + if (G_UNLIKELY (!g_variant_is_of_type (value, G_VARIANT_TYPE_UINT32))) { + g_variant_unref (value); + + return; + } + + state = g_variant_get_uint32 (value); + g_variant_unref (value); + + if (state == NM_OLD_DEVICE_STATE_ACTIVATED || + state == NM_DEVICE_STATE_ACTIVATED) + on_device_activated (nm_device); } static void -on_device_added (DBusGProxy *proxy, - char *device_path, - gpointer user_data) -{ - add_device_from_path (device_path, GUPNP_NETWORK_MANAGER (user_data)); +wifi_proxy_new_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) { + NMDevice *nm_device; + GError *error; + + nm_device = (NMDevice *) user_data; + error = NULL; + + nm_device->wifi_proxy = g_dbus_proxy_new_for_bus_finish (res, &error); + if (G_UNLIKELY (error != NULL)) { + g_message ("Failed to create D-Bus proxy: %s", error->message); + g_error_free (error); + goto done; + } + + use_new_device (nm_device->manager, nm_device); + +done: + nm_device_unref (nm_device); +} + +static void +device_proxy_new_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) { + GUPnPNetworkManager *manager; + GDBusProxy *device_proxy; + NMDevice *nm_device; + NMDeviceType type; + GVariant *value; + GError *error; + + manager = GUPNP_NETWORK_MANAGER (user_data); + error = NULL; + + device_proxy = g_dbus_proxy_new_for_bus_finish (res, &error); + if (G_UNLIKELY (error != NULL)) { + g_message ("Failed to create D-Bus proxy: %s", error->message); + g_error_free (error); + + goto done; + } + + value = g_dbus_proxy_get_cached_property (device_proxy, "DeviceType"); + if (G_UNLIKELY (value == NULL)) { + g_object_unref (device_proxy); + + goto done; + } + + if (G_UNLIKELY (!g_variant_is_of_type (value, G_VARIANT_TYPE_UINT32))) { + g_variant_unref (value); + g_object_unref (device_proxy); + + goto done; + } + + type = g_variant_get_uint32 (value); + g_variant_unref (value); + + nm_device = nm_device_new (manager, device_proxy); + + if (type == NM_DEVICE_TYPE_WIFI) { + const char *path; + + path = g_dbus_proxy_get_object_path (nm_device->proxy); + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + DBUS_SERVICE_NM, + path, + WIFI_INTERFACE, + manager->priv->cancellable, + wifi_proxy_new_cb, + nm_device_ref (nm_device)); + } else + use_new_device (manager, nm_device); + +done: + g_object_unref (manager); } static int @@ -340,7 +493,7 @@ compare_device_path (NMDevice *nm_device, char *device_path) { const char *path; - path = dbus_g_proxy_get_path (nm_device->device_proxy); + path = g_dbus_proxy_get_object_path (nm_device->proxy); if (G_UNLIKELY (path == NULL)) return -1; @@ -348,156 +501,163 @@ compare_device_path (NMDevice *nm_device, char *device_path) } static void -on_device_removed (DBusGProxy *proxy, - char *device_path, +on_manager_signal (GDBusProxy *proxy, + char *sender_name, + char *signal_name, + GVariant *parameters, gpointer user_data) { - GList *device_node; - NMDevice *nm_device; - GUPnPNetworkManagerPrivate *priv; + GUPnPNetworkManager *manager; - priv = GUPNP_NETWORK_MANAGER (user_data)->priv; + manager = GUPNP_NETWORK_MANAGER (user_data); - device_node = g_list_find_custom (priv->nm_devices, - device_path, - (GCompareFunc) compare_device_path); - if (G_UNLIKELY (device_node == NULL)) - return; + if (g_strcmp0 (signal_name, "DeviceAdded") == 0) { + char *device_path = NULL; - nm_device = (NMDevice *) device_node->data; + g_variant_get_child (parameters, 0, "o", &device_path); + if (G_UNLIKELY (device_path == NULL)) + return; - priv->nm_devices = g_list_remove (priv->nm_devices, nm_device); - nm_device_free (nm_device); + + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + DBUS_SERVICE_NM, + device_path, + DEVICE_INTERFACE, + manager->priv->cancellable, + device_proxy_new_cb, + g_object_ref (manager)); + g_free (device_path); + } else if (g_strcmp0 (signal_name, "DeviceRemoved") == 0) { + GList *device_node; + NMDevice *nm_device; + GUPnPNetworkManagerPrivate *priv; + char *device_path = NULL; + + g_variant_get_child (parameters, 0, "o", &device_path); + if (G_UNLIKELY (device_path == NULL)) + return; + + priv = manager->priv; + + device_node = g_list_find_custom ( + priv->nm_devices, + device_path, + (GCompareFunc) compare_device_path); + if (G_UNLIKELY (device_node == NULL)) { + g_free (device_path); + + return; + } + + nm_device = (NMDevice *) device_node->data; + + priv->nm_devices = g_list_remove (priv->nm_devices, nm_device); + nm_device_unref (nm_device); + g_free (device_path); + } } static void -get_devices_cb (DBusGProxy *proxy, - DBusGProxyCall *call, - void *user_data) +get_devices_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) { - GPtrArray *device_paths; + GUPnPNetworkManager *manager; + GVariant *ret; + GVariantIter *device_iter; + char* device_path; GError *error = NULL; - if (!dbus_g_proxy_end_call (proxy, - call, - &error, - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, - &device_paths, - G_TYPE_INVALID)) { - g_warning ("Error fetching list of devices: %s\n", + manager = GUPNP_NETWORK_MANAGER (user_data); + + ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), + res, + &error); + if (error != NULL) { + g_warning ("Error fetching list of devices: %s", error->message); g_error_free (error); - return; + goto done; } - g_ptr_array_foreach (device_paths, - (GFunc) add_device_from_path, - user_data); + g_variant_get_child (ret, 0, "ao", &device_iter); + while (g_variant_iter_loop (device_iter, "o", &device_path)) + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + DBUS_SERVICE_NM, + device_path, + DEVICE_INTERFACE, + manager->priv->cancellable, + device_proxy_new_cb, + g_object_ref (user_data)); + g_variant_iter_free (device_iter); - g_ptr_array_foreach (device_paths, (GFunc) g_free, NULL); - g_ptr_array_free (device_paths, TRUE); + g_variant_unref (ret); + +done: + g_object_unref (manager); } static void schedule_loopback_context_creation (GUPnPNetworkManager *manager) { - GMainContext *main_context; - - g_object_get (manager, - "main-context", &main_context, - NULL); - /* Create contexts in mainloop so that is happens after user has hooked * to the "context-available" signal. */ manager->priv->idle_context_creation_src = g_idle_source_new (); g_source_attach (manager->priv->idle_context_creation_src, - main_context); + g_main_context_get_thread_default ()); g_source_set_callback (manager->priv->idle_context_creation_src, create_loopback_context, - manager, - NULL); + g_object_ref (manager), + (GDestroyNotify) g_object_unref); g_source_unref (manager->priv->idle_context_creation_src); } -static DBusGConnection * -connect_to_system_bus (GMainContext *main_context, - DBusConnection **connection) -{ - DBusGConnection *gconnection = NULL; - DBusError derror; - - /* Do fake open to initialize types */ - dbus_g_connection_open ("", NULL); - dbus_error_init (&derror); - *connection = dbus_bus_get_private (DBUS_BUS_SYSTEM, &derror); - if (*connection == NULL) { - g_message ("Failed to connect to System Bus: %s", - derror.message); - dbus_error_free (&derror); - - return NULL; - } - - dbus_connection_setup_with_g_main (*connection, main_context); - gconnection = dbus_connection_get_g_connection (*connection); - if (G_UNLIKELY (gconnection == NULL)) { - g_message ("Failed to connect to System Bus."); - - return NULL; - } - - return gconnection; -} - static void init_network_manager (GUPnPNetworkManager *manager) { GUPnPNetworkManagerPrivate *priv; - GMainContext *main_context; + GError *error; priv = manager->priv; - g_object_get (manager, "main-context", &main_context, NULL); + error = NULL; + priv->manager_proxy = g_dbus_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + NULL, + DBUS_SERVICE_NM, + MANAGER_PATH, + MANAGER_INTERFACE, + priv->cancellable, + &error); + if (error != NULL) { + g_message ("Failed to connect to NetworkManager: %s", + error->message); + g_error_free (error); - priv->connection = connect_to_system_bus (main_context, - &priv->dbus_connection); - if (G_UNLIKELY (priv->connection == NULL)) { return; } - priv->manager_proxy = dbus_g_proxy_new_for_name (priv->connection, - DBUS_SERVICE_NM, - MANAGER_PATH, - MANAGER_INTERFACE); - - dbus_g_proxy_add_signal (priv->manager_proxy, - "DeviceAdded", - DBUS_TYPE_G_OBJECT_PATH, - G_TYPE_INVALID); - dbus_g_proxy_connect_signal (priv->manager_proxy, - "DeviceAdded", - G_CALLBACK (on_device_added), - manager, - NULL); - - dbus_g_proxy_add_signal (priv->manager_proxy, - "DeviceRemoved", - DBUS_TYPE_G_OBJECT_PATH, - G_TYPE_INVALID); - dbus_g_proxy_connect_signal (priv->manager_proxy, - "DeviceRemoved", - G_CALLBACK (on_device_removed), - manager, - NULL); - - dbus_g_proxy_begin_call (priv->manager_proxy, - "GetDevices", - get_devices_cb, - manager, - NULL, - G_TYPE_INVALID); + g_signal_connect (priv->manager_proxy, + "g-signal", + G_CALLBACK (on_manager_signal), + manager); + + + g_dbus_proxy_call (priv->manager_proxy, + "GetDevices", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + priv->cancellable, + get_devices_cb, + g_object_ref (manager)); } static void @@ -519,7 +679,9 @@ gupnp_network_manager_constructed (GObject *object) manager = GUPNP_NETWORK_MANAGER (object); priv = manager->priv; + priv->cancellable = g_cancellable_new (); priv->nm_devices = NULL; + priv->system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); init_network_manager (manager); @@ -553,17 +715,19 @@ gupnp_network_manager_dispose (GObject *object) } if (priv->nm_devices != NULL) { - g_list_foreach (priv->nm_devices, (GFunc) nm_device_free, NULL); + g_list_foreach (priv->nm_devices, (GFunc) nm_device_unref, + NULL); g_list_free (priv->nm_devices); priv->nm_devices = NULL; } - if (priv->connection) { - dbus_connection_close (priv->dbus_connection); - dbus_g_connection_unref (priv->connection); - priv->connection = NULL; + if (priv->cancellable != NULL) { + g_object_unref (priv->cancellable); + priv->cancellable = NULL; } + g_clear_object (&(priv->system_bus)); + /* Call super */ object_class = G_OBJECT_CLASS (gupnp_network_manager_parent_class); object_class->dispose (object); @@ -579,50 +743,53 @@ gupnp_network_manager_class_init (GUPnPNetworkManagerClass *klass) object_class->constructed = gupnp_network_manager_constructed; object_class->dispose = gupnp_network_manager_dispose; - dbus_g_object_register_marshaller (gupnp_marshal_VOID__UINT_UINT_UINT, - G_TYPE_NONE, - G_TYPE_UINT, - G_TYPE_UINT, - G_TYPE_UINT, - G_TYPE_INVALID); - g_type_class_add_private (klass, sizeof (GUPnPNetworkManagerPrivate)); } gboolean -gupnp_network_manager_is_available (GMainContext *main_context) +gupnp_network_manager_is_available () { - DBusConnection *connection; - DBusGConnection *gconnection; - DBusGProxy *dbus_proxy; + GDBusProxy *dbus_proxy; + GVariant *ret_values; GError *error = NULL; gboolean ret = FALSE; - gconnection = connect_to_system_bus (main_context, &connection); - if (gconnection == NULL) + dbus_proxy = g_dbus_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + NULL, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + NULL, + &error); + if (error != NULL) { + g_message ("Failed to connect to NetworkManager: %s", + error->message); + g_error_free (error); + return ret; + } - dbus_proxy = dbus_g_proxy_new_for_name (gconnection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS); - - if (!dbus_g_proxy_call (dbus_proxy, - "NameHasOwner", - &error, - G_TYPE_STRING, DBUS_SERVICE_NM, - G_TYPE_INVALID, - G_TYPE_BOOLEAN, &ret, - G_TYPE_INVALID)) { + ret_values = g_dbus_proxy_call_sync (dbus_proxy, + "NameHasOwner", + g_variant_new ("(s)", + DBUS_SERVICE_NM), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + if (error != NULL) { g_warning ("%s.NameHasOwner() failed: %s", DBUS_INTERFACE_DBUS, error->message); g_error_free (error); + } else { + g_variant_get_child (ret_values, 0, "b", &ret); + g_variant_unref (ret_values); } g_object_unref (dbus_proxy); - dbus_connection_close (connection); - dbus_g_connection_unref (gconnection); return ret; } diff --git a/libgupnp/gupnp-network-manager.h b/libgupnp/gupnp-network-manager.h index 5507327..27dbdec 100644 --- a/libgupnp/gupnp-network-manager.h +++ b/libgupnp/gupnp-network-manager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * * Author: Zeeshan Ali (Khattak) * @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_NETWORK_MANAGER_H__ @@ -27,7 +27,7 @@ G_BEGIN_DECLS -GType +G_GNUC_INTERNAL GType gupnp_network_manager_get_type (void) G_GNUC_CONST; #define GUPNP_TYPE_NETWORK_MANAGER \ @@ -69,8 +69,8 @@ typedef struct { void (* _gupnp_reserved4) (void); } GUPnPNetworkManagerClass; -gboolean -gupnp_network_manager_is_available (GMainContext *main_context); +G_GNUC_INTERNAL gboolean +gupnp_network_manager_is_available (); G_END_DECLS diff --git a/libgupnp/gupnp-resource-factory-private.h b/libgupnp/gupnp-resource-factory-private.h index a809396..bb01b0c 100644 --- a/libgupnp/gupnp-resource-factory-private.h +++ b/libgupnp/gupnp-resource-factory-private.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_RESOURCE_FACTORY_PRIVATE_H__ diff --git a/libgupnp/gupnp-resource-factory.c b/libgupnp/gupnp-resource-factory.c index cbdd9ac..0ff9aea 100644 --- a/libgupnp/gupnp-resource-factory.c +++ b/libgupnp/gupnp-resource-factory.c @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -69,8 +69,36 @@ gupnp_resource_factory_init (GUPnPResourceFactory *factory) } static void +gupnp_resource_factory_finalize (GObject *object) +{ + GUPnPResourceFactory *self; + GObjectClass *object_class; + + self = GUPNP_RESOURCE_FACTORY (object); + + if (self->priv->resource_type_hash) { + g_hash_table_destroy (self->priv->resource_type_hash); + self->priv->resource_type_hash = NULL; + } + + if (self->priv->proxy_type_hash) { + g_hash_table_destroy (self->priv->proxy_type_hash); + self->priv->proxy_type_hash = NULL; + } + + object_class = G_OBJECT_CLASS (gupnp_resource_factory_parent_class); + object_class->finalize (object); +} + +static void gupnp_resource_factory_class_init (GUPnPResourceFactoryClass *klass) { + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gupnp_resource_factory_finalize; + g_type_class_add_private (klass, sizeof (GUPnPResourceFactoryPrivate)); } @@ -92,7 +120,7 @@ gupnp_resource_factory_new (void) * * Get the default singleton #GUPnPResourceFactory object. * - * Return value: A @GUPnPResourceFactory object. + * Returns: (transfer none): A @GUPnPResourceFactory object. **/ GUPnPResourceFactory * gupnp_resource_factory_get_default (void) diff --git a/libgupnp/gupnp-resource-factory.h b/libgupnp/gupnp-resource-factory.h index 3431256..1c76f27 100644 --- a/libgupnp/gupnp-resource-factory.h +++ b/libgupnp/gupnp-resource-factory.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_RESOURCE_FACTORY_H__ @@ -53,6 +53,8 @@ gupnp_resource_factory_get_type (void) G_GNUC_CONST; GUPnPResourceFactoryClass)) typedef struct _GUPnPResourceFactoryPrivate GUPnPResourceFactoryPrivate; +typedef struct _GUPnPResourceFactory GUPnPResourceFactory; +typedef struct _GUPnPResourceFactoryClass GUPnPResourceFactoryClass; /** * GUPnPResourceFactory: @@ -60,13 +62,13 @@ typedef struct _GUPnPResourceFactoryPrivate GUPnPResourceFactoryPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPResourceFactory { GObject parent; GUPnPResourceFactoryPrivate *priv; -} GUPnPResourceFactory; +}; -typedef struct { +struct _GUPnPResourceFactoryClass { GObjectClass parent_class; /* future padding */ @@ -74,7 +76,7 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPResourceFactoryClass; +}; GUPnPResourceFactory * gupnp_resource_factory_new (void); diff --git a/libgupnp/gupnp-root-device.c b/libgupnp/gupnp-root-device.c index 2cdbad1..1e46798 100644 --- a/libgupnp/gupnp-root-device.c +++ b/libgupnp/gupnp-root-device.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -65,6 +65,7 @@ gupnp_root_device_finalize (GObject *object) device = GUPNP_ROOT_DEVICE (object); + g_object_unref (device->priv->description_doc); g_free (device->priv->description_path); g_free (device->priv->description_dir); g_free (device->priv->relative_location); @@ -87,11 +88,6 @@ gupnp_root_device_dispose (GObject *object) device->priv->group = NULL; } - if (device->priv->description_doc) { - g_object_unref (device->priv->description_doc); - device->priv->description_doc = NULL; - } - /* Call super */ object_class = G_OBJECT_CLASS (gupnp_root_device_parent_class); object_class->dispose (object); @@ -408,7 +404,11 @@ gupnp_root_device_constructor (GType type, device = GUPNP_ROOT_DEVICE (object); /* Generate location relative to HTTP root */ - device->priv->relative_location = g_strdup_printf ("RootDevice%p.xml", object); + udn = gupnp_device_info_get_udn (GUPNP_DEVICE_INFO (device)); + if (udn && strstr (udn, "uuid:") == udn) + device->priv->relative_location = g_strdup_printf ("%s.xml", udn + 5); + else + device->priv->relative_location = g_strdup_printf ("RootDevice%p.xml", device); relative_location = g_strjoin (NULL, "/", @@ -445,7 +445,6 @@ gupnp_root_device_constructor (GType type, device->priv->group = gssdp_resource_group_new (GSSDP_CLIENT (context)); /* Add services and devices to resource group */ - udn = gupnp_device_info_get_udn (GUPNP_DEVICE_INFO (device)); usn = g_strdup_printf ("%s::upnp:rootdevice", (const char *) udn); gssdp_resource_group_add_resource_simple (device->priv->group, "upnp:rootdevice", @@ -457,6 +456,7 @@ gupnp_root_device_constructor (GType type, DONE: /* Cleanup */ + g_free (desc_path); g_free (location); return object; @@ -552,7 +552,7 @@ gupnp_root_device_class_init (GUPnPRootDeviceClass *klass) } /** - * gupnp_root_device_new + * gupnp_root_device_new: * @context: The #GUPnPContext * @description_path: Path to device description document. This could either * be an absolute path or path relative to @description_dir. @@ -698,3 +698,19 @@ gupnp_root_device_get_description_dir (GUPnPRootDevice *root_device) return root_device->priv->description_dir; } + +/** + * gupnp_root_device_get_ssdp_resource_group: + * @root_device: A #GUPnPRootDevice + * + * Get the #GSSDPResourceGroup used by @root_device. + * + * Returns: (transfer none): The #GSSDPResourceGroup of @root_device. + **/ +GSSDPResourceGroup * +gupnp_root_device_get_ssdp_resource_group (GUPnPRootDevice *root_device) +{ + g_return_val_if_fail (GUPNP_IS_ROOT_DEVICE (root_device), NULL); + + return root_device->priv->group; +} diff --git a/libgupnp/gupnp-root-device.h b/libgupnp/gupnp-root-device.h index 3f6ed64..0c08791 100644 --- a/libgupnp/gupnp-root-device.h +++ b/libgupnp/gupnp-root-device.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_ROOT_DEVICE_H__ @@ -24,6 +24,8 @@ #include +#include + #include "gupnp-context.h" #include "gupnp-device.h" #include "gupnp-resource-factory.h" @@ -56,6 +58,8 @@ gupnp_root_device_get_type (void) G_GNUC_CONST; GUPnPRootDeviceClass)) typedef struct _GUPnPRootDevicePrivate GUPnPRootDevicePrivate; +typedef struct _GUPnPRootDevice GUPnPRootDevice; +typedef struct _GUPnPRootDeviceClass GUPnPRootDeviceClass; /** * GUPnPRootDevice: @@ -63,13 +67,13 @@ typedef struct _GUPnPRootDevicePrivate GUPnPRootDevicePrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPRootDevice { GUPnPDevice parent; GUPnPRootDevicePrivate *priv; -} GUPnPRootDevice; +}; -typedef struct { +struct _GUPnPRootDeviceClass { GUPnPDeviceClass parent_class; /* future padding */ @@ -77,7 +81,7 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPRootDeviceClass; +}; GUPnPRootDevice * gupnp_root_device_new (GUPnPContext *context, @@ -110,6 +114,10 @@ const char * gupnp_root_device_get_description_dir (GUPnPRootDevice *root_device); +GSSDPResourceGroup * +gupnp_root_device_get_ssdp_resource_group + (GUPnPRootDevice *root_device); + G_END_DECLS #endif /* __GUPNP_ROOT_DEVICE_H__ */ diff --git a/libgupnp/gupnp-service-info.c b/libgupnp/gupnp-service-info.c index 6ce9c44..1da6c19 100644 --- a/libgupnp/gupnp-service-info.c +++ b/libgupnp/gupnp-service-info.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -118,11 +118,7 @@ gupnp_service_info_set_property (GObject *object, info->priv->service_type = g_value_dup_string (value); break; case PROP_URL_BASE: - info->priv->url_base = g_value_get_pointer (value); - if (info->priv->url_base) - info->priv->url_base = - soup_uri_copy (info->priv->url_base); - + info->priv->url_base = g_value_dup_boxed (value); break; case PROP_DOCUMENT: info->priv->doc = g_value_dup_object (value); @@ -164,8 +160,8 @@ gupnp_service_info_get_property (GObject *object, gupnp_service_info_get_service_type (info)); break; case PROP_URL_BASE: - g_value_set_pointer (value, - info->priv->url_base); + g_value_set_boxed (value, + info->priv->url_base); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -195,7 +191,6 @@ gupnp_service_info_dispose (GObject *object) data->message, SOUP_STATUS_CANCELLED); - g_object_unref (data->message); get_scpd_url_data_free (data); info->priv->pending_gets = @@ -302,7 +297,7 @@ gupnp_service_info_class_init (GUPnPServiceInfoClass *klass) G_PARAM_STATIC_BLURB)); /** - * GUPnPServiceInfo:service-type + * GUPnPServiceInfo:service-type: * * The service type. **/ @@ -327,14 +322,15 @@ gupnp_service_info_class_init (GUPnPServiceInfoClass *klass) g_object_class_install_property (object_class, PROP_URL_BASE, - g_param_spec_pointer ("url-base", - "URL base", - "The URL base", - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | - G_PARAM_STATIC_BLURB)); + g_param_spec_boxed ("url-base", + "URL base", + "The URL base", + SOUP_TYPE_URI, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); /** * GUPnPServiceInfo:document: @@ -384,7 +380,7 @@ gupnp_service_info_class_init (GUPnPServiceInfoClass *klass) * * Get the #GUPnPContext associated with @info. * - * Returns: A #GUPnPContext. + * Returns: (transfer none): A #GUPnPContext. **/ GUPnPContext * gupnp_service_info_get_context (GUPnPServiceInfo *info) @@ -620,9 +616,9 @@ gupnp_service_info_get_introspection (GUPnPServiceInfo *info, * SCPD URL downloaded. */ static void -got_scpd_url (SoupSession *session, - SoupMessage *msg, - GetSCPDURLData *data) +got_scpd_url (G_GNUC_UNUSED SoupSession *session, + SoupMessage *msg, + GetSCPDURLData *data) { GUPnPServiceIntrospection *introspection; GError *error; diff --git a/libgupnp/gupnp-service-info.h b/libgupnp/gupnp-service-info.h index 2ef8adb..c81c29e 100644 --- a/libgupnp/gupnp-service-info.h +++ b/libgupnp/gupnp-service-info.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_SERVICE_INFO_H__ @@ -56,6 +56,8 @@ gupnp_service_info_get_type (void) G_GNUC_CONST; GUPnPServiceInfoClass)) typedef struct _GUPnPServiceInfoPrivate GUPnPServiceInfoPrivate; +typedef struct _GUPnPServiceInfo GUPnPServiceInfo; +typedef struct _GUPnPServiceInfoClass GUPnPServiceInfoClass; /** * GUPnPServiceInfo: @@ -63,13 +65,13 @@ typedef struct _GUPnPServiceInfoPrivate GUPnPServiceInfoPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPServiceInfo { GObject parent; GUPnPServiceInfoPrivate *priv; -} GUPnPServiceInfo; +}; -typedef struct { +struct _GUPnPServiceInfoClass { GObjectClass parent_class; /* future padding */ @@ -77,10 +79,10 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPServiceInfoClass; +}; /** - * GUPnPServiceIntrospectionCallback + * GUPnPServiceIntrospectionCallback: * @info: The #GUPnPServiceInfo introspection was requested for * @introspection: The new #GUPnPServiceIntrospection object, or NULL * @error: The #GError that occurred, or NULL diff --git a/libgupnp/gupnp-service-introspection-private.h b/libgupnp/gupnp-service-introspection-private.h index e7f5a58..9a57a73 100644 --- a/libgupnp/gupnp-service-introspection-private.h +++ b/libgupnp/gupnp-service-introspection-private.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_SERVICE_INTROSPECTION_PRIVATE_H__ diff --git a/libgupnp/gupnp-service-introspection.c b/libgupnp/gupnp-service-introspection.c index 8fac331..ebcc7a2 100644 --- a/libgupnp/gupnp-service-introspection.c +++ b/libgupnp/gupnp-service-introspection.c @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -445,7 +445,7 @@ set_variable_type (GUPnPServiceStateVariableInfo *variable, } if (type == G_TYPE_INVALID) { - g_warning ("Unkown type '%s' in the SCPD", data_type); + g_warning ("Unknown type '%s' in the SCPD", data_type); return FALSE; } @@ -786,7 +786,7 @@ gupnp_service_introspection_list_action_names * Returns a #GList of all the actions (of type #GUPnPServiceActionInfo) in * this service. * - * Return value: (element-type GUPnP.ServiceActionInfo*) (transfer none): A + * Return value: (element-type GUPnP.ServiceActionInfo) (transfer none): A * #GList of all the actions or %NULL. Do not modify or free it or its * contents. **/ @@ -851,11 +851,12 @@ state_variable_search_func (GUPnPServiceStateVariableInfo *variable, /** * gupnp_service_introspection_get_state_variable: * @introspection: A #GUPnPServiceIntrospection - * @variable_name: The name of the variable to retreive + * @variable_name: The name of the variable to retrieve * * Returns the state variable by the name @variable_name in this service. * - * Return value: the state variable or %NULL. Do not modify or free it. + * Return value: (transfer none): the state variable or %NULL. Do not modify or + * free it. **/ const GUPnPServiceStateVariableInfo * gupnp_service_introspection_get_state_variable @@ -887,7 +888,7 @@ action_search_func (GUPnPServiceActionInfo *action, /** * gupnp_service_introspection_get_action: * @introspection: A #GUPnPServiceIntrospection - * @action_name: The name of the action to retreive + * @action_name: The name of the action to retrieve * * Returns the action by the name @action_name in this service. * diff --git a/libgupnp/gupnp-service-introspection.h b/libgupnp/gupnp-service-introspection.h index 6d1b734..54d9e90 100644 --- a/libgupnp/gupnp-service-introspection.h +++ b/libgupnp/gupnp-service-introspection.h @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_SERVICE_INTROSPECTION_H__ @@ -53,7 +53,7 @@ gupnp_service_introspection_get_type (void) G_GNUC_CONST; GUPnPServiceIntrospectionClass)) /** - * GUPnPServiceActionArgDirection + * GUPnPServiceActionArgDirection: * @GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN: An "in" variable, to the service. * @GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT: An "out" variable, from the service. * @@ -85,7 +85,7 @@ typedef struct { /** * GUPnPServiceActionInfo: * @name: The name of the action argument. - * @arguments: A GList of all the arguments + * @arguments: (type GList) (element-type GUPnP.ServiceActionArgInfo):A GList of all the arguments * (of type #GUPnPServiceActionArgInfo) of this action. * * This structure contains information about a service action. @@ -109,7 +109,7 @@ typedef struct { * data types. * @step: The step value of this state variable. Only applies to numeric * data types. - * @allowed_values: The allowed values of this state variable. Only applies to + * @allowed_values: (element-type utf8): The allowed values of this state variable. Only applies to * string data types. Unlike the other fields in this structure, this field * contains a list of (char *) strings rather than GValues. * @@ -129,6 +129,10 @@ typedef struct { typedef struct _GUPnPServiceIntrospectionPrivate GUPnPServiceIntrospectionPrivate; +typedef struct _GUPnPServiceIntrospection + GUPnPServiceIntrospection; +typedef struct _GUPnPServiceIntrospectionClass + GUPnPServiceIntrospectionClass; /** * GUPnPServiceIntrospection: @@ -136,15 +140,15 @@ typedef struct _GUPnPServiceIntrospectionPrivate * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPServiceIntrospection { GObject parent; GUPnPServiceIntrospectionPrivate *priv; -} GUPnPServiceIntrospection; +}; -typedef struct { +struct _GUPnPServiceIntrospectionClass { GObjectClass parent_class; -} GUPnPServiceIntrospectionClass; +}; const GList * gupnp_service_introspection_list_action_names diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c index 4236965..10da9ac 100644 --- a/libgupnp/gupnp-service-proxy.c +++ b/libgupnp/gupnp-service-proxy.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -32,6 +32,7 @@ #include #include #include +#include #include "gupnp-service-proxy.h" #include "gupnp-context-private.h" @@ -57,7 +58,7 @@ struct _GUPnPServiceProxyPrivate { char *sid; /* Subscription ID */ GSource *subscription_timeout_src; - int seq; /* Event sequence number */ + guint32 seq; /* Event sequence number */ GHashTable *notify_hash; @@ -90,9 +91,6 @@ struct _GUPnPServiceProxyAction { GError *error; /* If non-NULL, description of error that occurred when preparing message */ - - va_list var_args; /* The va_list after begin_action_valist has - gone through it. Used by send_action_valist(). */ }; typedef struct { @@ -108,7 +106,7 @@ typedef struct { typedef struct { char *sid; - int seq; + guint32 seq; xmlDoc *doc; } EmitNotifyData; @@ -145,7 +143,7 @@ notify_data_free (NotifyData *data) /* Steals doc reference */ static EmitNotifyData * emit_notify_data_new (const char *sid, - int seq, + guint32 seq, xmlDoc *doc) { EmitNotifyData *data; @@ -283,14 +281,14 @@ gupnp_service_proxy_dispose (GObject *object) g_source_destroy (proxy->priv->notify_idle_src); proxy->priv->notify_idle_src = NULL; } - + while (proxy->priv->pending_notifies) { emit_notify_data_free (proxy->priv->pending_notifies->data); proxy->priv->pending_notifies = g_list_delete_link (proxy->priv->pending_notifies, proxy->priv->pending_notifies); } - + /* Call super */ object_class = G_OBJECT_CLASS (gupnp_service_proxy_parent_class); object_class->dispose (object); @@ -348,7 +346,7 @@ gupnp_service_proxy_class_init (GUPnPServiceProxyClass *klass) /** * GUPnPServiceProxy::subscription-lost: * @proxy: The #GUPnPServiceProxy that received the signal - * @error: A pointer to a #GError describing why the subscription has + * @error: (type GError):A pointer to a #GError describing why the subscription has * been lost * * Emitted whenever the subscription to this service has been lost due @@ -373,7 +371,7 @@ gupnp_service_proxy_class_init (GUPnPServiceProxyClass *klass) * @proxy: A #GUPnPServiceProxy * @action: An action * @error: The location where to store any error, or %NULL - * @Varargs: tuples of in parameter name, in parameter type, and in parameter + * @...: tuples of in parameter name, in parameter type, and in parameter * value, followed by %NULL, and then tuples of out parameter name, * out parameter type, and out parameter value location, terminated with %NULL * @@ -403,13 +401,142 @@ gupnp_service_proxy_send_action (GUPnPServiceProxy *proxy, } static void -stop_main_loop (GUPnPServiceProxy *proxy, - GUPnPServiceProxyAction *action, - gpointer user_data) +stop_main_loop (G_GNUC_UNUSED GUPnPServiceProxy *proxy, + G_GNUC_UNUSED GUPnPServiceProxyAction *action, + gpointer user_data) { g_main_loop_quit ((GMainLoop *) user_data); } +/* This is a skip variant of G_VALUE_LCOPY, same as there is + * G_VALUE_COLLECT_SKIP for G_VALUE_COLLECT. + */ +#define VALUE_LCOPY_SKIP(value_type, var_args) \ + G_STMT_START { \ + GTypeValueTable *_vtable = g_type_value_table_peek (value_type); \ + const gchar *_lcopy_format = _vtable->lcopy_format; \ + \ + while (*_lcopy_format) { \ + switch (*_lcopy_format++) { \ + case G_VALUE_COLLECT_INT: \ + va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ + } G_STMT_END + +/* Initializes hash table to hold arg names as keys and GValues of + * given type, but without any specific value. Note that if you are + * going to use OUT_HASH_TABLE_TO_VAR_ARGS then you have to store a + * copy of var_args with G_VA_COPY before using this macro. + */ +#define VAR_ARGS_TO_OUT_HASH_TABLE(var_args, hash) \ + G_STMT_START { \ + const gchar *arg_name = va_arg (var_args, const gchar *); \ + \ + while (arg_name != NULL) { \ + GValue *value = g_new0 (GValue, 1); \ + GType type = va_arg (var_args, GType); \ + \ + VALUE_LCOPY_SKIP (type, var_args); \ + g_value_init (value, type); \ + g_hash_table_insert (hash, g_strdup (arg_name), value); \ + arg_name = va_arg (var_args, const gchar *); \ + } \ + } G_STMT_END + +/* Initializes hash table to hold arg names as keys and GValues of + * given type and value. + */ +#define VAR_ARGS_TO_IN_LIST(var_args, names, values) \ + G_STMT_START { \ + const gchar *arg_name = va_arg (var_args, const gchar *); \ + \ + while (arg_name != NULL) { \ + GValue *value = g_new0 (GValue, 1); \ + gchar *error = NULL; \ + GType type = va_arg (var_args, GType); \ + \ + G_VALUE_COLLECT_INIT (value, \ + type, \ + var_args, \ + G_VALUE_NOCOPY_CONTENTS, \ + &error); \ + if (error == NULL) { \ + names = g_list_prepend (names, g_strdup (arg_name)); \ + values = g_list_prepend (values, value); \ + } else { \ + g_warning ("Failed to collect value of type %s for %s: %s", \ + g_type_name (type), \ + arg_name, \ + error); \ + g_free (error); \ + } \ + arg_name = va_arg (var_args, const gchar *); \ + } \ + names = g_list_reverse (names); \ + values = g_list_reverse (values); \ + } G_STMT_END + +/* Puts values stored in hash table with GValues into var args. + */ +#define OUT_HASH_TABLE_TO_VAR_ARGS(hash, var_args) \ + G_STMT_START { \ + const gchar *arg_name = va_arg (var_args, const gchar *); \ + \ + while (arg_name != NULL) { \ + GValue *value = g_hash_table_lookup (hash, arg_name); \ + GType type = va_arg (var_args, GType); \ + \ + if (value == NULL) { \ + g_warning ("No value for %s", arg_name); \ + G_VALUE_COLLECT_SKIP (type, var_args); \ + } else if (G_VALUE_TYPE (value) != type) { \ + g_warning ("Different GType in value (%s) and in var args (%s) for %s.", \ + G_VALUE_TYPE_NAME (value), \ + g_type_name (type), \ + arg_name); \ + } else { \ + gchar *error = NULL; \ + \ + G_VALUE_LCOPY (value, var_args, 0, &error); \ + if (error != NULL) { \ + g_warning ("Failed to lcopy the value of type %s for %s: %s", \ + g_type_name (type), \ + arg_name, \ + error); \ + g_free (error); \ + } \ + } \ + arg_name = va_arg (var_args, const gchar *); \ + } \ + } G_STMT_END + +/* GDestroyNotify for GHashTable holding GValues. + */ +static void +value_free (gpointer data) +{ + GValue *value = (GValue *) data; + + g_value_unset (value); + g_free (value); +} + /** * gupnp_service_proxy_send_action_valist: * @proxy: A #GUPnPServiceProxy @@ -419,8 +546,7 @@ stop_main_loop (GUPnPServiceProxy *proxy, * parameter value, followed by %NULL, and then tuples of out parameter name, * out parameter type, and out parameter value location * - * See gupnp_service_proxy_send_action(); this version takes a va_list for - * use by language bindings. + * See gupnp_service_proxy_send_action(). * * Return value: %TRUE if sending the action was succesful. **/ @@ -430,23 +556,42 @@ gupnp_service_proxy_send_action_valist (GUPnPServiceProxy *proxy, GError **error, va_list var_args) { - GUPnPContext *context; - GMainContext *main_context; + GList *in_names = NULL, *in_values = NULL; + GHashTable *out_hash = NULL; + va_list var_args_copy; + gboolean result; + GError *local_error; GMainLoop *main_loop; GUPnPServiceProxyAction *handle; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE); g_return_val_if_fail (action, FALSE); - context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (proxy)); - main_context = gssdp_client_get_main_context (GSSDP_CLIENT (context)); - main_loop = g_main_loop_new (main_context, TRUE); - handle = gupnp_service_proxy_begin_action_valist (proxy, - action, - stop_main_loop, - main_loop, - var_args); + main_loop = g_main_loop_new (g_main_context_get_thread_default (), + TRUE); + + VAR_ARGS_TO_IN_LIST (var_args, in_names, in_values); + G_VA_COPY (var_args_copy, var_args); + out_hash = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + value_free); + VAR_ARGS_TO_OUT_HASH_TABLE (var_args, out_hash); + + local_error = NULL; + handle = gupnp_service_proxy_begin_action_list (proxy, + action, + in_names, + in_values, + stop_main_loop, + main_loop); + if (!handle) { + g_main_loop_unref (main_loop); + result = FALSE; + + goto out; + } /* Loop till we get a reply (or time out) */ if (g_main_loop_is_running (main_loop)) @@ -454,13 +599,23 @@ gupnp_service_proxy_send_action_valist (GUPnPServiceProxy *proxy, g_main_loop_unref (main_loop); - if (!gupnp_service_proxy_end_action_valist (proxy, - handle, - error, - handle->var_args)) - return FALSE; + result = gupnp_service_proxy_end_action_hash (proxy, + handle, + &local_error, + out_hash); - return TRUE; + if (local_error == NULL) { + OUT_HASH_TABLE_TO_VAR_ARGS (out_hash, var_args_copy); + } else { + g_propagate_error (error, local_error); + } +out: + va_end (var_args_copy); + g_list_free_full (in_names, g_free); + g_list_free_full (in_values, value_free); + g_hash_table_unref (out_hash); + + return result; } /** @@ -485,17 +640,14 @@ gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy, GHashTable *in_hash, GHashTable *out_hash) { - GUPnPContext *context; - GMainContext *main_context; GMainLoop *main_loop; GUPnPServiceProxyAction *handle; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE); g_return_val_if_fail (action, FALSE); - context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (proxy)); - main_context = gssdp_client_get_main_context (GSSDP_CLIENT (context)); - main_loop = g_main_loop_new (main_context, TRUE); + main_loop = g_main_loop_new (g_main_context_get_thread_default (), + TRUE); handle = gupnp_service_proxy_begin_action_hash (proxy, action, @@ -554,17 +706,14 @@ gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy, GList *out_types, GList **out_values) { - GUPnPContext *context; - GMainContext *main_context; GMainLoop *main_loop; GUPnPServiceProxyAction *handle; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE); g_return_val_if_fail (action, FALSE); - context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (proxy)); - main_context = gssdp_client_get_main_context (GSSDP_CLIENT (context)); - main_loop = g_main_loop_new (main_context, TRUE); + main_loop = g_main_loop_new (g_main_context_get_thread_default (), + TRUE); handle = gupnp_service_proxy_begin_action_list (proxy, action, @@ -602,7 +751,7 @@ gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy, * @callback: (scope async): The callback to call when sending the action has succeeded * or failed * @user_data: User data for @callback - * @Varargs: tuples of in parameter name, in parameter type, and in parameter + * @...: tuples of in parameter name, in parameter type, and in parameter * value, terminated with %NULL * * Sends action @action with parameters @Varargs to the service exposed by @@ -610,7 +759,7 @@ gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy, * gupnp_service_proxy_end_action() to check for errors, to retrieve return * values, and to free the #GUPnPServiceProxyAction. * - * Return value: A #GUPnPServiceProxyAction handle. This will be freed when + * Returns: (transfer none): A #GUPnPServiceProxyAction handle. This will be freed when * gupnp_service_proxy_cancel_action() or * gupnp_service_proxy_end_action_valist(). **/ @@ -700,6 +849,10 @@ begin_action_msg (GUPnPServiceProxy *proxy, /* Specify language */ http_request_set_accept_language (ret->msg); + /* Accept gzip encoding */ + soup_message_headers_append (ret->msg->request_headers, + "Accept-Encoding", "gzip"); + /* Set up envelope */ ret->msg_str = xml_util_new_string (); @@ -783,7 +936,7 @@ finish_action_msg (GUPnPServiceProxyAction *action, ""); soup_message_set_request (action->msg, - "text/xml; charset=utf-8", + "text/xml; charset=\"utf-8\"", SOUP_MEMORY_TAKE, action->msg_str->str, action->msg_str->len); @@ -827,10 +980,9 @@ write_in_parameter (const char *arg_name, * @var_args: A va_list of tuples of in parameter name, in parameter type, and * in parameter value * - * See gupnp_service_proxy_begin_action(); this version takes a va_list for - * use by language bindings. + * See gupnp_service_proxy_begin_action(). * - * Return value: A #GUPnPServiceProxyAction handle. This will + * Returns: (transfer none): A #GUPnPServiceProxyAction handle. This will * be freed when calling gupnp_service_proxy_cancel_action() or * gupnp_service_proxy_end_action_valist(). **/ @@ -842,58 +994,22 @@ gupnp_service_proxy_begin_action_valist gpointer user_data, va_list var_args) { - const char *arg_name; GUPnPServiceProxyAction *ret; + GList *in_names = NULL, *in_values = NULL; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), NULL); g_return_val_if_fail (action, NULL); g_return_val_if_fail (callback, NULL); - /* Create message */ - ret = begin_action_msg (proxy, action, callback, user_data); - - if (ret->error) { - callback (proxy, ret, user_data); - - return ret; - } - - /* Arguments */ - arg_name = va_arg (var_args, const char *); - while (arg_name) { - GType arg_type; - GValue value = { 0, }; - char *collect_error = NULL; - - arg_type = va_arg (var_args, GType); - g_value_init (&value, arg_type); - - G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, - &collect_error); - if (!collect_error) { - write_in_parameter (arg_name, &value, ret->msg_str); - - g_value_unset (&value); - - } else { - g_warning ("Error collecting value: %s\n", - collect_error); - - g_free (collect_error); - - /* we purposely leak the value here, it might not be - * in a sane state if an error condition occoured - */ - } - - arg_name = va_arg (var_args, const char *); - } - - /* Finish and send off */ - finish_action_msg (ret, action); - - /* Save the current position in the va_list for send_action_valist() */ - G_VA_COPY (ret->var_args, var_args); + VAR_ARGS_TO_IN_LIST (var_args, in_names, in_values); + ret = gupnp_service_proxy_begin_action_list (proxy, + action, + in_names, + in_values, + callback, + user_data); + g_list_free_full (in_names, g_free); + g_list_free_full (in_values, value_free); return ret; } @@ -972,7 +1088,7 @@ gupnp_service_proxy_begin_action_list * @callback: (scope async): The callback to call when sending the action has succeeded * or failed * @user_data: User data for @callback - * @hash: A #GHashTable of in parameter name and #GValue pairs + * @hash: (element-type utf8 GValue): A #GHashTable of in parameter name and #GValue pairs * * See gupnp_service_proxy_begin_action(); this version takes a #GHashTable * for runtime generated parameter lists. @@ -1018,7 +1134,7 @@ gupnp_service_proxy_begin_action_hash * @proxy: A #GUPnPServiceProxy * @action: A #GUPnPServiceProxyAction handle * @error: The location where to store any error, or %NULL - * @Varargs: tuples of out parameter name, out parameter type, and out parameter + * @...: tuples of out parameter name, out parameter type, and out parameter * value location, terminated with %NULL. The out parameter values should be * freed after use * @@ -1050,10 +1166,10 @@ gupnp_service_proxy_end_action (GUPnPServiceProxy *proxy, /* Checks an action response for errors and returns the parsed * xmlDoc object. */ static xmlDoc * -check_action_response (GUPnPServiceProxy *proxy, - GUPnPServiceProxyAction *action, - xmlNode **params, - GError **error) +check_action_response (G_GNUC_UNUSED GUPnPServiceProxy *proxy, + GUPnPServiceProxyAction *action, + xmlNode **params, + GError **error) { xmlDoc *response; int code; @@ -1208,8 +1324,7 @@ read_out_parameter (const char *arg_name, * and out parameter value location. The out parameter values should be * freed after use * - * See gupnp_service_proxy_end_action(); this version takes a va_list for - * use by language bindings. + * See gupnp_service_proxy_end_action(). * * Return value: %TRUE on success. **/ @@ -1219,66 +1334,36 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy *proxy, GError **error, va_list var_args) { - xmlDoc *response; - xmlNode *params; - const char *arg_name; + GHashTable *out_hash; + va_list var_args_copy; + gboolean result; + GError *local_error; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE); g_return_val_if_fail (action, FALSE); g_return_val_if_fail (proxy == action->proxy, FALSE); - /* Check for saved error from begin_action() */ - if (action->error) { - if (error) - *error = action->error; - else - g_error_free (action->error); - - gupnp_service_proxy_action_free (action); - - return FALSE; - } - - /* Check response for errors and do initial parsing */ - response = check_action_response (proxy, action, ¶ms, error); - if (response == NULL) { - gupnp_service_proxy_action_free (action); - - return FALSE; - } - - /* Arguments */ - arg_name = va_arg (var_args, const char *); - while (arg_name) { - GType arg_type; - GValue value = { 0, }; - char *copy_error = NULL; - - arg_type = va_arg (var_args, GType); - - g_value_init (&value, arg_type); - - read_out_parameter (arg_name, &value, params); - - G_VALUE_LCOPY (&value, var_args, 0, ©_error); - - g_value_unset (&value); - - if (copy_error) { - g_warning ("Error copying value: %s", copy_error); - - g_free (copy_error); - } + out_hash = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + value_free); + G_VA_COPY (var_args_copy, var_args); + VAR_ARGS_TO_OUT_HASH_TABLE (var_args, out_hash); + local_error = NULL; + result = gupnp_service_proxy_end_action_hash (proxy, + action, + &local_error, + out_hash); - arg_name = va_arg (var_args, const char *); + if (local_error == NULL) { + OUT_HASH_TABLE_TO_VAR_ARGS (out_hash, var_args_copy); + } else { + g_propagate_error (error, local_error); } + va_end (var_args_copy); + g_hash_table_unref (out_hash); - /* Cleanup */ - gupnp_service_proxy_action_free (action); - - xmlFreeDoc (response); - - return TRUE; + return result; } /** @@ -1298,7 +1383,7 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy *proxy, * in @out_values must be freed using #g_list_free and each element in it using * #g_value_unset and #g_slice_free. * - * Return value : %TRUE on success. + * Returns: %TRUE on success. **/ gboolean gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy, @@ -1524,11 +1609,15 @@ gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy, * gupnp_service_proxy_remove_notify: * @proxy: A #GUPnPServiceProxy * @variable: The variable to add notification for - * @callback: The callback to call when @variable changes + * @callback: (scope call): The callback to call when @variable changes * @user_data: User data for @callback * * Cancels the variable change notification for @callback and @user_data. * + * This function must not be called directly or indirectly from a + * #GUPnPServiceProxyNotifyCallback associated with this service proxy, even + * if it is for another variable. + * * Return value: %TRUE on success. **/ gboolean @@ -1572,7 +1661,7 @@ gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy, if (data->callbacks == NULL) { /* No callbacks left: Remove from hash */ g_hash_table_remove (proxy->priv->notify_hash, - data); + variable); } found = TRUE; @@ -1674,14 +1763,19 @@ emit_notifications (gpointer user_data) emit_notify_data = pending_notify->data; if (emit_notify_data->seq > proxy->priv->seq) { - /* Oops, we missed a notify. Resubscribe .. */ + /* Error procedure on missed event according to + * UDA 1.0, section 4.2, §5: + * Re-subscribe to get a new SID and SEQ */ resubscribe = TRUE; break; } /* Increment our own event sequence number */ - if (proxy->priv->seq < G_MAXINT32) + /* UDA 1.0, section 4.2, §3: To prevent overflow, SEQ is set to + * 1, NOT 0, when encountering G_MAXUINT32. SEQ == 0 always + * indicates the initial event message. */ + if (proxy->priv->seq < G_MAXUINT32) proxy->priv->seq++; else proxy->priv->seq = 1; @@ -1718,16 +1812,17 @@ emit_notifications (gpointer user_data) * message with our SID. */ static void -server_handler (SoupServer *soup_server, - SoupMessage *msg, - const char *server_path, - GHashTable *query, - SoupClientContext *soup_client, - gpointer user_data) +server_handler (G_GNUC_UNUSED SoupServer *soup_server, + SoupMessage *msg, + G_GNUC_UNUSED const char *server_path, + G_GNUC_UNUSED GHashTable *query, + G_GNUC_UNUSED SoupClientContext *soup_client, + gpointer user_data) { GUPnPServiceProxy *proxy; - const char *hdr; - int seq; + const char *hdr, *nt, *nts; + guint32 seq; + guint64 seq_parsed; xmlDoc *doc; xmlNode *node; EmitNotifyData *emit_notify_data; @@ -1741,17 +1836,18 @@ server_handler (SoupServer *soup_server, return; } - hdr = soup_message_headers_get_one (msg->request_headers, "NT"); - if (hdr == NULL || strcmp (hdr, "upnp:event") != 0) { - /* Proper NT header lacking */ - soup_message_set_status (msg, SOUP_STATUS_PRECONDITION_FAILED); + nt = soup_message_headers_get_one (msg->request_headers, "NT"); + nts = soup_message_headers_get_one (msg->request_headers, "NTS"); + if (nt == NULL || nts == NULL) { + /* Required header is missing */ + soup_message_set_status (msg, SOUP_STATUS_BAD_REQUEST); return; } - hdr = soup_message_headers_get_one (msg->request_headers, "NTS"); - if (hdr == NULL || strcmp (hdr, "upnp:propchange") != 0) { - /* Proper NTS header lacking */ + if (strcmp (nt, "upnp:event") != 0 || + strcmp (nts, "upnp:propchange") != 0) { + /* Unexpected header content */ soup_message_set_status (msg, SOUP_STATUS_PRECONDITION_FAILED); return; @@ -1765,10 +1861,21 @@ server_handler (SoupServer *soup_server, return; } - seq = atoi (hdr); + errno = 0; + seq_parsed = strtoul (hdr, NULL, 10); + if (errno != 0 || seq_parsed > G_MAXUINT32) { + /* Invalid SEQ header value */ + soup_message_set_status (msg, SOUP_STATUS_PRECONDITION_FAILED); + + return; + } + + seq = (guint32) seq_parsed; hdr = soup_message_headers_get_one (msg->request_headers, "SID"); - if (hdr == NULL) { + if (hdr == NULL || + strlen (hdr) <= strlen ("uuid:") || + strncmp (hdr, "uuid:", strlen ("uuid:")) != 0) { /* No SID */ soup_message_set_status (msg, SOUP_STATUS_PRECONDITION_FAILED); @@ -1809,23 +1916,16 @@ server_handler (SoupServer *soup_server, proxy->priv->pending_notifies = g_list_append (proxy->priv->pending_notifies, emit_notify_data); if (!proxy->priv->notify_idle_src) { - GUPnPContext *context; - GMainContext *main_context; - - context = gupnp_service_info_get_context - (GUPNP_SERVICE_INFO (proxy)); - main_context = gssdp_client_get_main_context - (GSSDP_CLIENT (context)); - proxy->priv->notify_idle_src = g_idle_source_new(); g_source_set_callback (proxy->priv->notify_idle_src, emit_notifications, proxy, NULL); - g_source_attach (proxy->priv->notify_idle_src, main_context); + g_source_attach (proxy->priv->notify_idle_src, + g_main_context_get_thread_default ()); g_source_unref (proxy->priv->notify_idle_src); } - + /* Everything went OK */ soup_message_set_status (msg, SOUP_STATUS_OK); } @@ -1906,9 +2006,9 @@ subscription_expire (gpointer user_data) * Received subscription response. */ static void -subscribe_got_response (SoupSession *session, - SoupMessage *msg, - GUPnPServiceProxy *proxy) +subscribe_got_response (G_GNUC_UNUSED SoupSession *session, + SoupMessage *msg, + GUPnPServiceProxy *proxy) { GError *error; @@ -1958,21 +2058,9 @@ subscribe_got_response (SoupSession *session, } if (strncmp (hdr, "Second-", strlen ("Second-")) == 0) { - GUPnPContext *context; - GMainContext *main_context; - - context = gupnp_service_info_get_context - (GUPNP_SERVICE_INFO (proxy)); - main_context = gssdp_client_get_main_context - (GSSDP_CLIENT (context)); - /* We have a finite timeout */ timeout = atoi (hdr + strlen ("Second-")); - /* We want to resubscribe before the subscription - * expires. */ - timeout = g_random_int_range (1, timeout / 2); - if (timeout < 0) { g_warning ("Invalid time-out specified. " "Assuming default value of %d.", @@ -1981,6 +2069,10 @@ subscribe_got_response (SoupSession *session, timeout = GENA_DEFAULT_TIMEOUT; } + /* We want to resubscribe before the subscription + * expires. */ + timeout = g_random_int_range (1, timeout / 2); + /* Add actual timeout */ proxy->priv->subscription_timeout_src = g_timeout_source_new_seconds (timeout); @@ -1989,7 +2081,7 @@ subscribe_got_response (SoupSession *session, subscription_expire, proxy, NULL); g_source_attach (proxy->priv->subscription_timeout_src, - main_context); + g_main_context_get_thread_default ()); g_source_unref (proxy->priv->subscription_timeout_src); } @@ -2123,10 +2215,8 @@ static void unsubscribe (GUPnPServiceProxy *proxy) { GUPnPContext *context; - SoupMessage *msg; SoupSession *session; SoupServer *server; - char *sub_url; context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (proxy)); @@ -2134,35 +2224,37 @@ unsubscribe (GUPnPServiceProxy *proxy) server = gupnp_context_get_server (context); soup_server_remove_handler (server, proxy->priv->path); - if (proxy->priv->sid == NULL) - return; /* No SID: nothing to unsubscribe */ + if (proxy->priv->sid != NULL) { + SoupMessage *msg; + char *sub_url; - /* Create unsubscription message */ - sub_url = gupnp_service_info_get_event_subscription_url - (GUPNP_SERVICE_INFO (proxy)); + /* Create unsubscription message */ + sub_url = gupnp_service_info_get_event_subscription_url + (GUPNP_SERVICE_INFO (proxy)); - msg = soup_message_new (GENA_METHOD_UNSUBSCRIBE, sub_url); + msg = soup_message_new (GENA_METHOD_UNSUBSCRIBE, sub_url); - g_free (sub_url); + g_free (sub_url); - if (msg != NULL) { - /* Add headers */ - soup_message_headers_append (msg->request_headers, - "SID", - proxy->priv->sid); + if (msg != NULL) { + /* Add headers */ + soup_message_headers_append (msg->request_headers, + "SID", + proxy->priv->sid); - /* And queue it */ - session = gupnp_context_get_session (context); + /* And queue it */ + session = gupnp_context_get_session (context); - soup_session_queue_message (session, msg, NULL, NULL); - } + soup_session_queue_message (session, msg, NULL, NULL); + } - /* Reset SID */ - g_free (proxy->priv->sid); - proxy->priv->sid = NULL; + /* Reset SID */ + g_free (proxy->priv->sid); + proxy->priv->sid = NULL; - /* Reset sequence number */ - proxy->priv->seq = 0; + /* Reset sequence number */ + proxy->priv->seq = 0; + } /* Remove subscription timeout */ if (proxy->priv->subscription_timeout_src) { diff --git a/libgupnp/gupnp-service-proxy.h b/libgupnp/gupnp-service-proxy.h index 445e2a3..a11057a 100644 --- a/libgupnp/gupnp-service-proxy.h +++ b/libgupnp/gupnp-service-proxy.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_SERVICE_PROXY_H__ @@ -52,6 +52,8 @@ gupnp_service_proxy_get_type (void) G_GNUC_CONST; GUPnPServiceProxyClass)) typedef struct _GUPnPServiceProxyPrivate GUPnPServiceProxyPrivate; +typedef struct _GUPnPServiceProxy GUPnPServiceProxy; +typedef struct _GUPnPServiceProxyClass GUPnPServiceProxyClass; /** * GUPnPServiceProxy: @@ -59,13 +61,13 @@ typedef struct _GUPnPServiceProxyPrivate GUPnPServiceProxyPrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPServiceProxy { GUPnPServiceInfo parent; GUPnPServiceProxyPrivate *priv; -} GUPnPServiceProxy; +}; -typedef struct { +struct _GUPnPServiceProxyClass { GUPnPServiceInfoClass parent_class; /* signals */ @@ -77,10 +79,10 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPServiceProxyClass; +}; /** - * GUPnPServiceProxyAction + * GUPnPServiceProxyAction: * * Opaque structure for holding in-progress action data. **/ diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c index 64a5ca8..459ed77 100644 --- a/libgupnp/gupnp-service.c +++ b/libgupnp/gupnp-service.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "gupnp-service.h" #include "gupnp-root-device.h" @@ -42,6 +41,12 @@ #include "xml-util.h" #include "gvalue-util.h" +#ifdef G_OS_WIN32 +#include +#else +#include +#endif + #define SUBSCRIPTION_TIMEOUT 300 /* DLNA (7.2.22.1) enforced */ G_DEFINE_TYPE (GUPnPService, @@ -98,8 +103,15 @@ typedef struct { GList *pending_messages; /* Pending SoupMessages from this subscription */ + gboolean initial_state_sent; + gboolean to_delete; } SubscriptionData; +static gboolean +subscription_data_can_delete (SubscriptionData *data) { + return data->initial_state_sent && data->to_delete; +} + static void send_initial_state (SubscriptionData *data); @@ -107,9 +119,6 @@ static SoupSession * gupnp_service_get_session (GUPnPService *service) { if (! service->priv->session) { - GUPnPContext *context = - gupnp_service_info_get_context (GUPNP_SERVICE_INFO (service)); - /* Create a dedicated session for this service to * ensure that notifications are sent in the proper * order. The session from GUPnPContext may use @@ -118,7 +127,7 @@ gupnp_service_get_session (GUPnPService *service) service->priv->session = soup_session_async_new_with_options (SOUP_SESSION_IDLE_TIMEOUT, 60, SOUP_SESSION_ASYNC_CONTEXT, - gssdp_client_get_main_context (GSSDP_CLIENT (context)), + g_main_context_get_thread_default (), SOUP_SESSION_MAX_CONNS_PER_HOST, 1, NULL); @@ -193,11 +202,14 @@ struct _GUPnPServiceAction { char *name; SoupMessage *msg; + gboolean accept_gzip; GUPnPXMLDoc *doc; xmlNode *node; GString *response_str; + + guint argument_count; }; GUPnPServiceAction * @@ -252,7 +264,6 @@ static void finalize_action (GUPnPServiceAction *action) { SoupServer *server; - char *response_body; /* Embed action->response_str in a SOAP document */ g_string_prepend (action->response_str, @@ -273,13 +284,24 @@ finalize_action (GUPnPServiceAction *action) "" ""); - response_body = g_string_free (action->response_str, FALSE); + soup_message_headers_replace (action->msg->response_headers, + "Content-Type", + "text/xml; charset=\"utf-8\""); + + if (action->accept_gzip && action->response_str->len > 1024) { + http_response_set_body_gzip (action->msg, + action->response_str->str, + action->response_str->len); + g_string_free (action->response_str, TRUE); + } else { + soup_message_body_append (action->msg->response_body, + SOUP_MEMORY_TAKE, + action->response_str->str, + action->response_str->len); + g_string_free (action->response_str, FALSE); + } - soup_message_set_response (action->msg, - "text/xml; charset=\"utf-8\"", - SOUP_MEMORY_TAKE, - response_body, - strlen (response_body)); + soup_message_headers_append (action->msg->response_headers, "Ext", ""); /* Server header on response */ soup_message_headers_append @@ -333,7 +355,7 @@ gupnp_service_action_get_locales (GUPnPServiceAction *action) /** * gupnp_service_action_get: * @action: A #GUPnPServiceAction - * @Varargs: tuples of argument name, argument type, and argument value + * @...: tuples of argument name, argument type, and argument value * location, terminated with %NULL. * * Retrieves the specified action arguments. @@ -412,7 +434,7 @@ gupnp_service_action_get_values (GUPnPServiceAction *action, GList *arg_types) { GList *arg_values; - int i; + guint i; g_return_val_if_fail (action != NULL, NULL); @@ -441,7 +463,7 @@ gupnp_service_action_get_values (GUPnPServiceAction *action, * gupnp_service_action_get_value: (skip) * @action: A #GUPnPServiceAction * @argument: The name of the argument to retrieve - * @value: The #GValue to store the value of the argument, initialized + * @value: (inout):The #GValue to store the value of the argument, initialized * to the correct type. * * Retrieves the value of @argument into @value. @@ -469,7 +491,7 @@ gupnp_service_action_get_value (GUPnPServiceAction *action, } if (!found) - g_warning ("Failed to retreive '%s' argument of '%s' action", + g_warning ("Failed to retrieve '%s' argument of '%s' action", argument, action->name); } @@ -480,13 +502,14 @@ gupnp_service_action_get_value (GUPnPServiceAction *action, * @argument: The name of the argument to retrieve * @type: The type of argument to retrieve * - * Rename To: gupnp_service_action_get_value * Retrieves the value of @argument into a GValue of type @type and returns it. * The method exists only and only to satify PyGI, please use * #gupnp_service_action_get_value and ignore this if possible. * * Return value: (transfer full): Value as #GValue associated with @action. * #g_value_unset and #g_slice_free it after usage. + * + * Rename To: gupnp_service_action_get_value **/ GValue * gupnp_service_action_get_gvalue (GUPnPServiceAction *action, @@ -504,9 +527,23 @@ gupnp_service_action_get_gvalue (GUPnPServiceAction *action, } /** + * gupnp_service_action_get_argument_count: + * @action: A #GUPnPServiceAction + * + * Get the number of IN arguments from the @action and return it. + * + * Return value: The number of IN arguments from the @action. + */ +guint +gupnp_service_action_get_argument_count (GUPnPServiceAction *action) +{ + return action->argument_count; +} + +/** * gupnp_service_action_set: * @action: A #GUPnPServiceAction - * @Varargs: tuples of return value name, return value type, and + * @...: tuples of return value name, return value type, and * actual return value, terminated with %NULL. * * Sets the specified action return values. @@ -573,8 +610,8 @@ gupnp_service_action_set_valist (GUPnPServiceAction *action, /** * gupnp_service_action_set_values: * @action: A #GUPnPServiceAction - * @arg_names: (element-type utf8) (transfer-none): A #GList of argument names - * @arg_values: (element-type GValue) (transfer-none): The #GList of values (as + * @arg_names: (element-type utf8) (transfer none): A #GList of argument names + * @arg_values: (element-type GValue) (transfer none): The #GList of values (as * #GValues) that line up with @arg_names. * * Sets the specified action return values. @@ -861,18 +898,19 @@ query_state_variable (GUPnPService *service, /* controlURL handler */ static void -control_server_handler (SoupServer *server, - SoupMessage *msg, - const char *server_path, - GHashTable *query, - SoupClientContext *soup_client, - gpointer user_data) +control_server_handler (SoupServer *server, + SoupMessage *msg, + G_GNUC_UNUSED const char *server_path, + G_GNUC_UNUSED GHashTable *query, + G_GNUC_UNUSED SoupClientContext *soup_client, + gpointer user_data) { GUPnPService *service; GUPnPContext *context; xmlDoc *doc; - xmlNode *action_node; + xmlNode *action_node, *node; const char *soap_action; + const char *accept_encoding; char *action_name; char *end; GUPnPServiceAction *action; @@ -891,6 +929,14 @@ control_server_handler (SoupServer *server, return; } + /* DLNA 7.2.5.6: Always use HTTP 1.1 */ + if (soup_message_get_http_version (msg) == SOUP_HTTP_1_0) { + soup_message_set_http_version (msg, SOUP_HTTP_1_1); + soup_message_headers_append (msg->response_headers, + "Connection", + "close"); + } + context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (service)); /* Get action name */ @@ -938,16 +984,39 @@ control_server_handler (SoupServer *server, } /* Create action structure */ - action = g_slice_new (GUPnPServiceAction); - - action->ref_count = 1; - action->name = g_strdup (action_name); - action->msg = g_object_ref (msg); - action->doc = gupnp_xml_doc_new(doc); - action->node = action_node; - action->response_str = new_action_response_str (action_name, + action = g_slice_new0 (GUPnPServiceAction); + + action->ref_count = 1; + action->name = g_strdup (action_name); + action->msg = g_object_ref (msg); + action->doc = gupnp_xml_doc_new(doc); + action->node = action_node; + action->response_str = new_action_response_str (action_name, soap_action); - action->context = g_object_ref (context); + action->context = g_object_ref (context); + action->argument_count = 0; + + for (node = action->node->children; node; node = node->next) + if (node->type == XML_ELEMENT_NODE) + action->argument_count++; + + /* Get accepted encodings */ + accept_encoding = soup_message_headers_get_list (msg->request_headers, + "Accept-Encoding"); + + if (accept_encoding) { + GSList *codings; + + codings = soup_header_parse_quality_list (accept_encoding, + NULL); + if (codings && + g_slist_find_custom (codings, "gzip", + (GCompareFunc) g_ascii_strcasecmp)) { + action->accept_gzip = TRUE; + } + + soup_header_free_list (codings); + } /* Tell soup server that response is not ready yet */ soup_server_pause_message (server, msg); @@ -1021,6 +1090,22 @@ subscription_response (GUPnPService *service, static char * generate_sid (void) { +#ifdef G_OS_WIN32 + char *ret = NULL; + UUID uuid; + RPC_STATUS stat; + stat = UuidCreate (&uuid); + if (stat == RPC_S_OK) { + unsigned char* uuidStr = NULL; + stat = UuidToString (&uuid, &uuidStr); + if (stat == RPC_S_OK) { + ret = g_strdup_printf ("uuid:%s", uuidStr); + RpcStringFree (&uuidStr); + } + } + + return ret; +#else uuid_t id; char out[39]; @@ -1028,6 +1113,7 @@ generate_sid (void) uuid_unparse (id, out); return g_strdup_printf ("uuid:%s", out); +#endif } /* Subscription expired */ @@ -1093,8 +1179,6 @@ subscribe (GUPnPService *service, { SubscriptionData *data; char *start, *end, *uri; - GUPnPContext *context; - GMainContext *main_context; data = g_slice_new0 (SubscriptionData); @@ -1136,9 +1220,8 @@ subscribe (GUPnPService *service, data, NULL); - context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (service)); - main_context = gssdp_client_get_main_context (GSSDP_CLIENT (context)); - g_source_attach (data->timeout_src, main_context); + g_source_attach (data->timeout_src, + g_main_context_get_thread_default ()); g_source_unref (data->timeout_src); @@ -1160,8 +1243,6 @@ resubscribe (GUPnPService *service, const char *sid) { SubscriptionData *data; - GUPnPContext *context; - GMainContext *main_context; data = g_hash_table_lookup (service->priv->subscriptions, sid); if (!data) { @@ -1182,9 +1263,8 @@ resubscribe (GUPnPService *service, data, NULL); - context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (service)); - main_context = gssdp_client_get_main_context (GSSDP_CLIENT (context)); - g_source_attach (data->timeout_src, main_context); + g_source_attach (data->timeout_src, + g_main_context_get_thread_default ()); g_source_unref (data->timeout_src); @@ -1198,20 +1278,28 @@ unsubscribe (GUPnPService *service, SoupMessage *msg, const char *sid) { - if (g_hash_table_remove (service->priv->subscriptions, sid)) + SubscriptionData *data; + + data = g_hash_table_lookup (service->priv->subscriptions, sid); + if (data) { + if (data->initial_state_sent) + g_hash_table_remove (service->priv->subscriptions, + sid); + else + data->to_delete = TRUE; soup_message_set_status (msg, SOUP_STATUS_OK); - else + } else soup_message_set_status (msg, SOUP_STATUS_PRECONDITION_FAILED); } /* eventSubscriptionURL handler */ static void -subscription_server_handler (SoupServer *server, - SoupMessage *msg, - const char *server_path, - GHashTable *query, - SoupClientContext *soup_client, - gpointer user_data) +subscription_server_handler (G_GNUC_UNUSED SoupServer *server, + SoupMessage *msg, + G_GNUC_UNUSED const char *server_path, + G_GNUC_UNUSED GHashTable *query, + G_GNUC_UNUSED SoupClientContext *soup_client, + gpointer user_data) { GUPnPService *service; const char *callback, *nt, *sid; @@ -1251,7 +1339,7 @@ subscription_server_handler (SoupServer *server, } else { soup_message_set_status - (msg, SOUP_STATUS_BAD_REQUEST); + (msg, SOUP_STATUS_PRECONDITION_FAILED); } @@ -1282,15 +1370,13 @@ static void got_introspection (GUPnPServiceInfo *info, GUPnPServiceIntrospection *introspection, const GError *error, - gpointer user_data) + G_GNUC_UNUSED gpointer user_data) { - GUPnPService *service; + GUPnPService *service = GUPNP_SERVICE (info); const GList *state_variables, *l; GHashTableIter iter; gpointer data; - service = GUPNP_SERVICE (user_data); - if (introspection) { state_variables = gupnp_service_introspection_list_state_variables @@ -1317,10 +1403,11 @@ got_introspection (GUPnPServiceInfo *info, g_hash_table_iter_init (&iter, service->priv->subscriptions); - while (g_hash_table_iter_next (&iter, NULL, &data)) + while (g_hash_table_iter_next (&iter, NULL, &data)) { send_initial_state ((SubscriptionData *) data); - - g_object_unref (service); + if (subscription_data_can_delete ((SubscriptionData *) data)) + g_hash_table_iter_remove (&iter); + } } static char * @@ -1361,8 +1448,7 @@ gupnp_service_constructor (GType type, /* Get introspection and save state variable names */ gupnp_service_info_get_introspection_async (info, got_introspection, - object); - g_object_ref (object); + NULL); /* Get server */ context = gupnp_service_info_get_context (info); @@ -1389,9 +1475,9 @@ gupnp_service_constructor (GType type, /* Root device availability changed. */ static void -notify_available_cb (GObject *object, - GParamSpec *pspec, - gpointer user_data) +notify_available_cb (GObject *object, + G_GNUC_UNUSED GParamSpec *pspec, + gpointer user_data) { GUPnPService *service; @@ -1590,7 +1676,7 @@ gupnp_service_class_init (GUPnPServiceClass *klass) /** * GUPnPService::action-invoked: * @service: The #GUPnPService that received the signal - * @action: The invoked #GUPnPAction + * @action: The invoked #GUPnPServiceAction * * Emitted whenever an action is invoked. Handler should process * @action and must call either gupnp_service_action_return() or @@ -1613,7 +1699,7 @@ gupnp_service_class_init (GUPnPServiceClass *klass) * GUPnPService::query-variable: * @service: The #GUPnPService that received the signal * @variable: The variable that is being queried - * @value: The location of the #GValue of the variable + * @value: (type GValue)(inout):The location of the #GValue of the variable * * Emitted whenever @service needs to know the value of @variable. * Handler should fill @value with the value of @variable. @@ -1636,8 +1722,8 @@ gupnp_service_class_init (GUPnPServiceClass *klass) /** * GUPnPService::notify-failed: * @service: The #GUPnPService that received the signal - * @callback_url: The callback URL - * @reason: A pointer to a #GError describing why the notify failed + * @callback_url: (type GList)(element-type SoupURI):A #GList of callback URLs + * @reason: (type GError): A pointer to a #GError describing why the notify failed * * Emitted whenever notification of a client fails. **/ @@ -1659,7 +1745,7 @@ gupnp_service_class_init (GUPnPServiceClass *klass) /** * gupnp_service_notify: * @service: A #GUPnPService - * @Varargs: Tuples of variable name, variable type, and variable value, + * @...: Tuples of variable name, variable type, and variable value, * terminated with %NULL. * * Notifies listening clients that the properties listed in @Varargs @@ -1725,9 +1811,9 @@ gupnp_service_notify_valist (GUPnPService *service, /* Received notify response. */ static void -notify_got_response (SoupSession *session, - SoupMessage *msg, - gpointer user_data) +notify_got_response (G_GNUC_UNUSED SoupSession *session, + SoupMessage *msg, + gpointer user_data) { SubscriptionData *data; @@ -1741,6 +1827,8 @@ notify_got_response (SoupSession *session, data->pending_messages = g_list_remove (data->pending_messages, msg); if (SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) { + data->initial_state_sent = TRUE; + /* Success: reset callbacks pointer */ data->callbacks = g_list_first (data->callbacks); @@ -1794,9 +1882,9 @@ notify_got_response (SoupSession *session, /* Send notification @user_data to subscriber @value */ static void -notify_subscriber (gpointer key, - gpointer value, - gpointer user_data) +notify_subscriber (G_GNUC_UNUSED gpointer key, + gpointer value, + gpointer user_data) { SubscriptionData *data; const char *property_set; @@ -1807,6 +1895,10 @@ notify_subscriber (gpointer key, data = value; property_set = user_data; + /* Subscriber called unsubscribe */ + if (subscription_data_can_delete (data)) + return; + /* Create message */ msg = soup_message_new (GENA_METHOD_NOTIFY, data->callbacks->data); if (!msg) { @@ -1842,13 +1934,15 @@ notify_subscriber (gpointer key, /* Add body */ soup_message_set_request (msg, - "text/xml; charset=utf-8", + "text/xml; charset=\"utf-8\"", SOUP_MEMORY_TAKE, g_strdup (property_set), strlen (property_set)); /* Queue */ data->pending_messages = g_list_prepend (data->pending_messages, msg); + soup_message_headers_append (msg->request_headers, + "Connection", "close"); session = gupnp_service_get_session (data->service); @@ -2031,9 +2125,10 @@ find_callback_by_name (GModule *module, "cb", NULL); - g_module_symbol (module, - full_name, - (gpointer) &callback); + if (!g_module_symbol (module, + full_name, + (gpointer) &callback)) + callback = NULL; } g_free (full_name); @@ -2104,8 +2199,8 @@ connect_names_to_signal_handlers (GUPnPService *service, * A convenience function that attempts to connect all possible * #GUPnPService::action-invoked and #GUPnPService::query-variable signals to * appropriate callbacks for the service @service. It uses service introspection - * and GModule's introspective features. It is very simillar to - * glade_xml_signal_autoconnect() except that it attempts to guess the names of + * and #GModule's introspective features. It is very simillar to + * gtk_builder_connect_signals() except that it attempts to guess the names of * the signal handlers on its own. * * For this function to do its magic, the application must name the callback @@ -2113,17 +2208,18 @@ connect_names_to_signal_handlers (GUPnPService *service, * off the action names and either prepend "on_" or append "_cb" to them. Same * goes for #GUPnPService::query-variable signals, except that "query_" should * be prepended to the variable name. For example, callback function for - * "GetSystemUpdateID" action should be either named as + * GetSystemUpdateID action should be either named as * "get_system_update_id_cb" or "on_get_system_update_id" and callback function * for the query of "SystemUpdateID" state variable should be named - * "query_system_update_id_cb" or "on_query_system_update_id". + * query_system_update_id_cb or + * on_query_system_update_id. * - * Note that this function will not work correctly if GModule is not supported - * on the platform or introspection is not available for service @service. + * This function will not work correctly if #GModule is not supported + * on the platform or introspection is not available for @service. * - * WARNING: This function can not and therefore does not guarantee that the + * This function can not and therefore does not guarantee that the * resulting signal connections will be correct as it depends heavily on a - * particular naming schemes described above. + * particular naming schemes described above. **/ void gupnp_service_signals_autoconnect (GUPnPService *service, diff --git a/libgupnp/gupnp-service.h b/libgupnp/gupnp-service.h index 6c5325d..ae73c89 100644 --- a/libgupnp/gupnp-service.h +++ b/libgupnp/gupnp-service.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_SERVICE_H__ @@ -53,7 +53,7 @@ gupnp_service_get_type (void) G_GNUC_CONST; GUPnPServiceClass)) /** - * GUPnPServiceAction + * GUPnPServiceAction: * * Opaque structure for holding in-progress action data. **/ @@ -65,6 +65,8 @@ gupnp_service_action_get_type (void) G_GNUC_CONST; #define GUPNP_TYPE_SERVICE_ACTION (gupnp_service_action_get_type ()) typedef struct _GUPnPServicePrivate GUPnPServicePrivate; +typedef struct _GUPnPService GUPnPService; +typedef struct _GUPnPServiceClass GUPnPServiceClass; /** * GUPnPService: @@ -72,15 +74,16 @@ typedef struct _GUPnPServicePrivate GUPnPServicePrivate; * This struct contains private data only, and should be accessed using the * functions below. */ -typedef struct { +struct _GUPnPService { GUPnPServiceInfo parent; GUPnPServicePrivate *priv; -} GUPnPService; +}; -typedef struct { +struct _GUPnPServiceClass { GUPnPServiceInfoClass parent_class; + /* */ void (* action_invoked) (GUPnPService *service, GUPnPServiceAction *action); @@ -97,12 +100,9 @@ typedef struct { void (* _gupnp_reserved2) (void); void (* _gupnp_reserved3) (void); void (* _gupnp_reserved4) (void); -} GUPnPServiceClass; +}; -GType -gupnp_service_action_get_type (void); - const char * gupnp_service_action_get_name (GUPnPServiceAction *action); @@ -161,6 +161,10 @@ gupnp_service_action_return_error (GUPnPServiceAction *action, SoupMessage * gupnp_service_action_get_message (GUPnPServiceAction *action); +guint +gupnp_service_action_get_argument_count + (GUPnPServiceAction *action); + void gupnp_service_notify (GUPnPService *service, ...) G_GNUC_NULL_TERMINATED; diff --git a/libgupnp/gupnp-simple-context-manager.c b/libgupnp/gupnp-simple-context-manager.c new file mode 100644 index 0000000..7efaf38 --- /dev/null +++ b/libgupnp/gupnp-simple-context-manager.c @@ -0,0 +1,217 @@ +/* + * Copyright (C) 2009,2011 Nokia Corporation. + * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. + * + * Author: Jens Georg + * Zeeshan Ali (Khattak) + * Jorn Baayen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:gupnp-simple-context-manager + * @short_description: Abstract implementation of basic #GUPnPContextManager. + * + */ + +#include +#include +#include +#include + +#include "gupnp-simple-context-manager.h" +#include "gupnp-context.h" + +G_DEFINE_ABSTRACT_TYPE (GUPnPSimpleContextManager, + gupnp_simple_context_manager, + GUPNP_TYPE_CONTEXT_MANAGER); + +struct _GUPnPSimpleContextManagerPrivate { + GList *contexts; /* List of GUPnPContext instances */ + + GSource *idle_context_creation_src; +}; + +static GList* +gupnp_simple_context_manager_get_interfaces (GUPnPSimpleContextManager *manager) +{ + GUPnPSimpleContextManagerClass *object_class = + GUPNP_SIMPLE_CONTEXT_MANAGER_GET_CLASS (manager); + + return object_class->get_interfaces (manager); +} + +static void +create_and_signal_context (const char *interface, + GUPnPSimpleContextManager *manager) +{ + GUPnPContext *context; + guint port; + + GError *error; + + g_object_get (manager, + "port", &port, + NULL); + + error = NULL; + context = g_initable_new (GUPNP_TYPE_CONTEXT, + NULL, + &error, + "interface", interface, + "port", port, + NULL); + if (error != NULL) { + if (!(error->domain == GSSDP_ERROR && + error->code == GSSDP_ERROR_NO_IP_ADDRESS)) + g_warning + ("Failed to create context for interface '%s': %s", + interface, + error->message); + + g_error_free (error); + + return; + } + + g_signal_emit_by_name (manager, + "context-available", + context); + + manager->priv->contexts = g_list_append (manager->priv->contexts, + context); +} + +/* + * Create a context for all network interfaces that are up. + */ +static gboolean +create_contexts (gpointer data) +{ + GUPnPSimpleContextManager *manager = (GUPnPSimpleContextManager *) data; + GList *ifaces; + + manager->priv->idle_context_creation_src = NULL; + + if (manager->priv->contexts != NULL) + return FALSE; + + ifaces = gupnp_simple_context_manager_get_interfaces (manager); + while (ifaces) { + create_and_signal_context ((char *) ifaces->data, manager); + g_free (ifaces->data); + ifaces = g_list_delete_link (ifaces, ifaces); + } + + return FALSE; +} + +static void +destroy_contexts (GUPnPSimpleContextManager *manager) +{ + while (manager->priv->contexts) { + GUPnPContext *context; + + context = GUPNP_CONTEXT (manager->priv->contexts->data); + + g_signal_emit_by_name (manager, + "context-unavailable", + context); + g_object_unref (context); + + manager->priv->contexts = g_list_delete_link + (manager->priv->contexts, + manager->priv->contexts); + } +} + +static void +schedule_contexts_creation (GUPnPSimpleContextManager *manager) +{ + manager->priv->idle_context_creation_src = NULL; + + /* Create contexts in mainloop so that is happens after user has hooked + * to the "context-available" signal. + */ + manager->priv->idle_context_creation_src = g_idle_source_new (); + g_source_attach (manager->priv->idle_context_creation_src, + g_main_context_get_thread_default ()); + g_source_set_callback (manager->priv->idle_context_creation_src, + create_contexts, + manager, + NULL); + g_source_unref (manager->priv->idle_context_creation_src); +} + +static void +gupnp_simple_context_manager_init (GUPnPSimpleContextManager *manager) +{ + manager->priv = + G_TYPE_INSTANCE_GET_PRIVATE (manager, + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER, + GUPnPSimpleContextManagerPrivate); +} + +static void +gupnp_simple_context_manager_constructed (GObject *object) +{ + GObjectClass *parent_class; + GUPnPSimpleContextManager *manager; + + manager = GUPNP_SIMPLE_CONTEXT_MANAGER (object); + schedule_contexts_creation (manager); + + /* Chain-up */ + parent_class = G_OBJECT_CLASS (gupnp_simple_context_manager_parent_class); + if (parent_class->constructed != NULL) + parent_class->constructed (object); +} + +static void +gupnp_simple_context_manager_dispose (GObject *object) +{ + GUPnPSimpleContextManager *manager; + GObjectClass *object_class; + + manager = GUPNP_SIMPLE_CONTEXT_MANAGER (object); + + destroy_contexts (manager); + + if (manager->priv->idle_context_creation_src) { + g_source_destroy (manager->priv->idle_context_creation_src); + manager->priv->idle_context_creation_src = NULL; + } + + + /* Call super */ + object_class = G_OBJECT_CLASS (gupnp_simple_context_manager_parent_class); + object_class->dispose (object); +} + +static void +gupnp_simple_context_manager_class_init (GUPnPSimpleContextManagerClass *klass) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (klass); + + object_class->constructed = gupnp_simple_context_manager_constructed; + object_class->dispose = gupnp_simple_context_manager_dispose; + + g_type_class_add_private (klass, + sizeof (GUPnPSimpleContextManagerPrivate)); +} diff --git a/libgupnp/gupnp-simple-context-manager.h b/libgupnp/gupnp-simple-context-manager.h new file mode 100644 index 0000000..dc8804b --- /dev/null +++ b/libgupnp/gupnp-simple-context-manager.h @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2009,2011 Nokia Corporation. + * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. + * + * Author: Jens Georg + * Zeeshan Ali (Khattak) + * Jorn Baayen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GUPNP_SIMPLE_CONTEXT_MANAGER_H__ +#define __GUPNP_SIMPLE_CONTEXT_MANAGER_H__ + +#include "gupnp-context-manager.h" + +G_BEGIN_DECLS + +G_GNUC_INTERNAL GType +gupnp_simple_context_manager_get_type (void) G_GNUC_CONST; + +#define GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER \ + (gupnp_simple_context_manager_get_type ()) +#define GUPNP_SIMPLE_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER, \ + GUPnPSimpleContextManager)) +#define GUPNP_SIMPLE_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_CAST ((obj), \ + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER, \ + GUPnPSimpleContextManagerClass)) +#define GUPNP_IS_SIMPLE_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER)) +#define GUPNP_IS_SIMPLE_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE ((obj), \ + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER)) +#define GUPNP_SIMPLE_CONTEXT_MANAGER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER, \ + GUPnPSimpleContextManagerClass)) + +typedef struct _GUPnPSimpleContextManagerPrivate GUPnPSimpleContextManagerPrivate; + +typedef struct { + GUPnPContextManager parent; + + GUPnPSimpleContextManagerPrivate *priv; +} GUPnPSimpleContextManager; + +typedef struct { + GUPnPContextManagerClass parent_class; + + /* vfuncs */ + GList *(* get_interfaces) (GUPnPSimpleContextManager *context_manager); + + /* future padding */ + void (* _gupnp_reserved2) (void); + void (* _gupnp_reserved3) (void); + void (* _gupnp_reserved4) (void); +} GUPnPSimpleContextManagerClass; + +G_END_DECLS + +#endif /* __GUPNP_SIMPLE_CONTEXT_MANAGER_H__ */ diff --git a/libgupnp/gupnp-types-private.h b/libgupnp/gupnp-types-private.h index bbc0013..4ad39f7 100644 --- a/libgupnp/gupnp-types-private.h +++ b/libgupnp/gupnp-types-private.h @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_TYPES_PRIVATE_H__ diff --git a/libgupnp/gupnp-types.c b/libgupnp/gupnp-types.c index 1e3cccc..dfb479d 100644 --- a/libgupnp/gupnp-types.c +++ b/libgupnp/gupnp-types.c @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** diff --git a/libgupnp/gupnp-types.h b/libgupnp/gupnp-types.h index 03428e1..dd9b2b1 100644 --- a/libgupnp/gupnp-types.h +++ b/libgupnp/gupnp-types.h @@ -16,8 +16,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_TYPES_H__ diff --git a/libgupnp/gupnp-unix-context-manager.c b/libgupnp/gupnp-unix-context-manager.c index 1cdd2c4..4b5c85e 100644 --- a/libgupnp/gupnp-unix-context-manager.c +++ b/libgupnp/gupnp-unix-context-manager.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. * * Author: Zeeshan Ali (Khattak) @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -49,89 +49,20 @@ #include "gupnp-unix-context-manager.h" #include "gupnp-context.h" -#ifdef USE_CONIC /* MAEMO */ -#include -#include -#include -#endif /* MAEMO */ - G_DEFINE_TYPE (GUPnPUnixContextManager, gupnp_unix_context_manager, - GUPNP_TYPE_CONTEXT_MANAGER); - -struct _GUPnPUnixContextManagerPrivate { - GList *contexts; /* List of GUPnPContext instances */ - - GSource *idle_context_creation_src; - - -#ifdef USE_CONIC /* MAEMO */ - ConIcConnection *conic; - DBusConnection *system_bus; -#endif /* MAEMO */ -}; - -static void -create_and_signal_context (GUPnPUnixContextManager *manager, - const char *interface) -{ - GUPnPContext *context; - GMainContext *main_context; - guint port; - - GError *error; - - g_object_get (manager, - "main-context", &main_context, - "port", &port, - NULL); - - error = NULL; - context = g_object_new (GUPNP_TYPE_CONTEXT, - "main-context", main_context, - "interface", interface, - "port", port, - "error", &error, - NULL); - if (error != NULL) { - if (!(error->domain == GSSDP_ERROR && - error->code == GSSDP_ERROR_NO_IP_ADDRESS)) - g_warning ( - "Failed to create context for interface '%s': %s\n", - interface, - error->message); - - g_error_free (error); - - return; - } - - g_signal_emit_by_name (manager, - "context-available", - context); - - manager->priv->contexts = g_list_append (manager->priv->contexts, - context); -} + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER); /* * Create a context for all network interfaces that are up. */ -static gboolean -create_contexts (gpointer data) +static GList * +gupnp_unix_context_manager_get_interfaces (GUPnPSimpleContextManager *manager) { - GUPnPUnixContextManager *manager = (GUPnPUnixContextManager *) data; struct ifaddrs *ifa_list, *ifa; - char *ret; GList *processed; - manager->priv->idle_context_creation_src = NULL; - - if (manager->priv->contexts != NULL) { - return FALSE; - } - - ret = NULL; + g_return_val_if_fail (GUPNP_IS_UNIX_CONTEXT_MANAGER (manager), NULL); if (getifaddrs (&ifa_list) != 0) { g_warning ("Failed to retrieve list of network interfaces:%s\n", @@ -153,179 +84,27 @@ create_contexts (gpointer data) continue; if (ifa->ifa_flags & IFF_UP) - create_and_signal_context (manager, ifa->ifa_name); - - processed = g_list_append (processed, ifa->ifa_name); + processed = g_list_append (processed, + g_strdup (ifa->ifa_name)); } - g_list_free (processed); freeifaddrs (ifa_list); - return FALSE; + return processed; } static void -destroy_contexts (GUPnPUnixContextManager *manager) +gupnp_unix_context_manager_init (G_GNUC_UNUSED GUPnPUnixContextManager *manager) { - while (manager->priv->contexts) { - GUPnPContext *context; - - context = GUPNP_CONTEXT (manager->priv->contexts->data); - - g_signal_emit_by_name (manager, - "context-unavailable", - context); - g_object_unref (context); - - manager->priv->contexts = g_list_delete_link - (manager->priv->contexts, - manager->priv->contexts); - } -} - -#ifdef USE_CONIC /* MAEMO */ -static void conic_event (ConIcConnection* connection, - ConIcConnectionEvent* event, - gpointer user_data) -{ - GUPnPUnixContextManager *manager; - ConIcConnectionStatus status; - const gchar* bearer; - - manager = GUPNP_UNIX_CONTEXT_MANAGER (user_data); - status = con_ic_connection_event_get_status (event); - - bearer = con_ic_event_get_bearer_type (CON_IC_EVENT (event)); - if (bearer != NULL && - (strcmp (bearer, CON_IC_BEARER_WLAN_INFRA) == 0 || - strcmp (bearer, CON_IC_BEARER_WLAN_ADHOC) == 0)) { - switch (status) { - case CON_IC_STATUS_CONNECTED: - create_contexts (manager); - break; - case CON_IC_STATUS_DISCONNECTED: - destroy_contexts (manager); - break; - default: - /* Ignore other events */ - break; - } - } -} -#else -static void -schedule_contexts_creation (GUPnPUnixContextManager *manager) -{ - GMainContext *main_context; - - manager->priv->idle_context_creation_src = NULL; - - g_object_get (manager, - "main-context", &main_context, - NULL); - - /* Create contexts in mainloop so that is happens after user has hooked - * to the "context-available" signal. - */ - manager->priv->idle_context_creation_src = g_idle_source_new (); - g_source_attach (manager->priv->idle_context_creation_src, - main_context); - g_source_set_callback (manager->priv->idle_context_creation_src, - create_contexts, - manager, - NULL); - g_source_unref (manager->priv->idle_context_creation_src); -} -#endif /* MAEMO */ - -static void -gupnp_unix_context_manager_init (GUPnPUnixContextManager *manager) -{ - manager->priv = - G_TYPE_INSTANCE_GET_PRIVATE (manager, - GUPNP_TYPE_UNIX_CONTEXT_MANAGER, - GUPnPUnixContextManagerPrivate); -} - -static void -gupnp_unix_context_manager_constructed (GObject *object) -{ - GObjectClass *parent_class; - GUPnPUnixContextManager *manager; - - manager = GUPNP_UNIX_CONTEXT_MANAGER (object); - -#ifdef USE_CONIC /* MAEMO */ - /* Initialize the system bus so libconic can receive ICD messages. */ - manager->priv->system_bus = dbus_bus_get (DBUS_BUS_SYSTEM, NULL); - dbus_connection_setup_with_g_main (manager->priv->system_bus, NULL); - - manager->priv->conic = con_ic_connection_new (); - g_assert (manager->priv->conic != NULL); - - g_signal_connect (manager->priv->conic, - "connection-event", - G_CALLBACK (conic_event), - manager); - g_object_set (manager->priv->conic, - "automatic-connection-events", - TRUE, - NULL); -#else - schedule_contexts_creation (manager); -#endif /* MAEMO */ - - /* Chain-up */ - parent_class = G_OBJECT_CLASS (gupnp_unix_context_manager_parent_class); - if (parent_class->constructed != NULL) { - parent_class->constructed (object); - } -} - -static void -gupnp_unix_context_manager_dispose (GObject *object) -{ - GUPnPUnixContextManager *manager; - GObjectClass *object_class; - - manager = GUPNP_UNIX_CONTEXT_MANAGER (object); - - destroy_contexts (manager); - -#ifdef USE_CONIC /* MAEMO */ - if (manager->priv->conic != NULL) { - g_object_unref (manager->priv->conic); - manager->priv->conic = NULL; - } - - if (manager->priv->system_bus != NULL) { - dbus_connection_unref (manager->priv->system_bus); - manager->priv->system_bus = NULL; - } -#endif /* MAEMO */ - - if (manager->priv->idle_context_creation_src) { - g_source_destroy (manager->priv->idle_context_creation_src); - manager->priv->idle_context_creation_src = NULL; - } - - - /* Call super */ - object_class = G_OBJECT_CLASS (gupnp_unix_context_manager_parent_class); - object_class->dispose (object); } static void gupnp_unix_context_manager_class_init (GUPnPUnixContextManagerClass *klass) { - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (klass); - - object_class->constructed = gupnp_unix_context_manager_constructed; - object_class->dispose = gupnp_unix_context_manager_dispose; + GUPnPSimpleContextManagerClass *parent_class; - g_type_class_add_private (klass, - sizeof (GUPnPUnixContextManagerPrivate)); + parent_class = GUPNP_SIMPLE_CONTEXT_MANAGER_CLASS (klass); + parent_class->get_interfaces = + gupnp_unix_context_manager_get_interfaces; } diff --git a/libgupnp/gupnp-unix-context-manager.h b/libgupnp/gupnp-unix-context-manager.h index 0fa7ef2..a12decd 100644 --- a/libgupnp/gupnp-unix-context-manager.h +++ b/libgupnp/gupnp-unix-context-manager.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. * * Author: Zeeshan Ali (Khattak) @@ -17,18 +17,18 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_UNIX_CONTEXT_MANAGER_H__ #define __GUPNP_UNIX_CONTEXT_MANAGER_H__ -#include "gupnp-context-manager.h" +#include "gupnp-simple-context-manager.h" G_BEGIN_DECLS -GType +G_GNUC_INTERNAL GType gupnp_unix_context_manager_get_type (void) G_GNUC_CONST; #define GUPNP_TYPE_UNIX_CONTEXT_MANAGER \ @@ -55,13 +55,11 @@ gupnp_unix_context_manager_get_type (void) G_GNUC_CONST; typedef struct _GUPnPUnixContextManagerPrivate GUPnPUnixContextManagerPrivate; typedef struct { - GUPnPContextManager parent; - - GUPnPUnixContextManagerPrivate *priv; + GUPnPSimpleContextManager parent; } GUPnPUnixContextManager; typedef struct { - GUPnPContextManagerClass parent_class; + GUPnPSimpleContextManagerClass parent_class; /* future padding */ void (* _gupnp_reserved1) (void); diff --git a/libgupnp/gupnp-white-list.c b/libgupnp/gupnp-white-list.c new file mode 100644 index 0000000..599bd2e --- /dev/null +++ b/libgupnp/gupnp-white-list.c @@ -0,0 +1,390 @@ +/* + * Copyright (C) 2013 Intel Corporation. + * + * Author: Ludovic Ferrandis + * + * 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 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:gupnp-white-list + * @short_description: Class for network filtering. + * + * #GUPnPWhiteList handles network filtering. It provides API to manage a list + * of entries that will be used to filter networks. + * The #GUPnPWhiteList could be enabled or not. If it's enabled but the entries + * list is empty, it behaves as disabled. + */ + +#include + +#include "gupnp-white-list.h" + +G_DEFINE_TYPE (GUPnPWhiteList, + gupnp_white_list, + G_TYPE_OBJECT); + +struct _GUPnPWhiteListPrivate { + gboolean enabled; + GList *entries; +}; + +enum { + PROP_0, + PROP_ENABLED, + PROP_ENTRIES +}; + +enum { + ENTRY_CHANGE, + ENABLED, + SIGNAL_LAST +}; + +static void +gupnp_white_list_init (GUPnPWhiteList *list) +{ + list->priv = G_TYPE_INSTANCE_GET_PRIVATE (list, + GUPNP_TYPE_WHITE_LIST, + GUPnPWhiteListPrivate); + + list->priv->entries = NULL; +} + +static void +gupnp_white_list_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) +{ + GUPnPWhiteList *list; + + list = GUPNP_WHITE_LIST (object); + + switch (property_id) { + case PROP_ENABLED: + list->priv->enabled = g_value_get_boolean (value); + break; + case PROP_ENTRIES: + list->priv->entries = g_value_get_pointer (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gupnp_white_list_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GUPnPWhiteList *list; + + list = GUPNP_WHITE_LIST (object); + + switch (property_id) { + case PROP_ENABLED: + g_value_set_boolean (value, list->priv->enabled); + break; + case PROP_ENTRIES: + g_value_set_pointer (value, list->priv->entries); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gupnp_white_list_class_finalize (GObject *object) +{ + GUPnPWhiteList *list; + GObjectClass *object_class; + + list = GUPNP_WHITE_LIST (object); + + g_list_free_full (list->priv->entries, g_free); + list->priv->entries = NULL; + + /* Call super */ + object_class = G_OBJECT_CLASS (gupnp_white_list_parent_class); + object_class->finalize (object); +} + +static void +gupnp_white_list_class_init (GUPnPWhiteListClass *klass) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (klass); + + object_class->set_property = gupnp_white_list_set_property; + object_class->get_property = gupnp_white_list_get_property; + object_class->finalize = gupnp_white_list_class_finalize; + + g_type_class_add_private (klass, sizeof (GUPnPWhiteListPrivate)); + + /** + * GUPnPWhiteList:enabled: + * + * Whether this white list is active or not. + **/ + g_object_class_install_property + (object_class, + PROP_ENABLED, + g_param_spec_boolean + ("enabled", + "Enabled", + "TRUE if the white list is active.", + FALSE, + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); + + /** + * GUPnPWhiteList:entries: + * + * Whether this white list is active or not. + * Type: GList + * Transfer: none + **/ + g_object_class_install_property + (object_class, + PROP_ENTRIES, + g_param_spec_pointer + ("entries", + "Entries", + "GList of strings that compose the white list.", + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); +} + +/** + * gupnp_white_list_new: + * + * Create a new #GUPnPWhiteList. + * The white list is disabled by default. + * + * Returns: (transfer full): A new #GUPnPWhiteList object. + **/ +GUPnPWhiteList * +gupnp_white_list_new (void) +{ + return g_object_new (GUPNP_TYPE_WHITE_LIST, NULL); +} + +/** + * gupnp_white_list_set_enabled: + * @white_list: A #GUPnPWhiteList + * @enable: %TRUE to enable @white_list, %FALSE otherwise + * + * Enable or disable the #GUPnPWhiteList to perform the network filtering. +**/ +void +gupnp_white_list_set_enabled (GUPnPWhiteList *white_list, gboolean enable) +{ + g_return_if_fail (GUPNP_IS_WHITE_LIST (white_list)); + + white_list->priv->enabled = enable; + g_object_notify (G_OBJECT (white_list), "enabled"); +} + +/** + * gupnp_white_list_get_enabled: + * @white_list: A #GUPnPWhiteList + * + * Return the status of the #GUPnPWhiteList + * + * Return value: %TRUE if @white_list is enabled, %FALSE otherwise. + **/ +gboolean +gupnp_white_list_get_enabled (GUPnPWhiteList *white_list) +{ + g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), FALSE); + + return white_list->priv->enabled; +} + +/** + * gupnp_white_list_is_empty: + * @white_list: A #GUPnPWhiteList + * + * Return the state of the entries list of #GUPnPWhiteList + * + * Return value: %TRUE if @white_list is empty, %FALSE otherwise. + **/ +gboolean +gupnp_white_list_is_empty (GUPnPWhiteList *white_list) +{ + g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), TRUE); + + return (white_list->priv->entries == NULL); +} + +/** + * gupnp_white_list_add_entry: + * @white_list: A #GUPnPWhiteList + * @entry: A value used to filter network + * + * Add @entry in the list of valid criteria used by @white_list to + * filter networks. + * if @entry already exists, it won't be added a second time. + * + * Return value: %TRUE if @entry is added, %FALSE otherwise. + **/ +gboolean +gupnp_white_list_add_entry (GUPnPWhiteList *white_list, gchar* entry) +{ + GList *s_entry; + GUPnPWhiteListPrivate *priv; + + g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), FALSE); + g_return_val_if_fail ((entry != NULL), FALSE); + + priv = white_list->priv; + + s_entry = g_list_find_custom (priv->entries, entry, + (GCompareFunc) g_ascii_strcasecmp); + + if (s_entry == NULL) { + priv->entries = g_list_prepend (priv->entries, + g_strdup (entry)); + g_object_notify (G_OBJECT (white_list), "entries"); + } + + return (s_entry == NULL); +} + +/** + * gupnp_white_list_remove_entry: + * @white_list: A #GUPnPWhiteList + * @entry: A value to remove from the filter list. + * + * Remove @entry in the list of valid criteria used by @white_list to + * filter networks. + * + * Return value: %TRUE if @entry is removed, %FALSE otherwise. + **/ +gboolean +gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, gchar* entry) +{ + GList *s_entry; + GUPnPWhiteListPrivate *priv; + + g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), FALSE); + g_return_val_if_fail ((entry != NULL), FALSE); + + priv = white_list->priv; + + s_entry = g_list_find_custom (priv->entries, entry, + (GCompareFunc) g_ascii_strcasecmp); + + if (s_entry != NULL) { + priv->entries = g_list_remove_link (priv->entries, s_entry); + g_list_free_full (s_entry, g_free); + g_object_notify (G_OBJECT (white_list), "entries"); + } + + return (s_entry != NULL); +} + +/** + * gupnp_white_list_get_entries: + * @white_list: A #GUPnPWhiteList + * + * Get the #GList of entries that compose the white list. Do not free + * + * Return value: (element-type utf8) (transfer none): a #GList of entries + * used to filter networks, interfaces,... or %NULL. + * Do not modify or free the list nor its elements. + **/ +GList * +gupnp_white_list_get_entries (GUPnPWhiteList *white_list) +{ + g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), NULL); + + return white_list->priv->entries; +} + +/** + * gupnp_white_list_clear: + * @white_list: A #GUPnPWhiteList + * + * Remove all entries from #GList that compose the white list. + * The list is now empty. Even if #GUPnPWhiteList is enabled, it will have the + * same behavior as if it was disabled. +**/ +void +gupnp_white_list_clear (GUPnPWhiteList *white_list) +{ + GUPnPWhiteListPrivate *priv; + + g_return_if_fail (GUPNP_IS_WHITE_LIST(white_list)); + + priv = white_list->priv; + g_list_free_full (priv->entries, g_free); + priv->entries = NULL; + g_object_notify (G_OBJECT (white_list), "entries"); +} + +/** + * gupnp_white_list_check_context: + * @white_list: A #GUPnPWhiteList + * @context: A #GUPnPContext to test. + * + * It will check if the @context is allowed or not. The @white_list will check + * all its entries againt #GUPnPContext interface, host ip and network fields + * information. This function doesn't take into account the @white_list status + * (enabled or not). + * + * Return value: %TRUE if @context is matching the @white_list criterias, + * %FALSE otherwise. + **/ +gboolean +gupnp_white_list_check_context (GUPnPWhiteList *white_list, + GUPnPContext *context) +{ + GSSDPClient *client; + GList *l; + const char *interface; + const char *host_ip; + const char *network; + gboolean match = FALSE; + + g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), FALSE); + g_return_val_if_fail (GUPNP_IS_CONTEXT (context), FALSE); + + client = GSSDP_CLIENT (context); + + interface = gssdp_client_get_interface (client); + host_ip = gssdp_client_get_host_ip (client); + network = gssdp_client_get_network (client); + + l = white_list->priv->entries; + + while (l && !match) { + match = (interface && !strcmp (l->data, interface)) || + (host_ip && !strcmp (l->data, host_ip)) || + (network && !strcmp (l->data, network)); + + l = l->next; + } + + return match; +} diff --git a/libgupnp/gupnp-white-list.h b/libgupnp/gupnp-white-list.h new file mode 100644 index 0000000..9b21b12 --- /dev/null +++ b/libgupnp/gupnp-white-list.h @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2013 Intel Corporation. + * + * Author: Ludovic Ferrandis + * + * 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 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GUPNP_WHITE_LIST_H__ +#define __GUPNP_WHITE_LIST_H__ + +#include +#include "gupnp-context.h" + +G_BEGIN_DECLS + +GType +gupnp_white_list_get_type (void) G_GNUC_CONST; + +#define GUPNP_TYPE_WHITE_LIST \ + (gupnp_white_list_get_type ()) +#define GUPNP_WHITE_LIST(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GUPNP_TYPE_WHITE_LIST, \ + GUPnPWhiteList)) +#define GUPNP_WHITE_LIST_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_CAST ((obj), \ + GUPNP_TYPE_WHITE_LIST, \ + GUPnPWhiteListClass)) +#define GUPNP_IS_WHITE_LIST(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GUPNP_TYPE_WHITE_LIST)) +#define GUPNP_IS_WHITE_LIST_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE ((obj), \ + GUPNP_TYPE_WHITE_LIST)) +#define GUPNP_WHITE_LIST_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GUPNP_TYPE_WHITE_LIST, \ + GUPnPWhiteListClass)) + +typedef struct _GUPnPWhiteListPrivate GUPnPWhiteListPrivate; +typedef struct _GUPnPWhiteList GUPnPWhiteList; +typedef struct _GUPnPWhiteListClass GUPnPWhiteListClass; + +/** + * GUPnPWhiteList: + * + * This struct contains private data only, and should be accessed using the + * functions below. + */ +struct _GUPnPWhiteList { + GObject parent; + + GUPnPWhiteListPrivate *priv; +}; + +struct _GUPnPWhiteListClass { + GObjectClass parent_class; +}; + +GUPnPWhiteList * +gupnp_white_list_new (void); + +void +gupnp_white_list_set_enabled (GUPnPWhiteList *white_list, + gboolean enable); + +gboolean +gupnp_white_list_get_enabled (GUPnPWhiteList *white_list); + +gboolean +gupnp_white_list_is_empty (GUPnPWhiteList *white_list); + +gboolean +gupnp_white_list_add_entry (GUPnPWhiteList *white_list, + gchar* entry); + +gboolean +gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, + gchar* entry); + +GList * +gupnp_white_list_get_entries (GUPnPWhiteList *white_list); + +void +gupnp_white_list_clear (GUPnPWhiteList *white_list); + +gboolean +gupnp_white_list_check_context (GUPnPWhiteList *white_list, + GUPnPContext *context); + +G_END_DECLS + +#endif /* __GUPNP_WHITE_LIST_H__ */ diff --git a/libgupnp/gupnp-windows-context-manager.c b/libgupnp/gupnp-windows-context-manager.c new file mode 100644 index 0000000..662c009 --- /dev/null +++ b/libgupnp/gupnp-windows-context-manager.c @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2009, 2010 Jens Georg + * Copyright (C) 2009 Nokia Corporation. + * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. + * + * Author: Zeeshan Ali (Khattak) + * Jorn Baayen + * Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:gupnp-windows-context-manager + * @short_description: Windows-specific implementation of #GUPnPContextManager. + */ + +#include +#include +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0502 +#endif +#include +#include +#include + +#include "gupnp-windows-context-manager.h" +#include "gupnp-context.h" + +G_DEFINE_TYPE (GUPnPWindowsContextManager, + gupnp_windows_context_manager, + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER); + +/* + * Create a context for all network interfaces that are up. + */ +static GList * +gupnp_windows_context_manager_get_interfaces + (GUPnPSimpleContextManager *manager) +{ + GList *interfaces = NULL; + ULONG flags = GAA_FLAG_INCLUDE_PREFIX | + GAA_FLAG_SKIP_DNS_SERVER | + GAA_FLAG_SKIP_MULTICAST; + /* use 15k buffer initially as documented in MSDN */ + DWORD size = 0x3C00; + DWORD ret; + PIP_ADAPTER_ADDRESSES adapters_addresses; + PIP_ADAPTER_ADDRESSES adapter; + + do { + adapters_addresses = (PIP_ADAPTER_ADDRESSES) g_malloc0 (size); + ret = GetAdaptersAddresses (AF_UNSPEC, + flags, + NULL, + adapters_addresses, + &size); + if (ret == ERROR_BUFFER_OVERFLOW) { + g_free (adapters_addresses); + } + } while (ret == ERROR_BUFFER_OVERFLOW); + + if (ret != ERROR_SUCCESS) + return NULL; + + for (adapter = adapters_addresses; + adapter != NULL; + adapter = adapter->Next) { + if (adapter->FirstUnicastAddress == NULL) + continue; + if (adapter->OperStatus != IfOperStatusUp) + continue; + interfaces = g_list_append (interfaces, + g_strdup (adapter->AdapterName)); + } + + return interfaces; +} + +static void +gupnp_windows_context_manager_init (GUPnPWindowsContextManager *manager) +{ +} + +static void +gupnp_windows_context_manager_class_init (GUPnPWindowsContextManagerClass *klass) +{ + GUPnPSimpleContextManagerClass *parent_class; + + parent_class = GUPNP_SIMPLE_CONTEXT_MANAGER_CLASS (klass); + parent_class->get_interfaces = + gupnp_windows_context_manager_get_interfaces; +} diff --git a/libgupnp/gupnp-windows-context-manager.h b/libgupnp/gupnp-windows-context-manager.h new file mode 100644 index 0000000..2387d12 --- /dev/null +++ b/libgupnp/gupnp-windows-context-manager.h @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2009, 2010 Jens Georg + * Copyright (C) 2009 Nokia Corporation. + * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. + * + * Author: Zeeshan Ali (Khattak) + * Jorn Baayen + * Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GUPNP_WINDOWS_CONTEXT_MANAGER_H__ +#define __GUPNP_WINDOWS_CONTEXT_MANAGER_H__ + +#include "gupnp-simple-context-manager.h" + +G_BEGIN_DECLS + +GType +gupnp_windows_context_manager_get_type (void) G_GNUC_CONST; + +#define GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER \ + (gupnp_windows_context_manager_get_type ()) +#define GUPNP_WINDOWS_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER, \ + GUPnPWindowsContextManager)) +#define GUPNP_WINDOWS_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_CAST ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER, \ + GUPnPWindowsContextManagerClass)) +#define GUPNP_IS_WINDOWS_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER)) +#define GUPNP_IS_WINDOWS_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER)) +#define GUPNP_WINDOWS_CONTEXT_MANAGER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER, \ + GUPnPWindowsContextManagerClass)) + +typedef struct { + GUPnPSimpleContextManager parent; +} GUPnPWindowsContextManager; + +typedef struct { + GUPnPSimpleContextManagerClass parent_class; + + /* future padding */ + void (* _gupnp_reserved1) (void); + void (* _gupnp_reserved2) (void); + void (* _gupnp_reserved3) (void); + void (* _gupnp_reserved4) (void); +} GUPnPWindowsContextManagerClass; + +G_END_DECLS + +#endif /* __GUPNP_WINDOWS_CONTEXT_MANAGER_H__ */ diff --git a/libgupnp/gupnp-xml-doc.c b/libgupnp/gupnp-xml-doc.c index a85abab..fae4fa1 100644 --- a/libgupnp/gupnp-xml-doc.c +++ b/libgupnp/gupnp-xml-doc.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2006, 2007 OpenedHand Ltd. - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * * Author: Jorn Baayen * Zeeshan Ali (Khattak) @@ -18,8 +18,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** @@ -39,7 +39,7 @@ G_DEFINE_TYPE (GUPnPXMLDoc, G_TYPE_OBJECT); static void -gupnp_xml_doc_init (GUPnPXMLDoc *doc) +gupnp_xml_doc_init (G_GNUC_UNUSED GUPnPXMLDoc *doc) { /* Empty */ } @@ -102,9 +102,16 @@ gupnp_xml_doc_new_from_path (const char *path, GError **error) { xmlDoc *doc; + int flags; + + flags = XML_PARSE_PEDANTIC; + + if (!g_getenv ("GUPNP_DEBUG")) { + flags |= XML_PARSE_NOWARNING | XML_PARSE_NOERROR; + } g_return_val_if_fail (path != NULL, NULL); - doc = xmlRecoverFile (path); + doc = xmlReadFile (path, NULL, flags); if (doc == NULL) { g_set_error (error, GUPNP_XML_ERROR, diff --git a/libgupnp/gupnp-xml-doc.h b/libgupnp/gupnp-xml-doc.h index eba12ab..1162acd 100644 --- a/libgupnp/gupnp-xml-doc.h +++ b/libgupnp/gupnp-xml-doc.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2006, 2007 OpenedHand Ltd. - * Copyright (C) 2009 Nokia Corporation, all rights reserved. + * Copyright (C) 2009 Nokia Corporation. * * Author: Jorn Baayen * Zeeshan Ali (Khattak) @@ -18,8 +18,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GUPNP_XML_DOC_H__ @@ -28,6 +28,8 @@ #include #include +G_BEGIN_DECLS + GType gupnp_xml_doc_get_type (void) G_GNUC_CONST; @@ -52,15 +54,24 @@ gupnp_xml_doc_get_type (void) G_GNUC_CONST; GUPNP_TYPE_XML_DOC, \ GUPnPXMLDocClass)) -typedef struct { +typedef struct _GUPnPXMLDoc GUPnPXMLDoc; +typedef struct _GUPnPXMLDocClass GUPnPXMLDocClass; + +/** + * GUPnPXMLDoc: + * @doc: Pointer to the document. + * + * Reference-counting wrapper for libxml's #xmlDoc + */ +struct _GUPnPXMLDoc { GObject parent; /*< public >*/ xmlDoc *doc; -} GUPnPXMLDoc; +}; -typedef struct { +struct _GUPnPXMLDocClass { GObjectClass parent_class; -} GUPnPXMLDocClass; +}; GUPnPXMLDoc * gupnp_xml_doc_new (xmlDoc *xml_doc); @@ -69,4 +80,6 @@ GUPnPXMLDoc * gupnp_xml_doc_new_from_path (const char *path, GError **error); +G_END_DECLS + #endif /* __GUPNP_XML_DOC_H__ */ diff --git a/libgupnp/gupnp.h b/libgupnp/gupnp.h index 0c55694..42ef2a8 100644 --- a/libgupnp/gupnp.h +++ b/libgupnp/gupnp.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "gupnp-context.h" @@ -32,5 +32,6 @@ #include "gupnp-service-info.h" #include "gupnp-service-introspection.h" #include "gupnp-service-proxy.h" +#include "gupnp-white-list.h" #include "gupnp-xml-doc.h" #include "gupnp-types.h" diff --git a/libgupnp/gvalue-util.c b/libgupnp/gvalue-util.c index 757c7a3..b01d2f9 100644 --- a/libgupnp/gvalue-util.c +++ b/libgupnp/gvalue-util.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -42,7 +42,11 @@ gvalue_util_set_value_from_string (GValue *value, break; case G_TYPE_CHAR: +#if GLIB_CHECK_VERSION(2,32,0) + g_value_set_schar (value, *str); +#else g_value_set_char (value, *str); +#endif break; @@ -175,7 +179,11 @@ gvalue_util_value_append_to_xml_string (const GValue *value, return TRUE; case G_TYPE_CHAR: +#if GLIB_CHECK_VERSION(2,32,0) + g_string_append_c (str, g_value_get_schar (value)); +#else g_string_append_c (str, g_value_get_char (value)); +#endif return TRUE; diff --git a/libgupnp/gvalue-util.h b/libgupnp/gvalue-util.h index 74c4946..36e95a0 100644 --- a/libgupnp/gvalue-util.h +++ b/libgupnp/gvalue-util.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GVALUE_UTIL_H__ diff --git a/libgupnp/http-headers.c b/libgupnp/http-headers.c index 6f08b8d..8ff2c45 100644 --- a/libgupnp/http-headers.c +++ b/libgupnp/http-headers.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -109,66 +109,6 @@ locale_from_http_language (char *lang) return underscore_index; } -/* Parses the HTTP Range header on @message and sets: - * - * @have_range to %TRUE if a range was specified, - * @offset to the requested offset (left unchanged if none specified), - * @length to the requested length (left unchanged if none specified). - * - * Both @offset and @length are expected to be initialised to their default - * values. - * - * Returns %TRUE on success. */ -gboolean -http_request_get_range (SoupMessage *message, - gboolean *have_range, - gsize *offset, - gsize *length) -{ - const char *header; - char **v; - - header = soup_message_headers_get_one (message->request_headers, - "Range"); - if (header == NULL) { - *have_range = FALSE; - - return TRUE; - } - - /* We have a Range header. Parse. */ - if (strncmp (header, "bytes=", 6) != 0) - return FALSE; - - header += 6; - - v = g_strsplit (header, "-", 2); - - /* Get first byte position */ - if (v[0] != NULL && *v[0] != 0) - *offset = atoll (v[0]); - - else { - /* We don't support ranges without first byte position */ - g_strfreev (v); - - return FALSE; - } - - /* Get last byte position if specified */ - if (v[1] != NULL && *v[1] != 0) - *length = atoll (v[1]) - *offset; - else - *length = *length - *offset; - - *have_range = TRUE; - - /* Cleanup */ - g_strfreev (v); - - return TRUE; -} - /* Sets the Accept-Language on @message with the language taken from the * current locale. */ void @@ -178,7 +118,13 @@ http_request_set_accept_language (SoupMessage *message) int dash_index; GString *tmp; - locale = setlocale (LC_ALL, NULL); +#ifdef G_OS_WIN32 + /* TODO: Use GetSystemDefaultLangID or similar */ + return; +#else + + locale = setlocale (LC_MESSAGES, NULL); + if (locale == NULL) return; @@ -209,6 +155,7 @@ http_request_set_accept_language (SoupMessage *message) tmp->str); g_string_free (tmp, TRUE); +#endif } static double @@ -332,25 +279,55 @@ http_response_set_content_type (SoupMessage *msg, g_free (content_type); } -/* Set Content-Range header */ +/* Set Content-Encoding header to gzip and append compressed body */ void -http_response_set_content_range (SoupMessage *msg, - gsize offset, - gsize length, - gsize total) +http_response_set_body_gzip (SoupMessage *msg, + const char *body, + const gsize length) { - char *content_range; - - content_range = g_strdup_printf - ("bytes %" G_GSIZE_FORMAT "-%" - G_GSIZE_FORMAT "/%" G_GSIZE_FORMAT, - offset, - offset + length, - total); + GZlibCompressor *compressor; + gboolean finished = FALSE; + gsize converted = 0; soup_message_headers_append (msg->response_headers, - "Content-Range", - content_range); + "Content-Encoding", "gzip"); + + compressor = g_zlib_compressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP, -1); + + while (! finished) { + GError *error = NULL; + char buf[65536]; + gsize bytes_read = 0; + gsize bytes_written = 0; + + switch (g_converter_convert (G_CONVERTER (compressor), + body + converted, + length - converted, + buf, sizeof (buf), + G_CONVERTER_INPUT_AT_END, + &bytes_read, &bytes_written, + &error)) { + case G_CONVERTER_ERROR: + g_warning ("Error compressing response: %s", + error->message); + g_error_free (error); + g_object_unref (compressor); + return; + case G_CONVERTER_CONVERTED: + converted += bytes_read; + break; + case G_CONVERTER_FINISHED: + finished = TRUE; + break; + case G_CONVERTER_FLUSHED: + break; + } + + if (bytes_written) + soup_message_body_append (msg->response_body, + SOUP_MEMORY_COPY, + buf, bytes_written); + } - g_free (content_range); + g_object_unref (compressor); } diff --git a/libgupnp/http-headers.h b/libgupnp/http-headers.h index 6dbaa94..52c5d43 100644 --- a/libgupnp/http-headers.h +++ b/libgupnp/http-headers.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __HTTP_HEADERS_H__ @@ -54,6 +54,11 @@ http_response_set_content_range (SoupMessage *message, gsize length, gsize total); +G_GNUC_INTERNAL void +http_response_set_body_gzip (SoupMessage *msg, + const char *body, + const gsize length); + G_END_DECLS #endif /* __HTTP_HEADERS_H__ */ diff --git a/libgupnp/xml-util.c b/libgupnp/xml-util.c index afe008b..2fc5e74 100644 --- a/libgupnp/xml-util.c +++ b/libgupnp/xml-util.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/libgupnp/xml-util.h b/libgupnp/xml-util.h index 15379d7..8b25bdc 100644 --- a/libgupnp/xml-util.h +++ b/libgupnp/xml-util.h @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __XML_UTIL_H__ diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 index 2cfa1e7..0ada151 100644 --- a/m4/gtk-doc.m4 +++ b/m4/gtk-doc.m4 @@ -6,6 +6,7 @@ dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first @@ -33,6 +34,11 @@ AC_DEFUN([GTK_DOC_CHECK], AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) + fi fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) diff --git a/m4/introspection.m4 b/m4/introspection.m4 index bb3a0da..bfc52be 100644 --- a/m4/introspection.m4 +++ b/m4/introspection.m4 @@ -59,12 +59,18 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` + INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR) AC_SUBST(INTROSPECTION_TYPELIBDIR) + AC_SUBST(INTROSPECTION_CFLAGS) + AC_SUBST(INTROSPECTION_LIBS) + AC_SUBST(INTROSPECTION_MAKEFILE) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index a3fee53..02b4bbe 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,7 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -10,7 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) -# serial 56 LT_INIT +# serial 57 LT_INIT # LT_PREREQ(VERSION) @@ -66,6 +68,7 @@ esac # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl @@ -82,6 +85,8 @@ AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) @@ -118,7 +123,7 @@ m4_defun([_LT_CC_BASENAME], *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) @@ -138,6 +143,11 @@ m4_defun([_LT_FILEUTILS_DEFAULTS], m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -160,10 +170,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our @@ -179,7 +192,6 @@ fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) @@ -193,23 +205,6 @@ aix3*) ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -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 delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -250,6 +245,28 @@ _LT_CONFIG_COMMANDS ])# _LT_SETUP +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +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 delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' @@ -408,7 +425,7 @@ m4_define([_lt_decl_all_varnames], # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS @@ -418,7 +435,7 @@ m4_define([_LT_CONFIG_STATUS_DECLARE], # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) @@ -517,12 +534,20 @@ LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -533,9 +558,9 @@ done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -543,16 +568,38 @@ for var in lt_decl_all_varnames([[ \ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - _LT_OUTPUT_LIBTOOL_INIT ]) +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- @@ -562,20 +609,11 @@ _LT_OUTPUT_LIBTOOL_INIT AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 +lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo @@ -601,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -646,15 +684,13 @@ chmod +x "$CONFIG_LT" # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT @@ -717,15 +753,12 @@ _LT_EOF # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) + _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], @@ -770,6 +803,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -791,6 +825,31 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -821,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -831,11 +894,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER @@ -921,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -929,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -940,6 +1012,34 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -967,7 +1067,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -977,8 +1077,8 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -987,7 +1087,13 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in @@ -995,7 +1101,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all _LT_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_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_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}" @@ -1011,203 +1117,142 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], fi ]) -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- # 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. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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 "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + # _LT_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. +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_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! - : +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' 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 <<_LT_EOF -[$]* -_LT_EOF - exit 0 + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' 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 "$lt_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 && - { 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 +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} - 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 +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) -AC_SUBST(lt_ECHO) -]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], @@ -1236,7 +1281,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext + echo '[#]line '$LINENO' "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 @@ -1279,7 +1324,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" @@ -1329,14 +1381,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*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" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1354,14 +1419,47 @@ need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) +[_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: @@ -1380,18 +1478,27 @@ 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 -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE @@ -1416,15 +1523,15 @@ AC_CACHE_CHECK([$1], [$2], -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 echo "\"\$as_me:$LINENO: $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 + echo "$as_me:$LINENO: \$? = $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 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/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 @@ -1464,7 +1571,7 @@ AC_CACHE_CHECK([$1], [$2], 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 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1527,6 +1634,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + 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. @@ -1552,6 +1664,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + 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 @@ -1578,7 +1695,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$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 @@ -1591,8 +1709,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -1643,7 +1761,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" +[#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -1684,7 +1802,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -1693,7 +1817,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -1869,16 +1997,16 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], -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 echo "\"\$as_me:$LINENO: $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 + echo "$as_me:$LINENO: \$? = $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 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes @@ -2037,6 +2165,7 @@ m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ @@ -2045,16 +2174,23 @@ if test "$GCC" = yes; then 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 + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # 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= @@ -2067,7 +2203,7 @@ if test "$GCC" = yes; then 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 ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -2087,7 +2223,13 @@ BEGIN {RS=" "; FS="/|\n";} { 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` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) @@ -2113,7 +2255,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2122,7 +2264,7 @@ aix3*) ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2175,7 +2317,7 @@ amigaos*) m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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' ;; esac ;; @@ -2187,7 +2329,7 @@ beos*) ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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' @@ -2206,8 +2348,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2228,36 +2371,83 @@ cygwin* | mingw* | pw32* | cegcc*) 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" +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # 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 + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + 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 + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -2278,7 +2468,7 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2286,10 +2476,6 @@ dgux*) 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. @@ -2297,7 +2483,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2315,7 +2501,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2334,13 +2520,16 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no + dynamic_linker="$host_os runtime_loader" 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_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2386,12 +2575,14 @@ hpux9* | hpux10* | hpux11*) soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2407,7 +2598,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2444,9 +2635,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2454,16 +2645,21 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -2472,7 +2668,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + 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;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -2516,7 +2712,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2585,7 +2781,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2610,7 +2806,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2634,7 +2830,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2665,7 +2861,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2675,7 +2871,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2717,6 +2913,8 @@ _LT_DECL([], [library_names_spec], [1], The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], @@ -2829,6 +3027,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], @@ -2950,6 +3149,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -2958,8 +3162,8 @@ case $host_os in fi ;; esac -_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl -_LT_DECL([], [reload_cmds], [2])dnl +_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_TAGDECL([], [reload_cmds], [2])dnl ])# _LT_CMD_RELOAD @@ -3011,16 +3215,18 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && 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)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -3046,7 +3252,7 @@ freebsd* | dragonfly*) fi ;; -gnu*) +haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3058,11 +3264,11 @@ hpux10.20* | hpux11*) 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_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? 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_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 @@ -3083,8 +3289,8 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3162,6 +3368,21 @@ tpf*) ;; esac ]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + 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 @@ -3169,7 +3390,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD @@ -3226,7 +3451,19 @@ if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -3239,13 +3476,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -3260,7 +3497,68 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) - +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + # LT_LIB_M # -------- # check for math library @@ -3268,7 +3566,7 @@ AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) @@ -3296,7 +3594,12 @@ m4_defun([_LT_COMPILER_NO_RTTI], _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, @@ -3313,6 +3616,7 @@ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl @@ -3380,8 +3684,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3405,6 +3709,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -3417,6 +3722,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -3438,7 +3744,7 @@ _LT_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 + 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" @@ -3450,6 +3756,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -3461,7 +3779,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -3487,15 +3805,15 @@ static const void *lt_preloaded_setup() { _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_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" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi @@ -3528,6 +3846,13 @@ else AC_MSG_RESULT(ok) fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], @@ -3538,6 +3863,8 @@ _LT_DECL([global_symbol_to_c_name_address], _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3549,7 +3876,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= -AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -3600,6 +3926,11 @@ m4_if([$1], [CXX], [ # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -3649,6 +3980,12 @@ m4_if([$1], [CXX], [ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # 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). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; dgux*) case $cc_basename in ec++*) @@ -3705,7 +4042,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -3738,8 +4075,8 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' @@ -3801,7 +4138,7 @@ m4_if([$1], [CXX], [ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -3905,6 +4242,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -3947,6 +4290,15 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -3989,7 +4341,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4010,7 +4362,13 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4022,25 +4380,40 @@ m4_if([$1], [CXX], [ # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; @@ -4072,7 +4445,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; @@ -4129,9 +4502,11 @@ case $host_os in _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. @@ -4150,6 +4525,8 @@ fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # @@ -4170,6 +4547,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl @@ -4178,30 +4556,40 @@ m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in 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 + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_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' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_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_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - _LT_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) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no - ;; + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= @@ -4216,7 +4604,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4261,13 +4648,39 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -4301,11 +4714,12 @@ dnl Note also adjust exclude_expsyms for C++ above. _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, 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. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -4341,10 +4755,12 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_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_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -4362,6 +4778,11 @@ _LT_EOF fi ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4387,15 +4808,16 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_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' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_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' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4406,13 +4828,17 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_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' + _LT_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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -4428,17 +4854,16 @@ _LT_EOF fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4452,8 +4877,8 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4471,8 +4896,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4518,8 +4943,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4559,8 +4984,10 @@ _LT_EOF else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_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' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_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 @@ -4648,9 +5075,9 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -4659,14 +5086,19 @@ _LT_EOF else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_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' @@ -4698,20 +5130,64 @@ _LT_EOF # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_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' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac ;; darwin* | rhapsody*) @@ -4724,10 +5200,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_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 @@ -4740,7 +5212,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -4749,7 +5221,7 @@ _LT_EOF # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4757,7 +5229,7 @@ _LT_EOF hpux9*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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_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 @@ -4772,14 +5244,13 @@ _LT_EOF ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -4791,16 +5262,16 @@ _LT_EOF ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -4812,7 +5283,14 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi @@ -4840,19 +5318,34 @@ _LT_EOF irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4914,17 +5407,17 @@ _LT_EOF _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_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_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_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4934,13 +5427,13 @@ _LT_EOF osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -4953,9 +5446,9 @@ _LT_EOF _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -5131,36 +5624,38 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi @@ -5197,9 +5692,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1], _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5225,8 +5717,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], @@ -5237,6 +5727,8 @@ _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented @@ -5330,37 +5822,22 @@ CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -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 -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +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 +else + _lt_caught_CXX_error=yes +fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no @@ -5372,7 +5849,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -5382,6 +5858,8 @@ _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -5413,6 +5891,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -5430,6 +5909,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -5451,8 +5931,8 @@ if test "$_lt_caught_CXX_error" != yes; then # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_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_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5484,7 +5964,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -5593,10 +6073,10 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -5605,14 +6085,19 @@ if test "$_lt_caught_CXX_error" != yes; then else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -5642,28 +6127,75 @@ if test "$_lt_caught_CXX_error" != yes; then ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_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_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_TAGVAR(ld_shlibs, $1)=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_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_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_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; @@ -5686,7 +6218,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -5702,7 +6234,9 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) @@ -5729,11 +6263,11 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no @@ -5794,7 +6328,7 @@ if test "$_lt_caught_CXX_error" != yes; then # 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 "X$list" | $Xsed' + 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; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -5804,10 +6338,10 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_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_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -5837,7 +6371,7 @@ if test "$_lt_caught_CXX_error" != yes; then case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-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 @@ -5848,9 +6382,9 @@ if test "$_lt_caught_CXX_error" != yes; then *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -5861,7 +6395,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -5879,7 +6413,7 @@ if test "$_lt_caught_CXX_error" != yes; then # 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 "X$list" | $Xsed' + 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; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5916,26 +6450,26 @@ if test "$_lt_caught_CXX_error" != yes; then pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_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' ;; @@ -5943,7 +6477,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_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' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -5962,9 +6496,9 @@ if test "$_lt_caught_CXX_error" != yes; then # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5984,13 +6518,13 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_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' + _LT_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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # 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' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6059,7 +6593,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6094,15 +6628,15 @@ if test "$_lt_caught_CXX_error" != yes; then case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; @@ -6118,17 +6652,17 @@ if test "$_lt_caught_CXX_error" != yes; then # 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 "X$templist" | $Xsed -e "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 "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -6138,7 +6672,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -6174,7 +6708,7 @@ if test "$_lt_caught_CXX_error" != yes; then solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -6195,7 +6729,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac _LT_TAGVAR(link_all_deplibs, $1)=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6215,14 +6749,14 @@ if test "$_lt_caught_CXX_error" != yes; then if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_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' + $CC -shared $pic_flag -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"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -6233,7 +6767,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' @@ -6287,6 +6821,10 @@ if test "$_lt_caught_CXX_error" != yes; then CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -6342,6 +6880,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -6356,6 +6895,29 @@ AC_LANG_POP ])# _LT_LANG_CXX_CONFIG +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6364,6 +6926,7 @@ AC_LANG_POP # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= @@ -6413,7 +6976,20 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then @@ -6425,7 +7001,7 @@ if AC_TRY_EVAL(ac_compile); then pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -6434,13 +7010,22 @@ if AC_TRY_EVAL(ac_compile); then test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} 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. @@ -6460,8 +7045,10 @@ if AC_TRY_EVAL(ac_compile); then _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -6497,6 +7084,7 @@ else fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], @@ -6533,7 +7121,7 @@ linux*) solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -6577,32 +7165,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1], ])# _LT_SYS_HIDDEN_LIBDEPS -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6612,7 +7184,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -6621,6 +7192,8 @@ _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6660,7 +7233,9 @@ if test "$_lt_disable_F77" != yes; then # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6714,38 +7289,24 @@ if test "$_lt_disable_F77" != yes; then GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6755,7 +7316,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -6764,6 +7324,8 @@ _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6803,7 +7365,9 @@ if test "$_lt_disable_FC" != yes; then # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -6859,7 +7423,8 @@ if test "$_lt_disable_FC" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP @@ -6896,10 +7461,12 @@ _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" @@ -6909,6 +7476,8 @@ _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6928,10 +7497,82 @@ fi AC_LANG_RESTORE GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_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_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -6963,9 +7604,11 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} +CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6978,7 +7621,8 @@ fi GCC=$lt_save_GCC AC_LANG_RESTORE -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG @@ -6998,6 +7642,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -7037,6 +7688,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) # _LT_DECL_SED # ------------ @@ -7130,8 +7790,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -7170,208 +7830,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) -_LT_EOF -esac + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac ;; - esac + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac ]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index 34151a3..5d9acd8 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -1,13 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. # Written by Gary V. Vaughan, 2004 # # 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 6 ltoptions.m4 +# serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -125,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) @@ -133,13 +134,13 @@ case $host in esac test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl +_LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], @@ -325,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index f3c5309..07a8602 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -7,17 +7,17 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# Generated from ltversion.in. +# @configure_input@ -# serial 3017 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 index 637bb20..c573da9 100644 --- a/m4/lt~obsolete.m4 +++ b/m4/lt~obsolete.m4 @@ -1,13 +1,13 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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 lt~obsolete.m4 +# serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # @@ -77,7 +77,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) @@ -90,3 +89,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/m4/vapigen.m4 b/m4/vapigen.m4 new file mode 100644 index 0000000..c909726 --- /dev/null +++ b/m4/vapigen.m4 @@ -0,0 +1,43 @@ + +dnl vala.m4 +dnl +dnl Copyright 2010 Marc-Andre Lureau +dnl Copyright 2011 Rodney Dawes +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +dnl dropped everything but VALA_PROG_VAPIGEN - Jens Georg + +# Check whether the Vala API Generator exists in `PATH'. If it is found, +# the variable VAPIGEN is set. Optionally a minimum release number of the +# generator can be requested. +# +# VALA_PROG_VAPIGEN([MINIMUM-VERSION]) +# ------------------------------------ +AC_DEFUN([GUPNP_PROG_VAPIGEN], +[AC_PATH_PROG([VAPIGEN], [vapigen], []) + AS_IF([test -z "$VAPIGEN"], + [AC_MSG_WARN([No Vala API Generator found. You will not be able to generate .vapi files.])], + [AS_IF([test -n "$1"], + [AC_MSG_CHECKING([$VAPIGEN is at least version $1]) + am__vapigen_version=`$VAPIGEN --version | sed 's/Vala API Generator *//'` + AS_VERSION_COMPARE([$1], ["$am__vapigen_version"], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_WARN([Vala API Generator $1 not found.]) + VAPIGEN="" + ])])]) +]) diff --git a/packaging/gupnp.spec b/packaging/gupnp.spec index 901aa26..13ba251 100644 --- a/packaging/gupnp.spec +++ b/packaging/gupnp.spec @@ -1,42 +1,38 @@ Name: gupnp -Version: 0.14.1_6 -Release: 1 -Summary: GUPNP -Group: / +Summary: GUPnP is an framework for creating UPnP devices & control points +Version: 0.20.5 +Release: 1 +Group: System/Libraries License: LGPL-2.0+ -URL: http://www.gupnp.org/ +URL: http://www.gupnp.org/ Source0: %{name}-%{version}.tar.gz -Patch1: missed_service_node_bug.patch -BuildRequires: pkgconfig(glib-2.0) >= 2.18 -BuildRequires: pkgconfig(gobject-2.0) >= 2.18 +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gmodule-2.0) -BuildRequires: pkgconfig(gssdp-1.0) >= 0.7.1 -BuildRequires: pkgconfig(libsoup-2.4) >= 2.4.1 -BuildRequires: pkgconfig(libxml-2.0) -# need dbus-glib-1 for use network-manager -BuildRequires: pkgconfig(dbus-glib-1) >= 0.76 -BuildRequires: pkgconfig(uuid) -BuildRequires: pkgconfig(gthread-2.0) -BuildRequires: autoconf >= 2.67 +BuildRequires: pkgconfig(gssdp-1.0) +BuildRequires: pkgconfig(libsoup-2.4) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(uuid) +#BuildRequires: gobject-introspection-devel +#BuildRequires: vala + + %description -GUPnP is an object-oriented open source framework for creating UPnP devices and -control points, written in C using GObject and libsoup. The GUPnP API is -intended to be easy to use, efficient and flexible. +GUPnP is an object-oriented open source framework for creating UPnP +devices and control points, written in C using GObject and libsoup. +The GUPnP API is intended to be easy to use, efficient and flexible. %package devel -Summary: GUPNP (devel) -Group: Development/Headers +Summary: Development package for gupnp +Group: Development/Libraries License: LGPL-2.0+ Requires: %{name} = %{version}-%{release} %description devel -GUPnP is an object-oriented open source framework for creating UPnP devices and -control points, written in C using GObject and libsoup. The GUPnP API is -intended to be easy to use, efficient and flexible. +Files for development with gupnp. %prep -%setup -q -%patch1 -p1 +%setup -q -n %{name}-%{version} %build %configure --prefix=/usr --with-context-manager=network-manager diff --git a/tests/Makefile.am b/tests/Makefile.am index c37fe1d..8209270 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,9 +1,12 @@ +SUBDIRS = gtest + AM_CFLAGS = $(LIBGUPNP_CFLAGS) $(GTHREAD_CFLAGS) -I$(top_srcdir) noinst_PROGRAMS = test-browsing \ test-proxy \ test-server \ - test-introspection + test-introspection \ + test-white-list test_browsing_SOURCES = test-browsing.c test_browsing_LDADD = $(top_builddir)/libgupnp/libgupnp-1.0.la \ @@ -26,6 +29,11 @@ test_server_LDADD = $(top_builddir)/libgupnp/libgupnp-1.0.la \ $(LIBGUPNP_LIBS) test_server_LDFLAGS = -export-dynamic +test_white_list_SOURCES = test-white-list.c +test_white_list_LDADD = $(top_builddir)/libgupnp/libgupnp-1.0.la \ + $(GTHREAD_LIBS) \ + $(LIBGUPNP_LIBS) + CLEANFILES = $(BUILT_SOURCES) DISTCLEANFILES = $(BUILT_SOURCES) MAINTAINERCLEANFILES = Makefile.in $(BUILT_SOURCES) diff --git a/tests/Makefile.in b/tests/Makefile.in index ac1762b..9f8fcb1 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,8 +51,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ noinst_PROGRAMS = test-browsing$(EXEEXT) test-proxy$(EXEEXT) \ - test-server$(EXEEXT) test-introspection$(EXEEXT) + test-server$(EXEEXT) test-introspection$(EXEEXT) \ + test-white-list$(EXEEXT) subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -43,7 +62,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -56,8 +75,8 @@ test_browsing_OBJECTS = $(am_test_browsing_OBJECTS) am__DEPENDENCIES_1 = test_browsing_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am_test_introspection_OBJECTS = test-introspection.$(OBJEXT) test_introspection_OBJECTS = $(am_test_introspection_OBJECTS) @@ -75,8 +94,13 @@ test_server_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la \ test_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(test_server_LDFLAGS) $(LDFLAGS) -o $@ +am_test_white_list_OBJECTS = test-white-list.$(OBJEXT) +test_white_list_OBJECTS = $(am_test_white_list_OBJECTS) +test_white_list_DEPENDENCIES = \ + $(top_builddir)/libgupnp/libgupnp-1.0.la $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -85,29 +109,74 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(test_browsing_SOURCES) $(test_introspection_SOURCES) \ - $(test_proxy_SOURCES) $(test_server_SOURCES) + $(test_proxy_SOURCES) $(test_server_SOURCES) \ + $(test_white_list_SOURCES) DIST_SOURCES = $(test_browsing_SOURCES) $(test_introspection_SOURCES) \ - $(test_proxy_SOURCES) $(test_server_SOURCES) + $(test_proxy_SOURCES) $(test_server_SOURCES) \ + $(test_white_list_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -119,13 +188,14 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ -DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -134,28 +204,34 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ -LIBCONIC_LIBS = @LIBCONIC_LIBS@ LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ LIBOBJS = @LIBOBJS@ @@ -166,6 +242,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -189,12 +266,14 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -USE_CONIC = @USE_CONIC@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -227,7 +306,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -239,10 +317,15 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +SUBDIRS = gtest AM_CFLAGS = $(LIBGUPNP_CFLAGS) $(GTHREAD_CFLAGS) -I$(top_srcdir) test_browsing_SOURCES = test-browsing.c test_browsing_LDADD = $(top_builddir)/libgupnp/libgupnp-1.0.la \ @@ -265,10 +348,15 @@ test_server_LDADD = $(top_builddir)/libgupnp/libgupnp-1.0.la \ $(LIBGUPNP_LIBS) test_server_LDFLAGS = -export-dynamic +test_white_list_SOURCES = test-white-list.c +test_white_list_LDADD = $(top_builddir)/libgupnp/libgupnp-1.0.la \ + $(GTHREAD_LIBS) \ + $(LIBGUPNP_LIBS) + CLEANFILES = $(BUILT_SOURCES) DISTCLEANFILES = $(BUILT_SOURCES) MAINTAINERCLEANFILES = Makefile.in $(BUILT_SOURCES) -all: all-am +all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -311,18 +399,21 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -test-browsing$(EXEEXT): $(test_browsing_OBJECTS) $(test_browsing_DEPENDENCIES) +test-browsing$(EXEEXT): $(test_browsing_OBJECTS) $(test_browsing_DEPENDENCIES) $(EXTRA_test_browsing_DEPENDENCIES) @rm -f test-browsing$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_browsing_OBJECTS) $(test_browsing_LDADD) $(LIBS) -test-introspection$(EXEEXT): $(test_introspection_OBJECTS) $(test_introspection_DEPENDENCIES) +test-introspection$(EXEEXT): $(test_introspection_OBJECTS) $(test_introspection_DEPENDENCIES) $(EXTRA_test_introspection_DEPENDENCIES) @rm -f test-introspection$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_introspection_OBJECTS) $(test_introspection_LDADD) $(LIBS) -test-proxy$(EXEEXT): $(test_proxy_OBJECTS) $(test_proxy_DEPENDENCIES) +test-proxy$(EXEEXT): $(test_proxy_OBJECTS) $(test_proxy_DEPENDENCIES) $(EXTRA_test_proxy_DEPENDENCIES) @rm -f test-proxy$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_proxy_OBJECTS) $(test_proxy_LDADD) $(LIBS) -test-server$(EXEEXT): $(test_server_OBJECTS) $(test_server_DEPENDENCIES) +test-server$(EXEEXT): $(test_server_OBJECTS) $(test_server_DEPENDENCIES) $(EXTRA_test_server_DEPENDENCIES) @rm -f test-server$(EXEEXT) $(AM_V_CCLD)$(test_server_LINK) $(test_server_OBJECTS) $(test_server_LDADD) $(LIBS) +test-white-list$(EXEEXT): $(test_white_list_OBJECTS) $(test_white_list_DEPENDENCIES) $(EXTRA_test_white_list_DEPENDENCIES) + @rm -f test-white-list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_white_list_OBJECTS) $(test_white_list_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -334,30 +425,28 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-introspection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-proxy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-white-list.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -365,6 +454,76 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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 \ @@ -375,10 +534,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ + set "$$@" "$$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; \ @@ -397,7 +569,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -447,24 +619,55 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +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-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -479,81 +682,83 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -561,9 +766,10 @@ uninstall-am: 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 + 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 # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/gtest/Makefile.am b/tests/gtest/Makefile.am new file mode 100644 index 0000000..2602a00 --- /dev/null +++ b/tests/gtest/Makefile.am @@ -0,0 +1,19 @@ +TESTS_ENVIRONMENT = G_SLICE=debug-blocks \ + LD_LIBRARY_PATH=$(top_builddir)/libgupnp/.libs:$(LD_LIBRARY_PATH) + +TESTS=$(check_PROGRAMS) + +check_PROGRAMS = test-context test-bugs + +test_context_SOURCES = test-context.c +test_bugs_SOURCES = test-bugs.c + +LDADD = \ + $(top_builddir)/libgupnp/libgupnp-1.0.la \ + $(LIBGUPNP_LIBS) +AM_CFLAGS = \ + $(LIBGUPNP_CFLAGS) \ + -I $(top_srcdir) \ + -DDATA_PATH="\"$(srcdir)/data\"" + +EXTRA_DIST=data/random4k.bin data/ServiceBgo69762.xml data/TestBgo696762.xml diff --git a/tests/gtest/Makefile.in b/tests/gtest/Makefile.in new file mode 100644 index 0000000..f527241 --- /dev/null +++ b/tests/gtest/Makefile.in @@ -0,0 +1,672 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +check_PROGRAMS = test-context$(EXEEXT) test-bugs$(EXEEXT) +subdir = tests/gtest +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_test_bugs_OBJECTS = test-bugs.$(OBJEXT) +test_bugs_OBJECTS = $(am_test_bugs_OBJECTS) +test_bugs_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +test_bugs_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am_test_context_OBJECTS = test-context.$(OBJEXT) +test_context_OBJECTS = $(am_test_context_OBJECTS) +test_context_LDADD = $(LDADD) +test_context_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la \ + $(am__DEPENDENCIES_1) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(test_bugs_SOURCES) $(test_context_SOURCES) +DIST_SOURCES = $(test_bugs_SOURCES) $(test_context_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GREP = @GREP@ +GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ +GTHREAD_LIBS = @GTHREAD_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ +LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +TESTS_ENVIRONMENT = G_SLICE=debug-blocks \ + LD_LIBRARY_PATH=$(top_builddir)/libgupnp/.libs:$(LD_LIBRARY_PATH) + +TESTS = $(check_PROGRAMS) +test_context_SOURCES = test-context.c +test_bugs_SOURCES = test-bugs.c +LDADD = \ + $(top_builddir)/libgupnp/libgupnp-1.0.la \ + $(LIBGUPNP_LIBS) + +AM_CFLAGS = \ + $(LIBGUPNP_CFLAGS) \ + -I $(top_srcdir) \ + -DDATA_PATH="\"$(srcdir)/data\"" + +EXTRA_DIST = data/random4k.bin data/ServiceBgo69762.xml data/TestBgo696762.xml +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/gtest/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/gtest/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +test-bugs$(EXEEXT): $(test_bugs_OBJECTS) $(test_bugs_DEPENDENCIES) $(EXTRA_test_bugs_DEPENDENCIES) + @rm -f test-bugs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bugs_OBJECTS) $(test_bugs_LDADD) $(LIBS) +test-context$(EXEEXT): $(test_context_OBJECTS) $(test_context_DEPENDENCIES) $(EXTRA_test_context_DEPENDENCIES) + @rm -f test-context$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_context_OBJECTS) $(test_context_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bugs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-context.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__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) '; \ + $(am__tty_colors); \ + 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`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + 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 \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + 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`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$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 + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS 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-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/gtest/data/ServiceBgo69762.xml b/tests/gtest/data/ServiceBgo69762.xml new file mode 100644 index 0000000..f2a0e38 --- /dev/null +++ b/tests/gtest/data/ServiceBgo69762.xml @@ -0,0 +1,107 @@ + + + 1 + 0 + + + + A_ARG_TYPE_ObjectID + string + + + A_ARG_TYPE_Result + string + + + A_ARG_TYPE_BrowseFlag + string + + BrowseMetadata + BrowseDirectChildren + + + + A_ARG_TYPE_Filter + string + + + A_ARG_TYPE_SortCriteria + string + + + A_ARG_TYPE_Index + ui4 + + + A_ARG_TYPE_Count + ui4 + + + + + Browse + + + ObjectID + in + + A_ARG_TYPE_ObjectID + + + BrowseFlag + in + + A_ARG_TYPE_BrowseFlag + + + Filter + in + + A_ARG_TYPE_Filter + + + StartingIndex + in + + A_ARG_TYPE_Index + + + RequestedCount + in + + A_ARG_TYPE_Count + + + SortCriteria + in + + A_ARG_TYPE_SortCriteria + + + Result + out + + A_ARG_TYPE_Result + + + NumberReturned + out + + A_ARG_TYPE_Count + + + TotalMatches + out + + A_ARG_TYPE_Count + + + UpdateID + out + + A_ARG_TYPE_UpdateID + + + + + diff --git a/tests/gtest/data/TestBgo696762.xml b/tests/gtest/data/TestBgo696762.xml new file mode 100644 index 0000000..a0c0711 --- /dev/null +++ b/tests/gtest/data/TestBgo696762.xml @@ -0,0 +1,21 @@ + + +1 +0 + + +urn:test-gupnp-org:device:TestBgo696762:1 +Regression Test for bgo#696762 +https://bugzilla.gnome.org/show_bug.cgi?id=696762 +uuid:1234 + + +urn:test-gupnp-org:service:bgo696762:1 +urn:test-gupnp-org:serviceId:bgo696762:1 +/ServiceBgo69762.xml +/ServiceBgo69762/Control +/ServiceBgo69762/Event + + + + diff --git a/tests/gtest/data/random4k.bin b/tests/gtest/data/random4k.bin new file mode 100644 index 0000000000000000000000000000000000000000..19d5833e1c50fbf0aba4bfe61db2b622ddce1f04 GIT binary patch literal 4096 zcmV+b5dZJi%UG6Q`NI;4d!}&I%Kr{?(J3&1Kv_S&C0{ekJfcn+T;qP&a2p3}IDvL@ zQ2rDCq8znE0wSHZbm&}=-$z_fG1|V?>rMyizuwUQJ|_VUbDcJh_H21y1Tj(I!UG>5KayLWp{?R z5#WeVB*I^dL33Mupdp-9f{QQ1kD)4}lTZxj7 zfKfroRsj7PIciW^oK(Jc2Bf(lf>fq233yRUqJvnRgA=|11j@Ynp13RI%S`uMA+5z2 z>9R(cx-z}nki&{^GF3s^b^&wf?ci^Rbv@)ax^fg<=f*>j?buI~vjYH3bLSmepe(%H zVfxvtxk}ZZ-=ydrrvfr3);bKh(J!L3z29@Oh6LJF9F&86hcXTl35)zksv5ZWpVvq_ zw|$%66g<8^%0t`VT~!AY8j6}pPs&8y&$>DpA&9^E=C#Zn2`F@of8BHtMn^6udGpd$ z$G>z{#dt=leNO$u{XL~+60DzZS2BPJ2`an+mLyZ_%BalGFTfGJcGBkci zJKFJ|Wl{?wA4&wZEQ_UF(%3hdSIB%={4|QF?PFed8)QoJ9c3g4k@|mN>{B6s$EC9P zh%BNwgG7g>bPvoc$pAp|ofA8FizUoW9@gXt8yxwpb`gAsYn=xlWTY_oekAzsCSZ^A z-%hBA-dYv19U%caSR<_X^fyHD;AU^|z{2tJ*Vi|QjRCi}l_pIE+^|+~&*)Fcn^J(x zQOfbIdMD@$23%IvNCnyU7kWU=Xc<7UxrRpPa`Z#}?~(#`DG)EBeFs6s7;sLH1cV3? zT5s`tS+3F-4ooA@)b*;<$@Ji_P0^kz&0dak96dwj8!pE6N*nw|$v@Bmy*m9?=>;<@ z+-_fC#ZH%;m)8i2cYX@MOL?9iwTOBxvZ{sP{uI{ULZ$j+RgPEt5Qsr0+4S@&;btoy zdcP%$C&W#G3Rni6Ln#^|19XT={Q^@DoeJ>*(zy6;#mWtC&3p^BbwL3OMnKyd#Q^vV zAdJ;-hlMnbSNSO!WIR~e0{wEHpNnm*gb~V4#UoVDaHj@S*VYuDa^pQT$(>2?A~0_7 zJ#M#r!(8u}S>WFIWc|(;L%<_}cg`edY^WVxa?<<;_~Yu=WHQs{jE%i7-B}W|za?6Q z*V-}3pBH-}Of)(Vn-h*_*~~za;&K@@e-^1P4cw+Sli7zYb{@VyHaAU%EhXu@@IMc; z%xUj@=^cPJe;+p`-w)JAVGO@a%nF$h5#l2=JY>O&t)0_+N)vR#U|{FYSF)BS?~Nc> zD0y)xv5g&>5pJs`HQx7H1r=fxzvnK}i<&CpOVwIK+Co>BuJNKy&g3Thdqhz& zhvNMA8b}CWFzs(krZtAU+Roknxk?l^#=K&m@-A|7G$Qb(qjalt#4yiI)KSd@4!Kz= z>q-VrP>;^yl0_OOn@LriF0L1PKOAno@+c{^w zOwH_R@o00LLM0gk$j(}tId-=FqrQ;(OFU*Eg#r;D$LS?5Y^9x@U!4DX^@qLA-P(5Q z#Sq9f7Ex>bl>e1mjXj0LBJBvsfD{R2XMK}THjREO>3F5*Gm0pU!O;x-O7oeJk;mE@ zr|*eXoUV=@nh8&MUm0{iNRG&me2^{pE4N=u__}}iX#?AF(qk%23VNw};p(Fm$Ig<| z;m#d#Il1zgyVWiUOl5pWpA$(+LBG+Kzvl6Hw{DOm9(ZK~mXygh0P&)#GVB#a-76u? zAa;0gI2RR8SEEtDClq}~s&ZvvHgP6x1~V8I0qy(bt%F6a!gGnY(q%#w9x*PQHr0<8 zi@%;~DS}neDcLXj^5yEQ9>mHO=&lzqmvM%IkrEinF&$!17;|3LpSyJ%{^fYE77-2V z7d^h(7+8F$;4uzdpl=8uUvSg97=55kxSbbpz~OGMTT%v*DcmCxI2=j^r~L1YLk~$1 zZm*BsRX(;LlIitO`fFB!x$wxCSf?}}NKPv-NV`2gGUZ|dj;}?-|B9N)81~DZZ~9_$ z5(|Bp<+b&p)c-3Kh)~(L5pXt7b2xhchj6jtIrT53Lsl5x_Fm+y4@V}qM?YmDc8!Ck z2xTYyzeXM=yfKTWgml$B}m(odn!&+?E1np z$*Ey;pB=2$dx%o{yL+31U?ikTFosA+do!ykSQi7gQ>}6;;gvooncNndS z9~%AT%Sp2P?b$7=SSeZ!fXIn-$`v7gH5%enjn+JDFhF~^1^cjE?^Vua3@IEFg-W!Z zkGFZNbgI@B_HO}bVllQ7S3F=WCo+Vacre?hJ1O(IL7t~_fct>|OvZmck0Z-`9c(w)4y`I>4y7?`j9MwN-IkK8vI7&x8L@xTKM%>!CxjP zuzL*5G$?$FO{Y~Ws`-wn3`0iiB~T+i1RdUH8bzHBG5n%UJS1^@HGmsUZojLIeT-?q zHF0oK%0gYl$>2??(wM=0)_C0rX-TdpEZ#d<{39=lx6GqnTKNby>ix(7o(EGV+87hP zJHj5W62lkS$5dp<@1!`ikcm(dJQL05`{e`q$kdQ__(su; zIJjBD#gUWGq%xEuOe}fx^MizmQ0l*))WKaI6F`j9ie?kK19k8)%u^$Y$3x&3!*AlB zPJ96nk(d3|+AjG>fi5cf5feJPT|k}HGR)Mb_cJl?O1aOu-37CS?Du~?9__r@Pkcoz6iLKySs$jgRXL=c^&CDF#x(?VVP|5}%7Xm{C26Vkbg+3Wk*&6UNv0Z?BM4KImL5WlK94j~xCli)H~n z(2;A!kY4?dYFN>3@&fO(HcXK`T@pGZUYJqx*r`V1bxt+FjV_=Gu2CD5uDXsIn0x>8 zpEr0OreVztOYNwF*M9B*zW3wyR_;$elfj1hgb9=ZYrNBC$FatI-#OA%U0wI`+*_zwWcjKc7H{&^Q)_%}D70T8-5jDS(D5NpADZ!H z^rk2*-{-g}iY%2&!{TQAqEuVsVV(Z_V8zNW%(5#C<(3T}H5Ji!YYmWr4|>wTNrrS8 zfWQ1`)Khe=(a|1iUR3DQPN9io#+4(l-@}!pI+ZcXPoEv|XZsXEm&$G+9m-^wSYG9H zmu)}l6&(>xF<6^)pF*+z+5}qcyS(o5`*B|+hM$->Klbm56}leU&N55+Yj{b(wq~vQ zYHyp{%-}JaTZ0h169EaZh9g2KD4rK;ky=ZagC>u(ZvZHMhG^=MFcI0jx>b73n==Z#yMr(f6jR)7ctfi! z4G5ZZO~D+PsS4H}s}8*Wp(C!Ja}hxS z4p}W)*9@v(2JXJ`LCF#C)|rOS!%8E}oOC%^<<(@amb{F6xVKu7cc8O`gdzdU%OxI= yrP9DFyI2qUs33?*V~ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + + +struct _GUPnPServiceAction { + volatile gint ref_count; + + GUPnPContext *context; + + char *name; + + SoupMessage *msg; + gboolean accept_gzip; + + GUPnPXMLDoc *doc; + xmlNode *node; + + GString *response_str; + + guint argument_count; +}; + +typedef struct _TestBgo696762Data { + GMainLoop *loop; + GUPnPServiceProxy *proxy; +} TestBgo696762Data; + +static void +test_bgo_696762_on_browse_call (G_GNUC_UNUSED GUPnPService *service, + G_GNUC_UNUSED GUPnPServiceAction *action, + G_GNUC_UNUSED gpointer user_data) +{ + xmlNode *node = action->node->children; + g_assert (node != NULL); + g_assert_cmpstr ((const char *) node->name, ==, "ObjectID"); + node = node->next; + + g_assert (node != NULL); + g_assert_cmpstr ((const char *) node->name, ==, "BrowseFlag"); + node = node->next; + + g_assert (node != NULL); + g_assert_cmpstr ((const char *) node->name, ==, "Filter"); + node = node->next; + + g_assert (node != NULL); + g_assert_cmpstr ((const char *) node->name, ==, "StartingIndex"); + node = node->next; + + g_assert (node != NULL); + g_assert_cmpstr ((const char *) node->name, ==, "RequestedCount"); + node = node->next; + + g_assert (node != NULL); + g_assert_cmpstr ((const char *) node->name, ==, "SortCriteria"); + node = node->next; + gupnp_service_action_return (action); +} + +static void +test_bgo_696762_on_browse (G_GNUC_UNUSED GUPnPServiceProxy *proxy, + G_GNUC_UNUSED GUPnPServiceProxyAction *action, + gpointer user_data) +{ + TestBgo696762Data *data = (TestBgo696762Data *) user_data; + + g_main_loop_quit (data->loop); +} + +static void +test_bgo_696762_on_sp_available (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy, + gpointer user_data) +{ + TestBgo696762Data *data = (TestBgo696762Data *) user_data; + + data->proxy = g_object_ref (proxy); + + g_main_loop_quit (data->loop); +} + +static gboolean +test_bgo_696762_on_timeout (G_GNUC_UNUSED gpointer user_data) +{ + g_assert_not_reached (); + + return FALSE; +} + +/* Test if a call on a service proxy keeps argument order */ +static void +test_bgo_696762 (void) +{ + GUPnPContext *context = NULL; + GError *error = NULL; + GUPnPControlPoint *cp = NULL; + guint timeout_id = 0; + GUPnPRootDevice *rd; + TestBgo696762Data data = { NULL, NULL }; + GUPnPServiceInfo *info = NULL; + + data.loop = g_main_loop_new (NULL, FALSE); + + context = gupnp_context_new (NULL, "lo", 0, &error); + g_assert (context != NULL); + g_assert (error == NULL); + + cp = gupnp_control_point_new (context, + "urn:test-gupnp-org:service:bgo696762:1"); + + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + + g_signal_connect (G_OBJECT (cp), + "service-proxy-available", + G_CALLBACK (test_bgo_696762_on_sp_available), + &data); + + + rd = gupnp_root_device_new (context, "TestBgo696762.xml", DATA_PATH); + gupnp_root_device_set_available (rd, TRUE); + info = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (rd), + "urn:test-gupnp-org:service:bgo696762:1"); + g_signal_connect (G_OBJECT (info), + "action-invoked::Browse", + G_CALLBACK (test_bgo_696762_on_browse_call), + &data); + + timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop)); + g_main_loop_run (data.loop); + g_source_remove (timeout_id); + g_assert (data.proxy != NULL); + + gupnp_service_proxy_begin_action (data.proxy, + "Browse", + test_bgo_696762_on_browse, + &data, + "ObjectID", G_TYPE_STRING, "0", + "BrowseFlag", G_TYPE_STRING, "BrowseDirectChildren", + "Filter", G_TYPE_STRING, "res,dc:date,res@size", + "StartingIndex", G_TYPE_UINT, 0, + "RequestedCount", G_TYPE_UINT, 0, + "SortCriteria", G_TYPE_STRING, "", + NULL); + + timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop)); + g_main_loop_run (data.loop); + g_source_remove (timeout_id); +} + +int +main (int argc, char *argv[]) { +#if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); +#endif + g_test_init (&argc, &argv, NULL); + g_test_add_func ("/bugs/696762", test_bgo_696762); + + return g_test_run (); +} diff --git a/tests/gtest/test-context.c b/tests/gtest/test-context.c new file mode 100644 index 0000000..bbcfd27 --- /dev/null +++ b/tests/gtest/test-context.c @@ -0,0 +1,220 @@ +/* + * Copyright (C) 2012 Nokia. + * + * Author: Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include +#include "libgupnp/gupnp.h" + +static void +on_message_finished (G_GNUC_UNUSED SoupSession *session, + G_GNUC_UNUSED SoupMessage *message, + gpointer user_data) { + GMainLoop *loop = (GMainLoop*) user_data; + + g_main_loop_quit (loop); +} + +static void +request_range_and_compare (GMappedFile *file, + SoupSession *session, + GMainLoop *loop, + const char *uri, + goffset want_start, + goffset want_end) +{ + SoupMessage *message = NULL; + goffset want_length = 0, full_length = 0; + goffset got_start = 0, got_end = 0, got_length = 0; + int result = 0; + + full_length = g_mapped_file_get_length (file); + + /* interpretation according to SoupRange documentation */ + if (want_end == -1) { + if (want_start < 0) + want_length = -want_start; + else + want_length = full_length - want_start; + } else + want_length = want_end - want_start + 1; + + message = soup_message_new ("GET", uri); + g_object_ref (message); + + soup_message_headers_set_range (message->request_headers, + want_start, + want_end); + + /* interpretation according to SoupRange documentation */ + if (want_end == -1) { + if (want_start < 0) { + want_length = -want_start; + want_start = full_length + want_start; + want_end = want_start + want_length - 1; + } + else { + want_length = full_length - want_start; + want_end = full_length - 1; + } + } else + want_length = want_end - want_start + 1; + + + soup_session_queue_message (session, + message, + on_message_finished, + loop); + + g_main_loop_run (loop); + g_assert_cmpint (message->status_code, ==, SOUP_STATUS_PARTIAL_CONTENT); + g_assert_cmpint (message->response_body->length, ==, want_length); + got_length = soup_message_headers_get_content_length + (message->response_headers); + g_assert_cmpint (got_length, ==, want_length); + soup_message_headers_get_content_range (message->response_headers, + &got_start, + &got_end, + &got_length); + g_assert_cmpint (got_start, ==, want_start); + g_assert_cmpint (got_end, ==, want_end); + result = memcmp (g_mapped_file_get_contents (file) + want_start, + message->response_body->data, + want_length); + g_assert_cmpint (result, ==, 0); + + g_object_unref (message); + + message = soup_message_new ("GET", uri); + g_object_ref (message); +} + +static void +test_gupnp_context_http_ranged_requests (void) +{ + GUPnPContext *context = NULL; + GError *error = NULL; + SoupSession *session = NULL; + SoupMessage *message = NULL; + guint port = 0; + char *uri = NULL; + GMainLoop *loop; + GMappedFile *file; + goffset file_length = 0; + + loop = g_main_loop_new (NULL, FALSE); + g_assert (loop != NULL); + + file = g_mapped_file_new (DATA_PATH "/random4k.bin", + FALSE, + &error); + g_assert (file != NULL); + g_assert (error == NULL); + file_length = g_mapped_file_get_length (file); + + context = gupnp_context_new (NULL, + "lo", + 0, + &error); + g_assert (context != NULL); + g_assert (error == NULL); + port = gupnp_context_get_port (context); + + gupnp_context_host_path (context, + DATA_PATH "/random4k.bin", + "/random4k.bin"); + + uri = g_strdup_printf ("http://127.0.0.1:%u/random4k.bin", port); + g_assert (uri != NULL); + + session = soup_session_async_new (); + + /* Corner cases: First byte */ + request_range_and_compare (file, session, loop, uri, 0, 0); + + /* Corner cases: Last byte */ + request_range_and_compare (file, + session, + loop, + uri, + file_length - 1, + file_length - 1); + + /* Examples from http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html */ + /* Request first 500 bytes */ + request_range_and_compare (file, session, loop, uri, 0, 499); + + /* Request second 500 bytes */ + request_range_and_compare (file, session, loop, uri, 500, 999); + + /* Request everything but the first 500 bytes */ + request_range_and_compare (file, session, loop, uri, 500, file_length - 1); + + /* Request the last 500 bytes */ + request_range_and_compare (file, session, loop, uri, file_length - 500, file_length - 1); + + /* Request the last 500 bytes by using negative requests: Range: + * bytes: -500 */ + request_range_and_compare (file, session, loop, uri, -500, -1); + + /* Request the last 1k bytes by using negative requests: Range: + * bytes: 3072- */ + request_range_and_compare (file, session, loop, uri, 3072, -1); + + /* Try to get 1 byte after the end of the file */ + message = soup_message_new ("GET", uri); + g_object_ref (message); + + soup_message_headers_set_range (message->request_headers, + file_length, + file_length); + soup_session_queue_message (session, + message, + on_message_finished, + loop); + + g_main_loop_run (loop); + g_assert_cmpint (message->status_code, ==, SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE); + + g_object_unref (message); + + g_free (uri); + g_object_unref (context); + g_main_loop_unref (loop); + g_mapped_file_unref (file); +} + +int main (int argc, char *argv[]) { +#if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); +#endif + g_test_init (&argc, &argv, NULL); + g_test_add_func ("/context/http/ranged-requests", + test_gupnp_context_http_ranged_requests); + + g_test_run (); + + return 0; +} diff --git a/tests/test-browsing.c b/tests/test-browsing.c index a35d1a8..d052f82 100644 --- a/tests/test-browsing.c +++ b/tests/test-browsing.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -24,18 +24,19 @@ #include #include #include +#include GMainLoop *main_loop; static void -interrupt_signal_handler (int signum) +interrupt_signal_handler (G_GNUC_UNUSED int signum) { g_main_loop_quit (main_loop); } static void -device_proxy_available_cb (GUPnPControlPoint *cp, - GUPnPDeviceProxy *proxy) +device_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPDeviceProxy *proxy) { const char *type, *location; @@ -48,8 +49,8 @@ device_proxy_available_cb (GUPnPControlPoint *cp, } static void -device_proxy_unavailable_cb (GUPnPControlPoint *cp, - GUPnPDeviceProxy *proxy) +device_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPDeviceProxy *proxy) { const char *type, *location; @@ -62,8 +63,8 @@ device_proxy_unavailable_cb (GUPnPControlPoint *cp, } static void -service_proxy_available_cb (GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy) +service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { const char *type, *location; @@ -76,8 +77,8 @@ service_proxy_available_cb (GUPnPControlPoint *cp, } static void -service_proxy_unavailable_cb (GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy) +service_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { const char *type, *location; @@ -90,19 +91,22 @@ service_proxy_unavailable_cb (GUPnPControlPoint *cp, } int -main (int argc, char **argv) +main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) { GError *error; GUPnPContext *context; GUPnPControlPoint *cp; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ - g_thread_init (NULL); +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif setlocale (LC_ALL, ""); error = NULL; - context = gupnp_context_new (NULL, NULL, 0, &error); + context = g_initable_new (GUPNP_TYPE_CONTEXT, NULL, &error, NULL); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", error->message); @@ -135,10 +139,14 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); +#ifndef G_OS_WIN32 /* Hook the handler for SIGTERM */ memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT, interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop); diff --git a/tests/test-introspection.c b/tests/test-introspection.c index 7fee447..0a6ca16 100644 --- a/tests/test-introspection.c +++ b/tests/test-introspection.c @@ -17,8 +17,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -26,6 +26,7 @@ #include #include #include +#include GMainLoop *main_loop; @@ -38,7 +39,7 @@ static GOptionEntry entries[] = }; static void -interrupt_signal_handler (int signum) +interrupt_signal_handler (G_GNUC_UNUSED int signum) { g_main_loop_quit (main_loop); } @@ -172,7 +173,7 @@ static void got_introspection (GUPnPServiceInfo *info, GUPnPServiceIntrospection *introspection, const GError *error, - gpointer user_data) + G_GNUC_UNUSED gpointer user_data) { if (error) { g_warning ("Failed to create introspection for '%s': %s", @@ -191,8 +192,8 @@ got_introspection (GUPnPServiceInfo *info, } static void -service_proxy_available_cb (GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy) +service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { GUPnPServiceInfo *info; GUPnPServiceIntrospection *introspection; @@ -215,8 +216,8 @@ service_proxy_available_cb (GUPnPControlPoint *cp, } static void -service_proxy_unavailable_cb (GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy) +service_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { const char *type, *location; @@ -235,7 +236,9 @@ main (int argc, char **argv) GUPnPContext *context; GUPnPControlPoint *cp; GOptionContext *option_context; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ option_context = g_option_context_new ("- test GUPnP introspection"); g_option_context_add_main_entries (option_context, @@ -253,11 +256,12 @@ main (int argc, char **argv) return EXIT_FAILURE; } - g_thread_init (NULL); +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif error = NULL; - context = gupnp_context_new (NULL, NULL, 0, &error); + context = g_initable_new (GUPNP_TYPE_CONTEXT, NULL, &error, NULL); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", error->message); @@ -283,9 +287,13 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); /* Hook the handler for SIGTERM */ +#ifndef G_OS_WIN32 memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT,interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop); diff --git a/tests/test-proxy.c b/tests/test-proxy.c index f4f04cf..47ff0d2 100644 --- a/tests/test-proxy.c +++ b/tests/test-proxy.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -24,28 +24,29 @@ #include #include #include +#include GMainLoop *main_loop; static void -interrupt_signal_handler (int signum) +interrupt_signal_handler (G_GNUC_UNUSED int signum) { g_main_loop_quit (main_loop); } static void -subscription_lost_cb (GUPnPServiceProxy *proxy, - const GError *reason, - gpointer user_data) +subscription_lost_cb (G_GNUC_UNUSED GUPnPServiceProxy *proxy, + const GError *reason, + G_GNUC_UNUSED gpointer user_data) { g_print ("Lost subscription: %s\n", reason->message); } static void -notify_cb (GUPnPServiceProxy *proxy, - const char *variable, - GValue *value, - gpointer user_data) +notify_cb (G_GNUC_UNUSED GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data) { g_print ("Received a notification for variable '%s':\n", variable); g_print ("\tvalue: %d\n", g_value_get_uint (value)); @@ -53,8 +54,8 @@ notify_cb (GUPnPServiceProxy *proxy, } static void -service_proxy_available_cb (GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy) +service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { const char *location; char *result = NULL; @@ -134,8 +135,8 @@ service_proxy_available_cb (GUPnPControlPoint *cp, } static void -service_proxy_unavailable_cb (GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy) +service_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { const char *location; @@ -146,19 +147,22 @@ service_proxy_unavailable_cb (GUPnPControlPoint *cp, } int -main (int argc, char **argv) +main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) { GError *error; GUPnPContext *context; GUPnPControlPoint *cp; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ - g_thread_init (NULL); +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif setlocale (LC_ALL, ""); error = NULL; - context = gupnp_context_new (NULL, NULL, 0, &error); + context = g_initable_new (GUPNP_TYPE_CONTEXT, NULL, &error, NULL); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", error->message); @@ -185,9 +189,13 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); /* Hook the handler for SIGTERM */ +#ifndef G_OS_WIN32 memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT,interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop); diff --git a/tests/test-server.c b/tests/test-server.c index edf0709..095170b 100644 --- a/tests/test-server.c +++ b/tests/test-server.c @@ -15,8 +15,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -29,16 +29,16 @@ GMainLoop *main_loop; static void -interrupt_signal_handler (int signum) +interrupt_signal_handler (G_GNUC_UNUSED int signum) { g_main_loop_quit (main_loop); } static void -notify_failed_cb (GUPnPService *service, - const GList *callback_urls, - const GError *reason, - gpointer user_data) +notify_failed_cb (G_GNUC_UNUSED GUPnPService *service, + G_GNUC_UNUSED const GList *callback_urls, + const GError *reason, + G_GNUC_UNUSED gpointer user_data) { g_print ("NOTIFY failed: %s\n", reason->message); } @@ -62,7 +62,9 @@ main (int argc, char **argv) GUPnPContext *context; GUPnPRootDevice *dev; GUPnPServiceInfo *content_dir; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ if (argc < 2) { g_printerr ("Usage: %s DESCRIPTION_FILE\n", argv[0]); @@ -70,12 +72,13 @@ main (int argc, char **argv) return EXIT_FAILURE; } - g_thread_init (NULL); +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif setlocale (LC_ALL, ""); error = NULL; - context = gupnp_context_new (NULL, NULL, 0, &error); + context = g_initable_new (GUPNP_TYPE_CONTEXT, NULL, &error, NULL); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", error->message); @@ -120,9 +123,13 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); /* Hook the handler for SIGTERM */ +#ifndef G_OS_WIN32 memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT, interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop); diff --git a/tests/test-white-list.c b/tests/test-white-list.c new file mode 100644 index 0000000..465ac72 --- /dev/null +++ b/tests/test-white-list.c @@ -0,0 +1,291 @@ +/* + * Copyright (C) 2013 Intel Corporation. + * + * Author: Ludovic Ferrandis + * + * 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 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +GMainLoop *main_loop; + +static void +interrupt_signal_handler (G_GNUC_UNUSED int signum) +{ + g_main_loop_quit (main_loop); +} + +static void +device_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPDeviceProxy *proxy) +{ + const char *type, *location; + + type = gupnp_device_info_get_device_type (GUPNP_DEVICE_INFO (proxy)); + location = gupnp_device_info_get_location (GUPNP_DEVICE_INFO (proxy)); + + g_print ("Device available:\n"); + g_print ("\ttype: %s\n", type); + g_print ("\tlocation: %s\n", location); +} + +static void +device_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPDeviceProxy *proxy) +{ + const char *type, *location; + + type = gupnp_device_info_get_device_type (GUPNP_DEVICE_INFO (proxy)); + location = gupnp_device_info_get_location (GUPNP_DEVICE_INFO (proxy)); + + g_print ("Device unavailable:\n"); + g_print ("\ttype: %s\n", type); + g_print ("\tlocation: %s\n", location); +} + +static void +service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) +{ + const char *type, *location; + + type = gupnp_service_info_get_service_type (GUPNP_SERVICE_INFO (proxy)); + location = gupnp_service_info_get_location (GUPNP_SERVICE_INFO (proxy)); + + g_print ("Service available:\n"); + g_print ("\ttype: %s\n", type); + g_print ("\tlocation: %s\n", location); +} + +static void +service_proxy_unavailable_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) +{ + const char *type, *location; + + type = gupnp_service_info_get_service_type (GUPNP_SERVICE_INFO (proxy)); + location = gupnp_service_info_get_location (GUPNP_SERVICE_INFO (proxy)); + + g_print ("Service unavailable:\n"); + g_print ("\ttype: %s\n", type); + g_print ("\tlocation: %s\n", location); +} + +static void +context_available_cb(GUPnPContextManager *context_manager, + GUPnPContext *context, + gpointer user_data) +{ + GUPnPControlPoint *cp; + GSSDPClient *client = GSSDP_CLIENT(context); + + g_print ("Context Available:\n"); + g_print ("\tServer ID: %s\n", gssdp_client_get_server_id (client)); + g_print ("\tInterface: %s\n", gssdp_client_get_interface (client)); + g_print ("\tHost IP : %s\n", gssdp_client_get_host_ip (client)); + g_print ("\tNetwork : %s\n", gssdp_client_get_network (client)); + g_print ("\tActive : %s\n", gssdp_client_get_active (client)? "TRUE" : "FALSE"); + + + /* We're interested in everything */ + cp = gupnp_control_point_new (context, "ssdp:all"); + + g_signal_connect (cp, + "device-proxy-available", + G_CALLBACK (device_proxy_available_cb), + NULL); + g_signal_connect (cp, + "device-proxy-unavailable", + G_CALLBACK (device_proxy_unavailable_cb), + NULL); + g_signal_connect (cp, + "service-proxy-available", + G_CALLBACK (service_proxy_available_cb), + NULL); + g_signal_connect (cp, + "service-proxy-unavailable", + G_CALLBACK (service_proxy_unavailable_cb), + NULL); + + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + gupnp_context_manager_manage_control_point(context_manager, cp); + g_object_unref(cp); +} + +static void +context_unavailable_cb(GUPnPContextManager *context_manager, + GUPnPContext *context, + gpointer user_data) +{ + GSSDPClient *client = GSSDP_CLIENT(context); + + g_print ("Context Unavailable:\n"); + g_print ("\tServer ID: %s\n", gssdp_client_get_server_id (client)); + g_print ("\tInterface: %s\n", gssdp_client_get_interface (client)); + g_print ("\tHost IP : %s\n", gssdp_client_get_host_ip (client)); + g_print ("\tNetwork : %s\n", gssdp_client_get_network (client)); + g_print ("\tActive : %s\n", gssdp_client_get_active (client)? "TRUE" : "FALSE"); +} + +static void +print_wl_entry(gpointer data, gpointer user_data) +{ + g_print ("\t\t\tEntry: %s\n", (char *)data); +} + +static void +print_white_list_entries(GUPnPWhiteList *wl) +{ + GList *list; + + g_print ("\t\tWhite List Entries:\n"); + list = gupnp_white_list_get_entries(wl); + g_list_foreach (list, print_wl_entry, NULL); + g_print ("\n"); +} + +static gboolean +change_white_list(gpointer user_data) +{ + GUPnPContextManager *context_manager = user_data; + GUPnPWhiteList *white_list; + static int tomato = 0; + + g_print ("\nChange White List:\n"); + g_print ("\t Action number %d:\n", tomato); + + white_list = gupnp_context_manager_get_white_list(context_manager); + + switch (tomato) { + case 0: + g_print ("\t Add Entry eth0\n\n"); + gupnp_white_list_add_entry(white_list, "eth0"); + print_white_list_entries (white_list); + break; + case 1: + g_print ("\t Enable WL\n\n"); + gupnp_white_list_set_enabled (white_list, TRUE); + break; + case 2: + g_print ("\t Add Entry 127.0.0.1\n\n"); + gupnp_white_list_add_entry(white_list, "127.0.0.1"); + print_white_list_entries (white_list); + break; + case 3: + g_print ("\t Add Entry eth5\n\n"); + gupnp_white_list_add_entry(white_list, "eth5"); + print_white_list_entries (white_list); + break; + case 4: + g_print ("\t Remove Entry eth5\n\n"); + gupnp_white_list_remove_entry(white_list, "eth5"); + print_white_list_entries (white_list); + break; + case 5: + g_print ("\t Clear all entries\n\n"); + gupnp_white_list_clear(white_list); + print_white_list_entries (white_list); + break; + case 6: + g_print ("\t Add Entry wlan2\n\n"); + gupnp_white_list_add_entry(white_list, "wlan2"); + print_white_list_entries(white_list); + break; + case 7: + g_print ("\t Disable WL\n\n"); + gupnp_white_list_set_enabled (white_list, FALSE); + break; + case 8: + g_print ("\t Enable WL\n\n"); + gupnp_white_list_set_enabled (white_list, TRUE); + break; + case 9: + g_print ("\t Connect to wlan0\n\n"); + g_timeout_add_seconds (35, change_white_list, context_manager); + break; + case 10: + g_print ("\t Add Entry wlan0\n\n"); + gupnp_white_list_add_entry(white_list, "wlan0"); + print_white_list_entries (white_list); + break; + //~ case 11: + //~ g_print ("\t Enable WL\n"); + //~ gupnp_white_list_enable(white_list, FALSE); + //~ break; + default: + break; + } + + tomato++; + + return (tomato < 11) && (tomato != 10); +} + +int +main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) +{ + GUPnPContextManager *cm; + guint id; +#ifndef G_OS_WIN32 + struct sigaction sig_action; +#endif /* G_OS_WIN32 */ + +#if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); +#endif + setlocale (LC_ALL, ""); + + cm = gupnp_context_manager_create(0); + + g_signal_connect(cm, + "context-available", + G_CALLBACK(context_available_cb), + NULL); + + g_signal_connect(cm, + "context-unavailable", + G_CALLBACK(context_unavailable_cb), + NULL); + + main_loop = g_main_loop_new (NULL, FALSE); + + id = g_timeout_add_seconds (5, change_white_list, cm); + +#ifndef G_OS_WIN32 + /* Hook the handler for SIGTERM */ + memset (&sig_action, 0, sizeof (sig_action)); + sig_action.sa_handler = interrupt_signal_handler; + sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT, interrupt_signal_handler); +#endif /* G_OS_WIN32 */ + + g_main_loop_run (main_loop); + g_main_loop_unref (main_loop); + + g_source_remove (id); + + g_object_unref (cm); + + return EXIT_SUCCESS; +} diff --git a/tools/Makefile.in b/tools/Makefile.in index 9642f24..8c1544e 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,6 +51,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = tools DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -42,7 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -70,16 +88,27 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(dist_bin_SCRIPTS) -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -92,13 +121,14 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@ -DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -107,28 +137,34 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ -LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ -LIBCONIC_LIBS = @LIBCONIC_LIBS@ LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ LIBOBJS = @LIBOBJS@ @@ -139,6 +175,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -162,12 +199,14 @@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ -USE_CONIC = @USE_CONIC@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -200,7 +239,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -212,7 +250,11 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +target = @target@ target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -252,8 +294,11 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -281,9 +326,7 @@ uninstall-dist_binSCRIPTS: @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo @@ -344,10 +387,15 @@ install-am: all-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 + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/tools/gupnp-binding-tool b/tools/gupnp-binding-tool index 91111b4..463e5ec 100755 --- a/tools/gupnp-binding-tool +++ b/tools/gupnp-binding-tool @@ -23,7 +23,7 @@ # - could warn if values outside allowedValueRange are used in *_action_set() # - add option to generate skeleton source code that uses the bindings? -import sys, os.path, re, xml.etree.ElementTree as ET +import os.path, re, xml.etree.ElementTree as ET from optparse import OptionParser @@ -162,7 +162,7 @@ def getVariables(var_elements, prefix): dataType = varElement.find("{urn:schemas-upnp-org:service-1-0}dataType").text if not dataType in typemap: - raise Exception("Unknown dataType %s" % data_type) + raise Exception("Unknown dataType %s" % dataType) (var.ctype, var.gtype, g_value_type) = typemap[dataType]; var.get_function = "g_value_get_" + g_value_type var.set_function = "g_value_set_" + g_value_type @@ -173,261 +173,254 @@ def getVariables(var_elements, prefix): def printClientSyncActionBinding(a): indent = (2 + len (a.c_prefixed_name)) * " " - print "static inline gboolean" - print "%s (GUPnPServiceProxy *proxy," % a.c_prefixed_name + print("static inline gboolean") + print("%s (GUPnPServiceProxy *proxy," % a.c_prefixed_name) for arg in a.in_args: - print "%sconst %sin_%s," % (indent, arg.related_var.ctype, arg.c_name) + print("%sconst %sin_%s," % (indent, arg.related_var.ctype, arg.c_name)) for arg in a.out_args: - print "%s%s*out_%s," % (indent, arg.related_var.ctype, arg.c_name) + print("%s%s*out_%s," % (indent, arg.related_var.ctype, arg.c_name)) - print "%sGError **error)" % indent + print("%sGError **error)" % indent) - print "{" + print("{") - print " return gupnp_service_proxy_send_action" - print " (proxy, \"%s\", error," % a.name + print(" return gupnp_service_proxy_send_action") + print(" (proxy, \"%s\", error," % a.name) for arg in a.in_args: - print " \"%s\", %s, in_%s," % (arg.name, arg.related_var.gtype, arg.c_name) - print " NULL," + print(" \"%s\", %s, in_%s," % (arg.name, arg.related_var.gtype, arg.c_name)) + print(" NULL,") for arg in a.out_args: - print " \"%s\", %s, out_%s," % (arg.name, arg.related_var.gtype, arg.c_name) - print " NULL);" + print(" \"%s\", %s, out_%s," % (arg.name, arg.related_var.gtype, arg.c_name)) + print(" NULL);") - print "}\n" + print("}\n") def printClientAsyncActionBinding(a): - # Magic struct to pass data around. Defined here so that we don't have - # multiple copies of the struct definition. - asyncdata = " struct {GCallback cb; gpointer userdata; } *cbdata;" - # User-callback prototype indent = (24 + len (a.c_prefixed_name)) * " " - print "typedef void (*%s_reply) (GUPnPServiceProxy *proxy," % a.c_prefixed_name + print("typedef void (*%s_reply) (GUPnPServiceProxy *proxy," % a.c_prefixed_name) for arg in a.out_args: - print "%sconst %sout_%s," % (indent, arg.related_var.ctype, arg.c_name) - print "%sGError *error," % indent - print "%sgpointer userdata);" % indent - print + print("%sconst %sout_%s," % (indent, arg.related_var.ctype, arg.c_name)) + print("%sGError *error," % indent) + print("%sgpointer userdata);" % indent) + print("") # Generated async callback handler, calls user-provided callback indent = (30 + len (a.c_prefixed_name)) * " " - print "static void _%s_async_callback (GUPnPServiceProxy *proxy," % a.c_prefixed_name - print "%sGUPnPServiceProxyAction *action," % indent - print "%sgpointer user_data)" % indent - print "{" - print asyncdata - print " GError *error = NULL;" + print("static void _%s_async_callback (GUPnPServiceProxy *proxy," % a.c_prefixed_name) + print("%sGUPnPServiceProxyAction *action," % indent) + print("%sgpointer user_data)" % indent) + print("{") + print(" GUPnPAsyncData *cbdata;") + print(" GError *error = NULL;") for arg in a.out_args: - print " %s%s;" % (arg.related_var.ctype, arg.c_name) - print - print " cbdata = user_data;" - print " gupnp_service_proxy_end_action" - print " (proxy, action, &error," + print(" %s%s;" % (arg.related_var.ctype, arg.c_name)) + print("") + print(" cbdata = (GUPnPAsyncData *) user_data;") + print(" gupnp_service_proxy_end_action") + print(" (proxy, action, &error,") for arg in a.out_args: - print " \"%s\", %s, &%s," % (arg.name, arg.related_var.gtype, arg.c_name) - print " NULL);" - print " ((%s_reply)cbdata->cb)" % a.c_prefixed_name - print " (proxy," + print(" \"%s\", %s, &%s," % (arg.name, arg.related_var.gtype, arg.c_name)) + print(" NULL);") + print(" ((%s_reply)cbdata->cb)" % a.c_prefixed_name) + print(" (proxy,") for arg in a.out_args: - print " %s," % arg.c_name - print " error, cbdata->userdata);" - print - print " g_slice_free1 (sizeof (*cbdata), cbdata);" - print "}" - print + print(" %s," % arg.c_name) + print(" error, cbdata->userdata);") + print("") + print(" g_slice_free1 (sizeof (*cbdata), cbdata);") + print("}") + print("") # Entry point indent = (8 + len (a.c_prefixed_name)) * " " - print "static inline GUPnPServiceProxyAction *" - print "%s_async (GUPnPServiceProxy *proxy," % a.c_prefixed_name + print("static inline GUPnPServiceProxyAction *") + print("%s_async (GUPnPServiceProxy *proxy," % a.c_prefixed_name) for arg in a.in_args: - print "%sconst %sin_%s," % (indent, arg.related_var.ctype, arg.c_name) - print "%s%s_reply callback," % (indent, a.c_prefixed_name) - print "%sgpointer userdata)" % indent - print "{" - print " GUPnPServiceProxyAction* action;" - print asyncdata - print - print " cbdata = g_slice_alloc (sizeof (*cbdata));" - print " cbdata->cb = G_CALLBACK (callback);" - print " cbdata->userdata = userdata;" - print " action = gupnp_service_proxy_begin_action" - print " (proxy, \"%s\"," % a.name - print " _%s_async_callback, cbdata," % a.c_prefixed_name + print("%sconst %sin_%s," % (indent, arg.related_var.ctype, arg.c_name)) + print("%s%s_reply callback," % (indent, a.c_prefixed_name)) + print("%sgpointer userdata)" % indent) + print("{") + print(" GUPnPServiceProxyAction* action;") + print(" GUPnPAsyncData *cbdata;") + print("") + print(" cbdata = (GUPnPAsyncData *) g_slice_alloc (sizeof (*cbdata));") + print(" cbdata->cb = G_CALLBACK (callback);") + print(" cbdata->userdata = userdata;") + print(" action = gupnp_service_proxy_begin_action") + print(" (proxy, \"%s\"," % a.name) + print(" _%s_async_callback, cbdata," % a.c_prefixed_name) for arg in a.in_args: - print " \"%s\", %s, in_%s," % (arg.name, arg.related_var.gtype, arg.c_name) - print " NULL);" - print - print " return action;" - print "}" + print(" \"%s\", %s, in_%s," % (arg.name, arg.related_var.gtype, arg.c_name)) + print(" NULL);") + print("") + print(" return action;") + print("}") def printClientVariableNotifyBinding(v): - asyncdata = " struct {GCallback cb; gpointer userdata; } *cbdata;" ctype = re.sub ("^gchar", "const gchar", v.ctype); # callback prototype indent = (22 + len (v.c_prefixed_name)) * " " - print "typedef void" - print "(*%s_changed_callback) (GUPnPServiceProxy *proxy," % v.c_prefixed_name - print "%s%s%s," % (indent, ctype, v.c_name) - print "%sgpointer userdata);" % indent - print + print("typedef void") + print("(*%s_changed_callback) (GUPnPServiceProxy *proxy," % v.c_prefixed_name) + print("%s%s%s," % (indent, ctype, v.c_name)) + print("%sgpointer userdata);" % indent) + print("") # private callback indent = (20 + len (v.c_prefixed_name)) * " " - print "static void" - print "_%s_changed_callback (GUPnPServiceProxy *proxy," % v.c_prefixed_name - print "%sconst gchar *variable," % indent - print "%sGValue *value," % indent - print "%sgpointer userdata)" % indent - print "{" - print asyncdata - print " %s%s;" % (ctype, v.c_name) - print - print " cbdata = userdata;" - print " %s = %s (value);" % (v.c_name, v.get_function) - print " ((%s_changed_callback)cbdata->cb)" % v.c_prefixed_name - print " (proxy," - print " %s," % v.c_name - print " cbdata->userdata);" - print - print " g_slice_free1 (sizeof (*cbdata), cbdata);" - print "}" - print + print("static void") + print("_%s_changed_callback (GUPnPServiceProxy *proxy," % v.c_prefixed_name) + print("%sconst gchar *variable," % indent) + print("%sGValue *value," % indent) + print("%sgpointer userdata)" % indent) + print("{") + print(" GUPnPAsyncData *cbdata;") + print(" %s%s;" % (ctype, v.c_name)) + print("") + print(" cbdata = (GUPnPAsyncData *) userdata;") + print(" %s = %s (value);" % (v.c_name, v.get_function)) + print(" ((%s_changed_callback)cbdata->cb)" % v.c_prefixed_name) + print(" (proxy,") + print(" %s," % v.c_name) + print(" cbdata->userdata);") + print("") + print(" g_slice_free1 (sizeof (*cbdata), cbdata);") + print("}") + print("") # public notify_add function indent = (13 + len (v.c_prefixed_name)) * " " - print "static inline gboolean" - print "%s_add_notify (GUPnPServiceProxy *proxy," % v.c_prefixed_name - print "%s%s_changed_callback callback," % (indent, v.c_prefixed_name) - print "%sgpointer userdata)" % indent - print "{" - print asyncdata - print - print " cbdata = g_slice_alloc (sizeof (*cbdata));" - print " cbdata->cb = G_CALLBACK (callback);" - print " cbdata->userdata = userdata;" - print - print " return gupnp_service_proxy_add_notify" - print " (proxy," - print " \"%s\"," % v.name - print " %s," % v.gtype - print " _%s_changed_callback," % v.c_prefixed_name - print " cbdata);" - print "}" + print("static inline gboolean") + print("%s_add_notify (GUPnPServiceProxy *proxy," % v.c_prefixed_name) + print("%s%s_changed_callback callback," % (indent, v.c_prefixed_name)) + print("%sgpointer userdata)" % indent) + print("{") + print(" GUPnPAsyncData *cbdata;") + print("") + print(" cbdata = (GUPnPAsyncData *) g_slice_alloc (sizeof (*cbdata));") + print(" cbdata->cb = G_CALLBACK (callback);") + print(" cbdata->userdata = userdata;") + print("") + print(" return gupnp_service_proxy_add_notify") + print(" (proxy,") + print(" \"%s\"," % v.name) + print(" %s," % v.gtype) + print(" _%s_changed_callback," % v.c_prefixed_name) + print(" cbdata);") + print("}") def printServerVariableQueryBinding(v): - asyncdata = " struct {GCallback cb; gpointer userdata; } *cbdata;" - # User callback proto indent = (28 + len (v.ctype)+ len (v.c_prefixed_name)) * " " - print "typedef %s(*%s_query_callback) (GUPnPService *service," % (v.ctype, v.c_prefixed_name) - print "%sgpointer userdata);" % indent - print + print("typedef %s(*%s_query_callback) (GUPnPService *service," % (v.ctype, v.c_prefixed_name)) + print("%sgpointer userdata);" % indent) + print("") indent = (12 + len (v.c_prefixed_name)) * " " - print "static void" - print "_%s_query_cb (GUPnPService *service," % v.c_prefixed_name - print "%sgchar *variable," % indent - print "%sGValue *value," % indent - print "%sgpointer userdata)" % indent - print "{" - print asyncdata - print " %s%s;" % (v.ctype, v.c_name) - print + print("static void") + print("_%s_query_cb (GUPnPService *service," % v.c_prefixed_name) + print("%sgchar *variable," % indent) + print("%sGValue *value," % indent) + print("%sgpointer userdata)" % indent) + print("{") + print(" GUPnPAsyncData *cbdata;") + print(" %s%s;" % (v.ctype, v.c_name)) + print("") indent = (36 + len (v.c_name) + len (v.c_prefixed_name)) * " " - print " cbdata = userdata;" - print " %s = ((%s_query_callback)cbdata->cb) (service," % (v.c_name, v.c_prefixed_name) - print "%scbdata->userdata);" % indent - print " g_value_init (value, %s);" % v.gtype - print " %s (value, %s);" % (v.set_function, v.c_name) - print "}" - print + print(" cbdata = (GUPnPAsyncData *) userdata;") + print(" %s = ((%s_query_callback)cbdata->cb) (service," % (v.c_name, v.c_prefixed_name)) + print("%scbdata->userdata);" % indent) + print(" g_value_init (value, %s);" % v.gtype) + print(" %s (value, %s);" % (v.set_function, v.c_name)) + print("}") + print("") indent = (16 + len (v.c_prefixed_name)) * " " - print "gulong" - print "%s_query_connect (GUPnPService *service," % v.c_prefixed_name - print "%s%s_query_callback callback," % (indent, v.c_prefixed_name) - print "%sgpointer userdata)" % indent - print "{" - print asyncdata - print - print " cbdata = g_slice_alloc (sizeof (*cbdata));" - print " cbdata->cb = G_CALLBACK (callback);" - print " cbdata->userdata = userdata;" - print - print " return g_signal_connect_data (service," - print " \"query-variable::%s\"," % v.name - print " G_CALLBACK (_%s_query_cb)," % v.c_prefixed_name - print " cbdata," - print " _free_cb_data," - print " 0);" - print "}" - print + print("gulong") + print("%s_query_connect (GUPnPService *service," % v.c_prefixed_name) + print("%s%s_query_callback callback," % (indent, v.c_prefixed_name)) + print("%sgpointer userdata)" % indent) + print("{") + print(" GUPnPAsyncData *cbdata;") + print("") + print(" cbdata = (GUPnPAsyncData *) g_slice_alloc (sizeof (*cbdata));") + print(" cbdata->cb = G_CALLBACK (callback);") + print(" cbdata->userdata = userdata;") + print("") + print(" return g_signal_connect_data (service,") + print(" \"query-variable::%s\"," % v.name) + print(" G_CALLBACK (_%s_query_cb)," % v.c_prefixed_name) + print(" cbdata,") + print(" _free_cb_data,") + print(" (GConnectFlags) 0);") + print("}") + print("") def printServerActionBinding(a): # getter and setter func for GUPnPServiceAction indent = (13 + len (a.c_prefixed_name)) * " " if len (a.in_args) > 0: - print "static inline void" - print "%s_action_get (GUPnPServiceAction *action," % (a.c_prefixed_name) + print("static inline void") + print("%s_action_get (GUPnPServiceAction *action," % (a.c_prefixed_name)) for arg in a.in_args[:-1]: - print "%s%s*in_%s," % (indent, arg.related_var.ctype, arg.c_name) - print "%s%s*in_%s)" % (indent, a.in_args[-1].related_var.ctype, a.in_args[-1].c_name) - print "{" - print " gupnp_service_action_get (action," + print("%s%s*in_%s," % (indent, arg.related_var.ctype, arg.c_name)) + print("%s%s*in_%s)" % (indent, a.in_args[-1].related_var.ctype, a.in_args[-1].c_name)) + print("{") + print(" gupnp_service_action_get (action,") for arg in a.in_args: - print " \"%s\", %s, in_%s," % (arg.name, arg.related_var.gtype, arg.c_name) - print " NULL);" - print "}" - print + print(" \"%s\", %s, in_%s," % (arg.name, arg.related_var.gtype, arg.c_name)) + print(" NULL);") + print("}") + print("") if len (a.out_args) > 0: - print "static inline void" - print "%s_action_set (GUPnPServiceAction *action," % (a.c_prefixed_name) + print("static inline void") + print("%s_action_set (GUPnPServiceAction *action," % (a.c_prefixed_name)) for arg in a.out_args[:-1]: - print "%sconst %sout_%s," % (indent, arg.related_var.ctype, arg.c_name) - print "%sconst %sout_%s)" % (indent, a.out_args[-1].related_var.ctype, a.out_args[-1].c_name) - print "{" - print " gupnp_service_action_set (action," + print("%sconst %sout_%s," % (indent, arg.related_var.ctype, arg.c_name)) + print("%sconst %sout_%s)" % (indent, a.out_args[-1].related_var.ctype, a.out_args[-1].c_name)) + print("{") + print(" gupnp_service_action_set (action,") for arg in a.out_args: - print " \"%s\", %s, out_%s," % (arg.name, arg.related_var.gtype, arg.c_name) - print " NULL);" - print "}" - print + print(" \"%s\", %s, out_%s," % (arg.name, arg.related_var.gtype, arg.c_name)) + print(" NULL);") + print("}") + print("") indent = (17 + len (a.c_prefixed_name)) * " " - print "static inline gulong" - print "%s_action_connect (GUPnPService *service," % a.c_prefixed_name - print "%sGCallback callback," % indent - print "%sgpointer userdata)" % indent - print "{" - print " return g_signal_connect (service," - print " \"action-invoked::%s\"," % a.name - print " callback," - print " userdata);" - print "}" - print + print("static inline gulong") + print("%s_action_connect (GUPnPService *service," % a.c_prefixed_name) + print("%sGCallback callback," % indent) + print("%sgpointer userdata)" % indent) + print("{") + print(" return g_signal_connect (service,") + print(" \"action-invoked::%s\"," % a.name) + print(" callback,") + print(" userdata);") + print("}") + print("") def PrintServerVariableNotifyBinding(v): indent = (18 + len (v.c_prefixed_name)) * " " - print "void" - print "%s_variable_notify (GUPnPService *service," % v.c_prefixed_name - print "%sconst %s%s)" % (indent ,v.ctype, v.c_name) - print "{" - print " gupnp_service_notify (service," - print " \"%s\", %s, %s," % (v.name, v.gtype, v.c_name) - print " NULL);" - print "}" - print + print("void") + print("%s_variable_notify (GUPnPService *service," % v.c_prefixed_name) + print("%sconst %s%s)" % (indent ,v.ctype, v.c_name)) + print("{") + print(" gupnp_service_notify (service,") + print(" \"%s\", %s, %s," % (v.name, v.gtype, v.c_name)) + print(" NULL);") + print("}") + print("") def parseSCPD(scpd, prefix): """ @@ -448,65 +441,74 @@ def parseSCPD(scpd, prefix): def printClientBindings(binding_name, actions, variables): define = "GUPNP_GENERATED_CLIENT_BINDING_%s" % binding_name - print "/* Generated by gupnp-binding-tool */" - print - print "#include " - print - print "#ifndef %s" % define - print "#define %s" % define - print - print "G_BEGIN_DECLS" - + print("/* Generated by gupnp-binding-tool */") + print("") + print("#include ") + print("") + print("#ifndef %s" % define) + print("#define %s" % define) + print("") + print("G_BEGIN_DECLS") + + print("\n#ifndef __GUPNPASYNCDATA_TYPE__") + print("#define __GUPNPASYNCDATA_TYPE__") + print("typedef struct {GCallback cb; gpointer userdata; } GUPnPAsyncData;") + print("#endif") + for a in actions: - print "\n/* action %s */\n" % a.name + print("\n/* action %s */\n" % a.name) printClientSyncActionBinding(a) printClientAsyncActionBinding(a) for v in variables: if (not v.dummy) and v.notified: - print "\n/* state variable %s */\n" % v.name + print("\n/* state variable %s */\n" % v.name) printClientVariableNotifyBinding(v) - print - print "G_END_DECLS" - print - print "#endif /* %s */" % define + print("") + print("G_END_DECLS") + print("") + print("#endif /* %s */" % define) def printServerBindings(binding_name, actions, variables): define = "GUPNP_GENERATED_CLIENT_BINDING_%s" % binding_name - print "/* Generated by gupnp-binding-tool */" - print - print "#include " - print - print "#ifndef %s" % define - print "#define %s" % define - print - print "G_BEGIN_DECLS" - print - - print "static void" - print "_free_cb_data (gpointer data, GClosure *closure)" - print "{" - print " struct {GCallback cb; gpointer userdata; } *cbdata = data;" - print " g_slice_free1 (sizeof (*cbdata), cbdata);" - print "}" - print + print("/* Generated by gupnp-binding-tool */") + print("") + print("#include ") + print("") + print("#ifndef %s" % define) + print("#define %s" % define) + print("") + print("G_BEGIN_DECLS") + + print("\n#ifndef __GUPNPASYNCDATA_TYPE__") + print("#define __GUPNPASYNCDATA_TYPE__") + print("typedef struct {GCallback cb; gpointer userdata; } GUPnPAsyncData;") + print("#endif") + + print("static void") + print("_free_cb_data (gpointer data, GClosure *closure)") + print("{") + print(" GUPnPAsyncData *cbdata = (GUPnPAsyncData *) data;") + print(" g_slice_free1 (sizeof (*cbdata), cbdata);") + print("}") + print("") for a in actions: - print "\n/* action %s */\n" % a.name + print("\n/* action %s */\n" % a.name) printServerActionBinding(a) for v in variables: if not v.dummy: - print "\n/* state variable %s */\n" % v.name + print("\n/* state variable %s */\n" % v.name) printServerVariableQueryBinding(v) if v.notified: PrintServerVariableNotifyBinding(v) - print - print "G_END_DECLS" - print - print "#endif /* %s */" % define + print("") + print("G_END_DECLS") + print("") + print("#endif /* %s */" % define) def main (): diff --git a/vala/GUPnP-1.0.metadata b/vala/GUPnP-1.0.metadata new file mode 100644 index 0000000..a8ab94c --- /dev/null +++ b/vala/GUPnP-1.0.metadata @@ -0,0 +1,40 @@ +GUPnP cheader_filename="libgupnp/gupnp.h" +ContextManager + .main_context skip + .new skip +DeviceInfo + .get_device nullable=true + .get_service nullable=true + .element skip + .document skip +Service + .notify skip=false + .signals_autoconnect skip +ServiceAction + .get skip=false + .get_value skip=false + .set skip=false +ServiceInfo + .document skip + .element skip + .get_introspection nullable=true +ServiceIntrospection + .get_action nullable=true unowned=true + .get_state_variable nullable=true unowned=true + .scpd skip +ServiceProxy + .begin_action skip=false + .end_action_hash skip + .end_action_list skip + .send_action_hash skip + .send_action_list skip +WhiteList + .entries skip +ControlError skip +control_error_quark skip +EventingError skip +eventing_error_quark skip +ServerError skip +server_error_quark skip +XMLError skip +xml_error_quark skip diff --git a/vala/Makefile.am b/vala/Makefile.am new file mode 100644 index 0000000..e8822d3 --- /dev/null +++ b/vala/Makefile.am @@ -0,0 +1,21 @@ +if HAVE_INTROSPECTION +if HAVE_VAPIGEN +gupnp-1.0.vapi: gupnp-1.0.stamp + @true + +gupnp-1.0.stamp: $(top_builddir)/libgupnp/GUPnP-1.0.gir \ + $(srcdir)/GUPnP-1.0.metadata \ + $(srcdir)/gupnp-1.0-custom.vala + $(AM_V_GEN)$(VAPIGEN) --metadatadir=$(srcdir) \ + --pkg=libsoup-2.4 \ + --library=gupnp-1.0 --pkg=gio-2.0 --pkg=libxml-2.0 \ + $(top_builddir)/libgupnp/GUPnP-1.0.gir \ + $(srcdir)/gupnp-1.0-custom.vala && \ + echo timestmap > $(@F) + +vapidir = $(datadir)/vala/vapi +vapi_DATA = gupnp-1.0.vapi $(srcdir)/gupnp-1.0.deps +CLEANFILES = gupnp-1.0.vapi gupnp-1.0.stamp +EXTRA_DIST = gupnp-1.0.deps GUPnP-1.0.metadata gupnp-1.0-custom.vala +endif +endif diff --git a/vala/Makefile.in b/vala/Makefile.in new file mode 100644 index 0000000..e3e24d1 --- /dev/null +++ b/vala/Makefile.in @@ -0,0 +1,494 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = vala +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(vapidir)" +DATA = $(vapi_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONNMAN_CFLAGS = @CONNMAN_CFLAGS@ +CONNMAN_LIBS = @CONNMAN_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GREP = @GREP@ +GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ +GTHREAD_LIBS = @GTHREAD_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_NETLINK = @HAVE_NETLINK@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGUPNP_CFLAGS = @LIBGUPNP_CFLAGS@ +LIBGUPNP_LIBS = @LIBGUPNP_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NETLINK = @USE_NETLINK@ +VAPIGEN = @VAPIGEN@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@vapidir = $(datadir)/vala/vapi +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@vapi_DATA = gupnp-1.0.vapi $(srcdir)/gupnp-1.0.deps +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@CLEANFILES = gupnp-1.0.vapi gupnp-1.0.stamp +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@EXTRA_DIST = gupnp-1.0.deps GUPnP-1.0.metadata gupnp-1.0-custom.vala +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vala/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu vala/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-vapiDATA: $(vapi_DATA) + @$(NORMAL_INSTALL) + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(vapidir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(vapidir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vapidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(vapidir)" || exit $$?; \ + done + +uninstall-vapiDATA: + @$(NORMAL_UNINSTALL) + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(vapidir)'; $(am__uninstall_files_from_dir) +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$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 $(DATA) +installdirs: + for dir in "$(DESTDIR)$(vapidir)"; 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: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-vapiDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-vapiDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + install-vapiDATA installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-vapiDATA + +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@gupnp-1.0.vapi: gupnp-1.0.stamp +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ @true + +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@gupnp-1.0.stamp: $(top_builddir)/libgupnp/GUPnP-1.0.gir \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(srcdir)/GUPnP-1.0.metadata \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(srcdir)/gupnp-1.0-custom.vala +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(AM_V_GEN)$(VAPIGEN) --metadatadir=$(srcdir) \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ --pkg=libsoup-2.4 \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ --library=gupnp-1.0 --pkg=gio-2.0 --pkg=libxml-2.0 \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(top_builddir)/libgupnp/GUPnP-1.0.gir \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(srcdir)/gupnp-1.0-custom.vala && \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ echo timestmap > $(@F) + +# 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/vala/gupnp-1.0-custom.vala b/vala/gupnp-1.0-custom.vala new file mode 100644 index 0000000..9f3c5b3 --- /dev/null +++ b/vala/gupnp-1.0-custom.vala @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2012 Jens Georg + * + * Author: Jens Georg + * + * This file is part of GUPnP. + * + * GUPnP 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 of the License, or + * (at your option) any later version. + * + * GUPnP 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 program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +public class GUPnP.ServiceProxy : GUPnP.ServiceInfo { + public bool send_action (string action, ...) throws GLib.Error; + public bool end_action (GUPnP.ServiceProxyAction action, ...) throws GLib.Error; + public bool end_action_hash (GUPnP.ServiceProxyAction action, [CCode (pos=-0.9)] GLib.HashTable hash) throws GLib.Error; + public bool end_action_list (GUPnP.ServiceProxyAction action, [CCode (pos=-0.9)] GLib.List out_names, [CCode (pos=-0.8)] GLib.List out_types, [CCode (pos=-0.7)] out GLib.List out_values) throws GLib.Error; + + public bool send_action_hash (string action, [CCode (pos=-0.9)] GLib.HashTable in_hash, [CCode (pos=-0.8)] GLib.HashTable out_hash) throws GLib.Error; + public bool send_action_list (string action, [CCode (pos=-0.9)] GLib.List in_names, [CCode (pos=-0.8)] GLib.List in_values, [CCode (pos=-0.7)] GLib.List out_names, [CCode (pos=-0.6)] GLib.List out_types, [CCode (pos=-0.5)] out GLib.List out_values) throws GLib.Error; +} + +namespace GUPnP { + [CCode (cheader_filename = "libgupnp/gupnp.h", cprefix = "GUPNP_CONTROL_ERROR_")] + public errordomain ControlError { + INVALID_ACTION, + INVALID_ARGS, + OUT_OF_SYNC, + ACTION_FAILED; + public static GLib.Quark quark (); + } + [CCode (cheader_filename = "libgupnp/gupnp.h", cprefix = "GUPNP_EVENTING_ERROR_")] + public errordomain EventingError { + SUBSCRIPTION_FAILED, + SUBSCRIPTION_LOST, + NOTIFY_FAILED; + public static GLib.Quark quark (); + } + [CCode (cheader_filename = "libgupnp/gupnp.h", cprefix = "GUPNP_SERVER_ERROR_")] + public errordomain ServerError { + INTERNAL_SERVER_ERROR, + NOT_FOUND, + NOT_IMPLEMENTED, + INVALID_RESPONSE, + INVALID_URL, + OTHER; + public static GLib.Quark quark (); + } + [CCode (cheader_filename = "libgupnp/gupnp.h", cprefix = "GUPNP_XML_ERROR_")] + public errordomain XMLError { + PARSE, + NO_NODE, + EMPTY_NODE, + INVALID_ATTRIBUTE, + OTHER; + public static GLib.Quark quark (); + } +} diff --git a/vala/gupnp-1.0.deps b/vala/gupnp-1.0.deps new file mode 100644 index 0000000..52e8225 --- /dev/null +++ b/vala/gupnp-1.0.deps @@ -0,0 +1,3 @@ +gssdp-1.0 +libsoup-2.4 +libxml-2.0 -- 2.7.4